Пример #1
0
 private void Change()
 {
     if (MyRule.IsAccess("bbiEmployee"))
     {
         HRM_EMPLOYEE hRMEMPLOYEE         = new HRM_EMPLOYEE();
         object       focusedRowCellValue = this.gbList.GetFocusedRowCellValue("EmployeeCode");
         if (focusedRowCellValue != null)
         {
             base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
             if (!(hRMEMPLOYEE.Get(focusedRowCellValue.ToString()) != "OK"))
             {
                 this.DoHide();
                 xfmEmployeeAdd _xfmEmployeeAdd = new xfmEmployeeAdd(Actions.Update, hRMEMPLOYEE);
                 _xfmEmployeeAdd.Updated += new xfmEmployeeAdd.UpdatedEventHander(this.frm_Updated);
                 _xfmEmployeeAdd.Added   += new xfmEmployeeAdd.AddedEventHander(this.frm_Added);
                 _xfmEmployeeAdd.ShowDialog();
             }
             else
             {
                 this.DoHide();
                 XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
         }
     }
 }
Пример #2
0
 private void Add()
 {
     if (MyRule.IsAdd("bbiEmployee"))
     {
         xfmEmployeeAdd _xfmEmployeeAdd = new xfmEmployeeAdd(Actions.Add);
         _xfmEmployeeAdd.Added += new xfmEmployeeAdd.AddedEventHander(this.frm_Added);
         _xfmEmployeeAdd.ShowDialog();
     }
 }