Пример #1
0
        protected override string uc_Save()
        {
            string str;

            if (MyRule.Get(MyLogin.RoleId, "bbiNationality") != "OK")
            {
                str = "";
            }
            else if (MyRule.AllowAdd)
            {
                //  SYS_LOG.Insert("Danh Mục Quốc Tịch", "Thêm", this.txtID.Text);
                base.SetWaitDialogCaption("Đang lưu dữ liệu...");
                Cursor.Current = Cursors.WaitCursor;
                DIC_NATIONALITY dICNATIONALITY = new DIC_NATIONALITY(this.txtID.Text, this.txtNAME.Text, this.txtDescription.Text, this.chxUse.Checked);
                string          str1           = dICNATIONALITY.Insert();
                if (str1 == "OK")
                {
                    this.RaiseSuccessEventHander(dICNATIONALITY);
                }
                Cursor.Current = Cursors.Default;
                this.DoHide();
                if (str1 != "OK")
                {
                    XtraMessageBox.Show(str1, "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                str = str1;
            }
            else
            {
                MyRule.Notify();
                str = "";
            }
            return(str);
        }