• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Common.Model类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Common.Model的典型用法代码示例。如果您正苦于以下问题:C# Model类的具体用法?C# Model怎么用?C# Model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Model类属于Common命名空间,在下文中一共展示了Model类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DeleteRecord

        public bool DeleteRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_FunctionMaster_fum_Info info = null;
            try
            {
                info = KeyObject as Sys_FunctionMaster_fum_Info;
                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    Sys_FunctionMaster_fum fum = db.Sys_FunctionMaster_fum.Single<Sys_FunctionMaster_fum>(i => i.fum_iRecordID == info.fum_iRecordID);

                    //for (int i = 0; i < fum.Sys_FormPurview_frps.Count; i++)
                    //{
                    //    Sys_FormPurview_frp sta = fum.Sys_FormPurview_frps[i];
                    //    db.Sys_FormPurview_frps.DeleteOnSubmit(sta);
                    //}

                    db.Sys_FunctionMaster_fum.DeleteOnSubmit(fum);
                    db.SubmitChanges();
                    return true;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:26,代码来源:SysFunctionMasterDA.cs


示例2: Save

 public Model.General.ReturnValueInfo Save(Model.IModel.IModelObject itemEntity, Common.DefineConstantValue.EditStateEnum EditMode)
 {
     ReturnValueInfo rvInfo = new ReturnValueInfo();
     try
     {
         BlacklistChangeRecord_blc_Info recordInfo = itemEntity as BlacklistChangeRecord_blc_Info;
         if (recordInfo == null)
         {
             rvInfo.isError = true;
             rvInfo.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_E_ObjectNull;
             return rvInfo;
         }
         switch (EditMode)
         {
             case Common.DefineConstantValue.EditStateEnum.OE_Insert:
                 return this._IBlacklistChangeRecordDA.InsertRecord(recordInfo);
                 break;
             case Common.DefineConstantValue.EditStateEnum.OE_Update:
                 return this._IBlacklistChangeRecordDA.UpdateRecord(recordInfo);
                 break;
             case Common.DefineConstantValue.EditStateEnum.OE_Delete:
                 return this._IBlacklistChangeRecordDA.DeleteRecord(recordInfo);
                 break;
             default:
                 break;
         }
     }
     catch (Exception ex)
     {
         rvInfo.messageText = ex.Message;
         rvInfo.isError = true;
     }
     return rvInfo;
 }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:34,代码来源:BlacklistChangeRecordBL.cs


示例3: LoginBehalf

 /// <summary>
 /// 登记代表
 /// </summary>
 /// <param name="user"></param>
 public void LoginBehalf(Model.T_Behalf user)
 {
     HttpContext.Current.Session["UserName"] = user.UserName;
     HttpContext.Current.Session["Phone"] = user.Phone;
     HttpContext.Current.Session["Id"] = user.Id;
     HttpContext.Current.Session["IsVoted"] = user.IsVoted;
 }
开发者ID:scrammed,项目名称:Evaluation,代码行数:11,代码来源:Login.cs


示例4: Add

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public string Add(Model.QQ_Layer model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into QQ_Layer(");
            strSql.Append("qq_code,qq_alt,qq_paixu,qq_createdate,qq_state,qq_delete)");
            strSql.Append(" values (");
            strSql.Append("@qq_code,@qq_alt,@qq_paixu,@qq_createdate,@qq_state,@qq_delete)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@qq_code", SqlDbType.NVarChar,50),
                    new SqlParameter("@qq_alt", SqlDbType.NVarChar,100),
                    new SqlParameter("@qq_paixu", SqlDbType.Int,4),
                    new SqlParameter("@qq_createdate", SqlDbType.DateTime),
                    new SqlParameter("@qq_state", SqlDbType.Int,4),
                    new SqlParameter("@qq_delete", SqlDbType.Int,4)};
            parameters[0].Value = model.qq_code;
            parameters[1].Value = model.qq_alt;
            parameters[2].Value = model.qq_paixu;
            parameters[3].Value = model.qq_createdate;
            parameters[4].Value = model.qq_state;
            parameters[5].Value = model.qq_delete;

            int obj = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction,CommandType.Text, strSql.ToString(), parameters);
            if (obj == 1)
            {
                return "succeeded";
            }
            else
            {
                return "error";
            }
        }
开发者ID:yangningyuan,项目名称:Jin-Shi-currency,代码行数:35,代码来源:QQ_Layer.cs


示例5: DeleteRecord

        public bool DeleteRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_RoleMaster_rlm_Info info = null;
            try
            {
                info = KeyObject as Sys_RoleMaster_rlm_Info;
                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    Sys_RoleMaster_rlm rlm = db.Sys_RoleMaster_rlm.Single<Sys_RoleMaster_rlm>(i => i.rlm_iRecordID == info.rlm_iRecordID);

                    for (int i = 0; i < rlm.Sys_UserRoles_usr.Count; i++)
                    {
                        Sys_UserRoles_usr sta = rlm.Sys_UserRoles_usr[i];
                        db.Sys_UserRoles_usr.DeleteOnSubmit(sta);
                    }

                    db.Sys_RoleMaster_rlm.DeleteOnSubmit(rlm);
                    db.SubmitChanges();
                    return true;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:26,代码来源:SysRoleMasterDA.cs


示例6: DisplayRecord

        public Model.SysMaster.Sys_UserMaster_usm_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_UserMaster_usm_Info usm = new Sys_UserMaster_usm_Info();
            Sys_UserMaster_usm_Info info = new Sys_UserMaster_usm_Info();
            usm = KeyObject as Sys_UserMaster_usm_Info;
            try
            {

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IQueryable<Sys_UserMaster_usm> taQuery =
                        (from ta in db.Sys_UserMaster_usm
                         where ta.usm_iRecordID == usm.usm_iRecordID
                         select ta).Take(1);

                    if (taQuery != null)
                    {
                        foreach (Sys_UserMaster_usm t in taQuery)
                        {
                            info = Common.General.CopyObjectValue<Sys_UserMaster_usm, Sys_UserMaster_usm_Info>(t);
                            FindUserRole(info);
                        }
                    }
                    return info;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:31,代码来源:SysUserMasterDA.cs


示例7: update

        public int update(Model.News mn)
        {
            StringBuilder sql= new StringBuilder();
            sql.Append(" update news set ");
            sql.Append(" [email protected], [email protected], [email protected],[email protected],[email protected],[email protected],[email protected],[email protected] ");
            sql.Append(" where [email protected] ");
            SqlParameter [] par={

                                  new SqlParameter( "@name",SqlDbType.VarChar,50)  ,
                                  new SqlParameter("@source",SqlDbType.VarChar,50),
                                  new SqlParameter("@author",SqlDbType.VarChar,50),
                                  new SqlParameter("@hot",SqlDbType.Int,4),
                                  new SqlParameter("@count",SqlDbType.Int,4),
                                  new SqlParameter("@info",SqlDbType.VarChar,0),
                                  new SqlParameter("@nid",SqlDbType.Int,4),
                                  new SqlParameter("@pic",SqlDbType.Int,4 ),
                                  new SqlParameter("@id", SqlDbType.Int,4)
                                };

            par[0].Value = mn.Title;
            par[1].Value = mn.From;
            par[2].Value = mn.Author;
            par[3].Value = mn.Top;
            par[4].Value = mn.Click;
            par[5].Value = mn.Content;
            par[6].Value = mn.Cateid;
            par[7].Value = mn.Ispic;
            par[8].Value = mn.ID;
            int result = DbHelperSQL.ExecuteSql(sql.ToString(),par);
            return result;
        }
开发者ID:kavilee2012,项目名称:kvShop,代码行数:31,代码来源:News.cs


示例8: DisplayRecord

        public Sys_FunctionMaster_fum_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_FunctionMaster_fum_Info fum = new Sys_FunctionMaster_fum_Info();
            Sys_FunctionMaster_fum_Info info = new Sys_FunctionMaster_fum_Info();
            fum = KeyObject as Sys_FunctionMaster_fum_Info;
            try
            {

                using (MainDBDataContext db = new MainDBDataContext())
                {
                    IQueryable<Sys_FunctionMaster_fum> taQuery =
                        (from ta in db.Sys_FunctionMaster_fum
                         where ta.fum_iRecordID == fum.fum_iRecordID
                         //orderby dpms.dpm_iRecordID ascending
                         select ta).Take(1);

                    if (taQuery != null)
                    {
                        //foreach (var t in taQuery)
                        foreach (Sys_FunctionMaster_fum t in taQuery)
                        {
                            info = Common.General.CopyObjectValue<Sys_FunctionMaster_fum, Sys_FunctionMaster_fum_Info>(t);
                            FindFormPurview(info);
                        }
                    }
                    return info;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:33,代码来源:SysFunctionMasterDA.cs


示例9: add

 public int add(Model.News mn)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append(" insert into news ");
     sql.Append(" (_title,_from,_author,_top,_click,_content,_cateid,_ispic) ");
     sql.Append(" values( @title,@from,@author,@top,@click,@content,@cateid,@ispic ) ");
     SqlParameter[] par = { new SqlParameter( "@title",SqlDbType.VarChar,50 ),
                            new SqlParameter("@from",SqlDbType.VarChar,50),
                            new SqlParameter("@author",SqlDbType.VarChar,50),
                            new SqlParameter("@top",SqlDbType.VarChar,50),
                            new SqlParameter("@click",SqlDbType.VarChar,50),
                            new SqlParameter("@content",SqlDbType.VarChar,0),
                            new SqlParameter("@cateid",SqlDbType.VarChar,50),
                            new SqlParameter("@ispic",SqlDbType.VarChar,50)
                          };
     par[0].Value = mn.Title;
     par[1].Value = mn.From;
     par[2].Value = mn.Author;
     par[3].Value = mn.Top;
     par[4].Value = mn.Click;
     par[5].Value = mn.Content;
     par[6].Value = mn.Cateid;
     par[7].Value = mn.Ispic;
     int result = DbHelperSQL.ExecuteSql(sql.ToString(),par);
     return result;
 }
开发者ID:kavilee2012,项目名称:kvShop,代码行数:26,代码来源:News.cs


示例10: DisplayRecord

        public Sys_FormMaster_fom_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_FormMaster_fom_Info frm = new Sys_FormMaster_fom_Info();
            Sys_FormMaster_fom_Info info = null;
            frm = KeyObject as Sys_FormMaster_fom_Info;
            try
            {

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IQueryable<Sys_FormMaster_fom> taQuery =
                        (from ta in db.Sys_FormMaster_fom
                         where ta.fom_iRecordID == frm.fom_iRecordID
                         select ta).Take(1);

                    if (taQuery != null)
                    {
                        foreach (Sys_FormMaster_fom t in taQuery)
                        {
                            info = Common.General.CopyObjectValue<Sys_FormMaster_fom, Sys_FormMaster_fom_Info>(t);
                            FindFormPurview(info);
                        }
                    }
                    return info;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:31,代码来源:SysFormMasterDA.cs


示例11: DisplayRecord

        public Sys_RoleMaster_rlm_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            Sys_RoleMaster_rlm_Info rlm = new Sys_RoleMaster_rlm_Info();
            Sys_RoleMaster_rlm_Info info = new Sys_RoleMaster_rlm_Info();
            rlm = KeyObject as Sys_RoleMaster_rlm_Info;
            try
            {

                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    IQueryable<Sys_RoleMaster_rlm> taQuery =
                        (from ta in db.Sys_RoleMaster_rlm
                         where ta.rlm_iRecordID == rlm.rlm_iRecordID
                         //orderby dpms.dpm_iRecordID ascending
                         select ta).Take(1);

                    if (taQuery != null)
                    {
                        //foreach (var t in taQuery)
                        foreach (Sys_RoleMaster_rlm t in taQuery)
                        {
                            info = Common.General.CopyObjectValue<Sys_RoleMaster_rlm, Sys_RoleMaster_rlm_Info>(t);
                            FindUserRole(info);
                        }
                    }
                    return info;
                }
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:33,代码来源:SysRoleMasterDA.cs


示例12: _delete

 public int _delete(Model.News mn)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append(" delete from news where [email protected] ");
     SqlParameter[] par = { new SqlParameter("@nid", SqlDbType.Int, 4) };
     par[0].Value = mn.ID;
     int result = DbHelperSQL.ExecuteSql(sql.ToString(),par);
     return result;
 }
开发者ID:kavilee2012,项目名称:kvShop,代码行数:9,代码来源:News.cs


示例13: sqldatareader

 public SqlDataReader sqldatareader(Model.Helpcate mh)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("select * from helpcate");
     sql.Append(" where _cateid = @id");
     SqlParameter[] par = { new SqlParameter("@id", SqlDbType.Int, 4) };
     par[0].Value = mh.ID;
     SqlDataReader sdr = Common.DbHelperSQL.ExecuteReader(sql.ToString(), par);
     return sdr;
 }
开发者ID:kavilee2012,项目名称:kvShop,代码行数:10,代码来源:DALHelpcate.cs


示例14: _delete

 public int _delete(Model.Helpcate mh)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append(" delete from helpcate  ");
     sql.Append(" where [email protected]  ");
     SqlParameter [] par={ new SqlParameter("@id",SqlDbType.Int,4)  };
     par[0].Value = mh.ID;
     int result= Common.DbHelperSQL.ExecuteSql(sql.ToString(),par);
     return result;
 }
开发者ID:kavilee2012,项目名称:kvShop,代码行数:10,代码来源:DALHelpcate.cs


示例15: _delete

 public int _delete(Model.downlist md)
 {
     StringBuilder sql = new StringBuilder();
        sql.Append(" delete from downlist ");
        sql.Append(" where [email protected] ");
        SqlParameter[] par ={ new SqlParameter ("@id",SqlDbType.Int,4)
                        };
        par[0].Value = md.id;
        return DbHelperSQL.ExecuteSql(sql.ToString(),par);
 }
开发者ID:kavilee2012,项目名称:kvShop,代码行数:10,代码来源:downlist.cs


示例16: DisplayRecord

 public Model.IModel.IModelObject DisplayRecord(Model.IModel.IModelObject itemEntity)
 {
     try
     {
         return _codeMasterDA.DisplayRecord(itemEntity);
     }
     catch (Exception Ex)
     {
         throw Ex;
     }
 }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:11,代码来源:CodeMasterBL.cs


示例17: DepartmentBalance

        public Model.HHZX.Report.DepartmentBalance_dtb_Info DepartmentBalance(Model.HHZX.Report.DepartmentBalance_dtb_Info query)
        {
            try
            {
                return this._ISystemAccountDetailDA.DepartmentBalance(query);
            }
            catch (Exception Ex)
            {

                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:12,代码来源:SystemAccountDetailBL.cs


示例18: DisplayRecord

        public MachineMaster_mmt_Info DisplayRecord(Model.IModel.IModelObject itemEntity)
        {
            try
            {
                return this._MachineMasterDA.DisplayRecord(itemEntity);
            }
            catch (Exception Ex)
            {

                throw Ex;
            }
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:12,代码来源:MachineMasterBL.cs


示例19: DisplayRecord

        public Model.HHZX.MealBooking.BlacklistChangeRecord_blc_Info DisplayRecord(Model.IModel.IModelObject KeyObject)
        {
            try
            {
                return this._IBlacklistChangeRecordDA.DisplayRecord(KeyObject);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:12,代码来源:BlacklistChangeRecordBL.cs


示例20: update

 public int update(Model.Helpcate mh)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append(" update helpcate set ");
     sql.Append(" [email protected] ");
     sql.Append(" where [email protected] ");
     SqlParameter[] par = { new SqlParameter("@name",SqlDbType.VarChar,50),
                             new SqlParameter("@id",SqlDbType.Int,4 ) };
     par[0].Value = mh.Catename;
     par[1].Value = mh.ID;
     int result = DbHelperSQL.ExecuteSql(sql.ToString(),par);
     return result;
 }
开发者ID:kavilee2012,项目名称:kvShop,代码行数:13,代码来源:DALHelpcate.cs



注:本文中的Common.Model类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Common.System类代码示例发布时间:2022-05-24
下一篇:
C# Common.List类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap