当前位置: 首页>>代码示例>>C#>>正文


C# IModelObject类代码示例

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


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

示例1: Save

 public ReturnValueInfo Save(IModelObject itemEntity, Common.DefineConstantValue.EditStateEnum EditMode)
 {
     ReturnValueInfo rvInfo = new ReturnValueInfo();
     try
     {
         switch (EditMode)
         {
             case Common.DefineConstantValue.EditStateEnum.OE_Insert:
                 rvInfo = this._IPreRechargeRecordDA.InsertRecord(itemEntity as PreRechargeRecord_prr_Info);
                 break;
             case Common.DefineConstantValue.EditStateEnum.OE_Update:
                 rvInfo = this._IPreRechargeRecordDA.UpdateRecord(itemEntity as PreRechargeRecord_prr_Info);
                 break;
             case Common.DefineConstantValue.EditStateEnum.OE_Delete:
                 rvInfo = this._IPreRechargeRecordDA.DeleteRecord(itemEntity);
                 break;
             default:
                 break;
         }
     }
     catch (Exception ex)
     {
         rvInfo.isError = true;
         rvInfo.messageText = ex.Message;
     }
     return rvInfo;
 }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:27,代码来源:PreRechargeRecordBL.cs

示例2: DisplayRecord

        public PaymentUDMealState_pms_Info DisplayRecord(IModelObject KeyObject)
        {
            PaymentUDMealState_pms_Info displayInfo = KeyObject as PaymentUDMealState_pms_Info;

            if (displayInfo != null)
            {
                try
                {
                    using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                    {
                        PaymentUDMealState_pms displayData = db.PaymentUDMealState_pms.FirstOrDefault(t => t.pms_cRecordID == displayInfo.pms_cRecordID);

                        if (displayData != null)
                        {
                            displayInfo = Common.General.CopyObjectValue<PaymentUDMealState_pms, PaymentUDMealState_pms_Info>(displayData);
                        }
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }

            return displayInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:27,代码来源:PaymentUDMealStateDA.cs

示例3: DisplayRecord

        public IdleStateMaster_ism_Info DisplayRecord(IModelObject KeyObject)
        {
            IdleStateMaster_ism_Info displayInfo = null;

            if (KeyObject != null)
            {
                displayInfo = KeyObject as IdleStateMaster_ism_Info;

                try
                {

                    IdleStateMaster_ism displayData = DBCtx.IdleStateMaster_ism.FirstOrDefault(t => t.ism_RecordID == displayInfo.ism_RecordID);

                    if (displayData != null)
                    {
                        displayInfo = Common.General.CopyObjectValue<IdleStateMaster_ism, IdleStateMaster_ism_Info>(displayData);
                    }

                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }
            if (!UseTran)
            {
                DBCtx = null;
            }
            return displayInfo;
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:31,代码来源:IdleStateMasterDA.cs

示例4: DisplayRecord

        public ShiftTargetYieldSchedule_sty_Info DisplayRecord(IModelObject KeyObject)
        {
            ShiftTargetYieldSchedule_sty_Info displayInfo = null;

            if (KeyObject != null)
            {
                displayInfo = KeyObject as ShiftTargetYieldSchedule_sty_Info;

                try
                {
                    using (MainDBDataContext db = new MainDBDataContext())
                    {
                        ShiftTargetYieldSchedule_sty displayData = db.ShiftTargetYieldSchedule_sty.FirstOrDefault(t => t.sty_iRecordID == displayInfo.sty_iRecordID);

                        if (displayData != null)
                        {
                            displayInfo = Common.General.CopyObjectValue<ShiftTargetYieldSchedule_sty, ShiftTargetYieldSchedule_sty_Info>(displayData);
                        }
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }

            return displayInfo;
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:29,代码来源:ShiftTargetYieldScheduleDA.cs

示例5: load

        public override void load(IModelObject mo)
        {
            const int DATAREADER_FLD_BANKID = 0;
            const int DATAREADER_FLD_BANKNAME = 1;
            const int DATAREADER_FLD_BANKCODE = 2;
            const int DATAREADER_FLD_BANKSWIFTCODE = 3;

            Bank obj = (Bank)mo;
            obj.IsObjectLoading = true;

            if (!this.reader.IsDBNull(DATAREADER_FLD_BANKID) ) {
                obj.PrBANKID = Convert.ToInt64(this.reader.GetInt32(DATAREADER_FLD_BANKID));
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_BANKNAME) ) {
                obj.PrBankName = this.reader.GetString(DATAREADER_FLD_BANKNAME);
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_BANKCODE) ) {
                obj.PrBankCode = this.reader.GetString(DATAREADER_FLD_BANKCODE);
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_BANKSWIFTCODE) ) {
                obj.PrBankSWIFTCode = this.reader.GetString(DATAREADER_FLD_BANKSWIFTCODE);
            }

            obj.isNew = false;
            // since we've just loaded from database, we mark as "old"
            obj.isDirty = false;
            obj.IsObjectLoading = false;
            obj.afterLoad();

            return;
        }
开发者ID:f1ght4fun,项目名称:codegen-lib,代码行数:31,代码来源:BankDBMapper.cs

示例6: DeleteRecord

        public bool DeleteRecord(IModelObject KeyObject)
        {
            bool isSuccess = false;
            MixMaterialDetail_mmdl_Info info = new MixMaterialDetail_mmdl_Info();
            info = KeyObject as MixMaterialDetail_mmdl_Info;

            using (MainDBDataContext db = new MainDBDataContext())
            {
                MixMaterialDetail_mmdl delTab = null;
                if (info.mmdl_Id != new Guid())
                {
                    delTab = db.MixMaterialDetail_mmdl.SingleOrDefault(t => t.mmdl_Id == info.mmdl_Id);
                    if (delTab != null)
                    {
                        db.MixMaterialDetail_mmdl.DeleteOnSubmit(delTab);
                    }
                }
                else
                {
                    var del = db.MixMaterialDetail_mmdl.Where(t =>
                        (info.mmdl_cMaterialCode != null ? t.mmdl_cMaterialCode == info.mmdl_cMaterialCode : true)
                        && (info.mmdl_cMaterialGroupNo != null ? t.mmdl_cMaterialGroupNo == info.mmdl_cMaterialGroupNo : true)
                        );
                    db.MixMaterialDetail_mmdl.DeleteAllOnSubmit(del);
                }
                //if (info.mmdl_cMaterialGroupNo != null)
                //{
                //    var del = db.MixMaterialDetail_mmdl.Where(c => c.mmdl_cMaterialGroupNo == info.mmdl_cMaterialGroupNo);
                //    db.MixMaterialDetail_mmdl.DeleteAllOnSubmit(del);
                //}
                db.SubmitChanges();
                isSuccess = true;
            }
            return isSuccess;
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:35,代码来源:MixMaterialDetailDA.cs

示例7: load

        public override void load(IModelObject mo)
        {
            const int DATAREADER_FLD_EMPLOYEEINFOID = 0;
            const int DATAREADER_FLD_EIEMPLOYEEID = 1;
            const int DATAREADER_FLD_SALARY = 2;
            const int DATAREADER_FLD_ADDRESS = 3;

            EmployeeInfo obj = (EmployeeInfo)mo;
            obj.IsObjectLoading = true;

            if (!this.reader.IsDBNull(DATAREADER_FLD_EMPLOYEEINFOID) ) {
                obj.PrEmployeeInfoId = Convert.ToInt64(this.reader.GetInt32(DATAREADER_FLD_EMPLOYEEINFOID));
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_EIEMPLOYEEID) ) {
                obj.PrEIEmployeeId = Convert.ToInt64(this.reader.GetInt32(DATAREADER_FLD_EIEMPLOYEEID));
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_SALARY) ) {
                obj.PrSalary = this.reader.GetDecimal(DATAREADER_FLD_SALARY);
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_ADDRESS) ) {
                obj.PrAddress = this.reader.GetString(DATAREADER_FLD_ADDRESS);
            }

            obj.isNew = false;
            // since we've just loaded from database, we mark as "old"
            obj.isDirty = false;
            obj.IsObjectLoading = false;
            obj.afterLoad();

            return;
        }
开发者ID:f1ght4fun,项目名称:codegen-lib,代码行数:31,代码来源:EmployeeInfoDBMapper.cs

示例8: DeleteRecord

        public ReturnValueInfo DeleteRecord(IModelObject KeyObject)
        {
            ReturnValueInfo returnInfo = new ReturnValueInfo(false);

            PaymentUDMealState_pms_Info deleteInfo = KeyObject as PaymentUDMealState_pms_Info;

            if (deleteInfo != null)
            {
                try
                {
                    using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                    {
                        PaymentUDMealState_pms deleteData = db.PaymentUDMealState_pms.FirstOrDefault(t => t.pms_cRecordID == deleteInfo.pms_cRecordID);

                        if (deleteData != null)
                        {
                            db.PaymentUDMealState_pms.DeleteOnSubmit(deleteData);

                            db.SubmitChanges();

                            returnInfo.boolValue = true;
                        }
                    }
                }
                catch (Exception Ex)
                {

                    returnInfo.messageText = Ex.Message;
                }
            }

            return returnInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:33,代码来源:PaymentUDMealStateDA.cs

示例9: load

        public override void load(IModelObject mo)
        {
            const int DATAREADER_FLD_PROJECTID = 0;
            const int DATAREADER_FLD_PROJECTNAME = 1;
            const int DATAREADER_FLD_ISACTIVE = 2;
            const int DATAREADER_FLD_PROJECTTYPEID = 3;

            Project obj = (Project)mo;
            obj.IsObjectLoading = true;

            if (!this.reader.IsDBNull(DATAREADER_FLD_PROJECTID) ) {
                obj.PrProjectId = Convert.ToInt64(this.reader.GetInt32(DATAREADER_FLD_PROJECTID));
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_PROJECTNAME) ) {
                obj.PrProjectName = this.reader.GetString(DATAREADER_FLD_PROJECTNAME);
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_ISACTIVE) ) {
                obj.PrIsActive = this.reader.GetInt32(DATAREADER_FLD_ISACTIVE)!=0;
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_PROJECTTYPEID) ) {
                obj.PrProjectTypeId = (EnumProjectType?)this.reader.GetInt32(DATAREADER_FLD_PROJECTTYPEID);
            }

            obj.isNew = false;
            // since we've just loaded from database, we mark as "old"
            obj.isDirty = false;
            obj.IsObjectLoading = false;
            obj.afterLoad();

            return;
        }
开发者ID:f1ght4fun,项目名称:codegen-lib,代码行数:31,代码来源:ProjectDBMapper.cs

示例10: DeleteRecord

        public ReturnValueInfo DeleteRecord(IModelObject KeyObject)
        {
            ReturnValueInfo rvInfo = new ReturnValueInfo();
            DepartmentMaster_dpm_Info searchInfo = KeyObject as DepartmentMaster_dpm_Info;
            if (searchInfo == null)
            {
                rvInfo.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_E_ObjectNull;
                rvInfo.isError = true;
                return rvInfo;
            }
            try
            {
                using (SIOTSDB_HHZXDataContext db = new SIOTSDB_HHZXDataContext())
                {
                    List<DepartmentMaster_dpm> listDept = db.DepartmentMaster_dpm.Where(x => x.dpm_RecordID == searchInfo.dpm_RecordID).ToList();

                    if (listDept != null)
                    {
                        db.DepartmentMaster_dpm.DeleteAllOnSubmit(listDept);
                        db.SubmitChanges();
                        rvInfo.boolValue = true;
                    }
                }
            }
            catch (Exception ex)
            {
                rvInfo.messageText = ex.Message;
                rvInfo.isError = true;
            }
            return rvInfo;
        }
开发者ID:Klutzdon,项目名称:SIOTS_HHZX,代码行数:31,代码来源:DepartmentMasterDA.cs

示例11: load

        public override void load(IModelObject mo)
        {
            const int DATAREADER_FLD_CODE = 0;
            const int DATAREADER_FLD_DESCR_GR = 1;
            const int DATAREADER_FLD_DESCR_EN = 2;

            TrainingCourse obj = (TrainingCourse)mo;
            obj.IsObjectLoading = true;

            if (!this.reader.IsDBNull(DATAREADER_FLD_CODE) ) {
                obj.PrCODE = this.reader.GetString(DATAREADER_FLD_CODE);
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_DESCR_GR) ) {
                obj.PrDescrGr = this.reader.GetString(DATAREADER_FLD_DESCR_GR);
            }
            if (!this.reader.IsDBNull(DATAREADER_FLD_DESCR_EN) ) {
                obj.PrDescrEn = this.reader.GetString(DATAREADER_FLD_DESCR_EN);
            }

            obj.isNew = false;
            // since we've just loaded from database, we mark as "old"
            obj.isDirty = false;
            obj.IsObjectLoading = false;
            obj.afterLoad();

            return;
        }
开发者ID:f1ght4fun,项目名称:codegen-lib,代码行数:27,代码来源:TrainingCourseDBMapper.cs

示例12: DeleteRecord

        public bool DeleteRecord(IModelObject KeyObject)
        {
            bool isSuccess = false;

            if (KeyObject != null)
            {
                ShiftTargetYieldSchedule_sty_Info deleteInfo = KeyObject as ShiftTargetYieldSchedule_sty_Info;

                try
                {
                    using (MainDBDataContext db = new MainDBDataContext())
                    {
                        ShiftTargetYieldSchedule_sty deleteData = db.ShiftTargetYieldSchedule_sty.FirstOrDefault(t => t.sty_iRecordID == deleteInfo.sty_iRecordID);

                        if (deleteData != null)
                        {
                            //deleteData.sty_lIsDeleted = true;
                            deleteData.sty_lIsAtive = false;

                            db.SubmitChanges();

                            isSuccess = true;
                        }
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }

            return isSuccess;
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:34,代码来源:ShiftTargetYieldScheduleDA.cs

示例13: DisplayRecord

        public CardUserMaster_cus_Info DisplayRecord(IModelObject itemEntity)
        {
            try
            {
                CardUserMaster_cus_Info userInfo = this._cardUserMasterDA.DisplayRecord(itemEntity);

                AddCardInfoToUser(userInfo);
                AddUserAccountInfo(userInfo);
                if (userInfo.cus_cIdentityNum == Common.DefineConstantValue.CodeMasterDefine.KEY2_SIOT_CardUserIdentity_Student)
                {
                    AddClassInfoToUser(userInfo);
                }
                else if (userInfo.cus_cIdentityNum == Common.DefineConstantValue.CodeMasterDefine.KEY2_SIOT_CardUserIdentity_Staff)
                {
                    AddDeptInfoToUser(userInfo);
                }

                return userInfo;
            }
            catch (Exception Ex)
            {

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

示例14: DisplayRecord

        public MailConfig_mcf_Info DisplayRecord(IModelObject KeyObject)
        {
            MailConfig_mcf_Info displayInfo = null;

            if (KeyObject != null)
            {
                displayInfo = KeyObject as MailConfig_mcf_Info;

                try
                {
                    using (MainDBDataContext db = new MainDBDataContext())
                    {
                        MailConfig_mcf displayData = db.MailConfig_mcf.FirstOrDefault(t => t.mcf_iRecordID == displayInfo.mcf_iRecordID);

                        if (displayData != null)
                        {
                            displayInfo = Common.General.CopyObjectValue<MailConfig_mcf, MailConfig_mcf_Info>(displayData);
                        }
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }

            return displayInfo;
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:29,代码来源:MailConfigDA.cs

示例15: DeleteRecord

        public bool DeleteRecord(IModelObject KeyObject)
        {
            bool isSuccess = false;

            if (KeyObject != null)
            {
                IdleStateMaster_ism_Info deleteInfo = KeyObject as IdleStateMaster_ism_Info;

                try
                {

                    IdleStateMaster_ism deleteData = DBCtx.IdleStateMaster_ism.FirstOrDefault(t => t.ism_RecordID == deleteInfo.ism_RecordID);

                    if (deleteData != null)
                    {
                        DBCtx.IdleStateMaster_ism.DeleteOnSubmit(deleteData);
                        DBCtx.SubmitChanges();

                        isSuccess = true;
                    }

                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }
            if (!UseTran)
            {
                DBCtx = null;
            }
            return isSuccess;
        }
开发者ID:Klutzdon,项目名称:PBIMSN,代码行数:34,代码来源:IdleStateMasterDA.cs


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