private void CapnhatTienDo(List<object> ids)
 {
     DataRow dr = gridViewMaster.GetDataRow(gridViewMaster.FocusedRowHandle);
     frmCapNhatTienDo cntd = new frmCapNhatTienDo(HelpNumber.ParseInt64(dr["PCCV_ID"].ToString()));
     HelpProtocolForm.ShowModalDialog(this, cntd);
     dr["TONG_TIEN_DO"] = Capnhattiendo(HelpNumber.ParseInt64(dr["PCCV_ID"]));
     LoadDataForSelectedTab(false);
 }
Exemplo n.º 2
0
 private void schedulerControl1_EditAppointmentFormShowing(object sender, AppointmentFormEventArgs e)
 {
     Appointment apt = e.Appointment;
     try
     {
         if (apt.GetValue(this.schedulerStorage1, "PCCV_ID").ToString() != null )
         {
             string a = apt.GetValue(this.schedulerStorage1, "TINH_TRANG").ToString();
             if (apt.GetValue(this.schedulerStorage1, "TINH_TRANG").ToString() != "4")
             {
                 //Nếu nhân viên đang đăng nhập không phải là nhân viên thực hiện công việc thì
                 //không cho phép cập nhật tiến độ công việc.
                 //if (HelpNumber.ParseInt64(apt.GetValue(this.schedulerStorage1, "MA_NV")) != FrameworkParams.currentUser.employee_id)
                 //{
                 //    HelpMsgBox.ShowNotificationMessage("Bạn không có quyền cập nhật tiến độ cho công việc này!");
                 //    e.Handled = true;
                 //    return;
                 //}
                 frmCapNhatTienDo frm = new frmCapNhatTienDo(HelpNumber.ParseInt64(apt.GetValue(this.schedulerStorage1, "PCCV_ID")));
                 HelpProtocolForm.ShowModalDialog(this, frm);
                 refresh = true;
                 LoadSchedulerControl();
                 e.DialogResult = frm.DialogResult;
                 e.Handled = true;
             }
             else
             {
                 HelpMsgBox.ShowNotificationMessage("Công việc đã hoàn tất.\n Bạn không được cập nhật tiến độ cho công việc này!");
                 e.Handled = true;
             }
         }
     }
     catch (Exception ex) { e.Handled = true; return; }
 }