コード例 #1
0
        protected override string uc_Update()
        {
            string str;

            if (MyRule.Get(MyLogin.RoleId, "bbiProcessAdvance") != "OK")
            {
                str = "";
            }
            else if (MyRule.AllowEdit)
            {
                //  SYS_LOG.Insert("Quá Trình Tạm Ứng", "Cập Nhật", this.m_AdvanceID.ToString());
                base.SetWaitDialogCaption("Đang cập nhật dữ liệu...");
                HRM_PROCESS_ADVANCE hRMPROCESSADVANCE = new HRM_PROCESS_ADVANCE()
                {
                    AdvanceID    = this.m_AdvanceID,
                    EmployeeCode = this.m_EmployeeCode,
                    Reason       = this.txtReason.Text,
                    Date         = this.dtDate.DateTime,
                    Money        = decimal.Parse(this.calMoney.Text.ToString()),
                    Person       = this.cboPerson.Text
                };
                string str1 = hRMPROCESSADVANCE.Update();
                if (str1 == "OK")
                {
                    this.RaiseSuccessEventHander(hRMPROCESSADVANCE);
                }
                if (str1 != "OK")
                {
                    XtraMessageBox.Show(str1, "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                this.DoHide();
                str = str1;
            }
            else
            {
                MyRule.Notify();
                str = "";
            }
            return(str);
        }