コード例 #1
0
 public override void SetSearch(CHBK2014_N9.Common.Class.RowClickEventArgs e)
 {
     if (this._search)
     {
         DIC_STATE dICSTATE     = new DIC_STATE();
         object    rowCellValue = this.gbList.GetRowCellValue(this.MRowClickEventArgs.RowIndex, "StateCode");
         if (rowCellValue != null)
         {
             base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
             if (!(dICSTATE.Get(rowCellValue.ToString()) != "OK"))
             {
                 this.DoHide();
                 this.RaiseItemSelectedEventHander(dICSTATE);
             }
             else
             {
                 this.DoHide();
                 XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
         }
     }
 }
コード例 #2
0
        public override void Change()
        {
            DIC_STATE dICSTATE            = new DIC_STATE();
            object    focusedRowCellValue = this.gbList.GetFocusedRowCellValue("StateCode");

            if (focusedRowCellValue != null)
            {
                base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                if (!(dICSTATE.Get(focusedRowCellValue.ToString()) != "OK"))
                {
                    this.DoHide();
                    xfmStateAdd _xfmStateAdd = new xfmStateAdd(Actions.Update, dICSTATE);
                    _xfmStateAdd.Updated += new xfmStateAdd.UpdatedEventHander(this.frm_Updated);
                    _xfmStateAdd.Added   += new xfmStateAdd.AddedEventHander(this.frm_Added);
                    _xfmStateAdd.ShowDialog();
                }
                else
                {
                    this.DoHide();
                    XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }