Example #1
0
 public override void Change()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiSymbol") != "OK"))
     {
         if (MyRule.AllowAccess)
         {
             DIC_SYMBOL dICSYMBOL = new DIC_SYMBOL();
             object     cellValue = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "SymbolCode");
             if (cellValue != null)
             {
                 base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                 if (!(dICSYMBOL.Get(cellValue.ToString()) != "OK"))
                 {
                     this.DoHide();
                     xfmSymbolAdd _xfmSymbolAdd = new xfmSymbolAdd(Actions.Update, dICSYMBOL);
                     _xfmSymbolAdd.Updated += new xfmSymbolAdd.UpdatedEventHander(this.frm_Updated);
                     _xfmSymbolAdd.Added   += new xfmSymbolAdd.AddedEventHander(this.frm_Added);
                     _xfmSymbolAdd.ShowDialog();
                 }
                 else
                 {
                     this.DoHide();
                     XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                 }
             }
         }
         else
         {
             MyRule.Notify();
         }
     }
 }
Example #2
0
 protected override void Add()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiSymbol") != "OK"))
     {
         if (MyRule.AllowAdd)
         {
             xfmSymbolAdd _xfmSymbolAdd = new xfmSymbolAdd(Actions.Add);
             _xfmSymbolAdd.Added += new xfmSymbolAdd.AddedEventHander(this.frm_Added);
             _xfmSymbolAdd.ShowDialog();
         }
         else
         {
             MyRule.Notify();
         }
     }
 }