コード例 #1
0
ファイル: FIdleStateProfile.cs プロジェクト: Klutzdon/PBIMSN
        public FIdleStateProfile()
        {
            InitializeComponent();
            this.lvISMInfo.Font = ControlSetting.ListFont;
            try
            {
                this._idleStateMasterBL = MasterBLLFactory.GetBLL<IIdleStateMasterBL>(MasterBLLFactory.IdleStateMaster);
            }
            catch (Exception Ex)
            {

                ShowErrorMessage(Ex.Message);
            }

            this._displayInfo = null;
        }
コード例 #2
0
            public UserInputData(IdleStateMaster_ism_Info showData)
            {
                this.ism_RecordID = showData.ism_RecordID;

                this.ism_cStateName = showData.ism_cStateName;

                this.ism_nDescription = showData.ism_nDescription;

                if (showData.ism_lIsAtive)
                {
                    this.ism_cIsAtive = Common.CustEnum.ChineseYesNo.是;
                }
                else
                {
                    this.ism_cIsAtive = Common.CustEnum.ChineseYesNo.否;
                }
                if (showData.ism_lIsBuildin)
                {
                    this.ism_cDefault = Common.CustEnum.ChineseYesNo.是;
                }
                else
                {
                    this.ism_cDefault = Common.CustEnum.ChineseYesNo.否;
                }
                if (showData.ism_lIsApprove)
                {
                    this.ism_cIsApprove = Common.CustEnum.ChineseYesNo.是;
                }
                else
                {
                    this.ism_cIsApprove = Common.CustEnum.ChineseYesNo.否;
                }
            }
コード例 #3
0
        private void SysToolBar_ItemSave_Click(object sender, EventArgs e)
        {
            try
            {
                IdleStateMaster_ism_Info objInfo = new IdleStateMaster_ism_Info();

                UserInputData tempUserData = proUserData.SelectedObject as UserInputData;

                objInfo.ism_cStateName = tempUserData.ism_cStateName;
                objInfo.ism_nDescription = tempUserData.ism_nDescription;
                objInfo.ism_RecordID = tempUserData.ism_RecordID;
                objInfo.ism_cLast = UserInformation.usm_cUserLoginID;
                if (tempUserData.ism_cIsAtive == Common.CustEnum.ChineseYesNo.是)
                {
                    objInfo.ism_lIsAtive = true;
                }
                else
                {
                    objInfo.ism_lIsAtive = false;
                }

                if (tempUserData.ism_cDefault == Common.CustEnum.ChineseYesNo.是)
                {
                    objInfo.ism_lIsBuildin = true;
                }
                else
                {
                    objInfo.ism_lIsBuildin = false;
                }

                if (tempUserData.ism_cIsApprove == Common.CustEnum.ChineseYesNo.是)
                {
                    objInfo.ism_lIsApprove = true;
                }
                else
                {
                    objInfo.ism_lIsApprove = false;
                }

                ReturnValueInfo returnInfo = new ReturnValueInfo(false);
                if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Insert)
                {
                    objInfo.ism_cAdd = this.UserInformation.usm_cUserLoginID;

                    returnInfo = this._idleStateMasterBL.Save(objInfo, Common.DefineConstantValue.EditStateEnum.OE_Insert);
                }
                else if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Update)
                {
                    objInfo.ism_cLast = this.UserInformation.usm_cUserLoginID;

                    returnInfo = this._idleStateMasterBL.Save(objInfo, Common.DefineConstantValue.EditStateEnum.OE_Update);
                }

                if (returnInfo.boolValue)
                {
                    ShowInformationMessage("操作成功!");

                    if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Insert)
                    {
                        proUserData.SelectedObject = new UserInputData();
                    }
                }
                else
                {
                    ShowErrorMessage("保存失敗!");
                }
            }
            catch (Exception Ex)
            {

                ShowErrorMessage(Ex.Message); ;
            }
        }
コード例 #4
0
ファイル: FIdleStateProfile.cs プロジェクト: Klutzdon/PBIMSN
        private void ModifyData()
        {
            MenuItem itemMenu = new MenuItem();

            itemMenu.Tag = "WindowUI.HBManagerTerminal.Management.OperationManagement.FIdleStateProfileDetail";

            try
            {
                this._displayInfo = this._idleStateMasterBL.DisplayRecord(this._displayInfo) as IdleStateMaster_ism_Info;

                BaseForm form = this.ShowSubForm(itemMenu, this.BaseDockPanel, string.Empty, WeifenLuo.WinFormsUI.Docking.DockState.Document, this._displayInfo, Common.DefineConstantValue.EditStateEnum.OE_Update);
                form.FromCloseCallBack += GetAllRecord;
            }
            catch (Exception Ex)
            {

                ShowErrorMessage(Ex.Message);
            }
        }
コード例 #5
0
ファイル: FIdleStateProfile.cs プロジェクト: Klutzdon/PBIMSN
        private void FIdleStateProfile_Load(object sender, EventArgs e)
        {
            GetAllRecord();

            this._displayInfo = new IdleStateMaster_ism_Info();
        }
コード例 #6
0
ファイル: FIdleStateProfile.cs プロジェクト: Klutzdon/PBIMSN
        private void SysToolBar_OnItemNew_Click(object sender, EventArgs e)
        {
            MenuItem itemMenu = new MenuItem();

            itemMenu.Tag = "WindowUI.HBManagerTerminal.Management.OperationManagement.FIdleStateProfileDetail";

            IdleStateMaster_ism_Info insertInfo = new IdleStateMaster_ism_Info();

            BaseForm form = this.ShowSubForm(itemMenu, this.BaseDockPanel, string.Empty, WeifenLuo.WinFormsUI.Docking.DockState.Document, insertInfo, Common.DefineConstantValue.EditStateEnum.OE_Insert);
            form.FromCloseCallBack += GetAllRecord;
        }
コード例 #7
0
ファイル: IdleStateMasterDA.cs プロジェクト: Klutzdon/PBIMSN
        public bool UpdateRecord(IdleStateMaster_ism_Info infoObject)
        {
            bool isSuccess = false;

            if (infoObject != null)
            {
                try
                {

                    IdleStateMaster_ism updateData = DBCtx.IdleStateMaster_ism.FirstOrDefault(t => t.ism_RecordID == infoObject.ism_RecordID);

                    if (updateData != null)
                    {
                        updateData.ism_cStateName = infoObject.ism_cStateName;

                        updateData.ism_lIsAtive = infoObject.ism_lIsAtive;

                        updateData.ism_lIsBuildin = infoObject.ism_lIsBuildin;

                        updateData.ism_nDescription = infoObject.ism_nDescription;

                        updateData.ism_cLast = infoObject.ism_cLast;

                        updateData.ism_dLastDate = DateTime.Now;

                        updateData.ism_lIsApprove = infoObject.ism_lIsApprove;

                        DBCtx.SubmitChanges();

                        isSuccess = true;

                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }
            if (!UseTran)
            {
                DBCtx = null;
            }
            return isSuccess;
        }
コード例 #8
0
ファイル: IdleStateMasterDA.cs プロジェクト: Klutzdon/PBIMSN
        public bool InsertRecord(IdleStateMaster_ism_Info infoObject)
        {
            bool isSuccess = false;

            if (infoObject != null)
            {
                try
                {

                    IdleStateMaster_ism insertData = Common.General.CopyObjectValue<IdleStateMaster_ism_Info, IdleStateMaster_ism>(infoObject);

                    DBCtx.IdleStateMaster_ism.InsertOnSubmit(insertData);

                    DBCtx.SubmitChanges();

                    isSuccess = true;

                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }
            if (!UseTran)
            {
                DBCtx = null;
            }
            return isSuccess;
        }