public void OnDelete() { Mouse.OverrideCursor = Cursors.Wait; try { bool ret = false; List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); NhanSuProcess processNhanSu = new NhanSuProcess(); ret = processNhanSu.DanToc(action, ref obj, ref listClientResponseDetail); AfterDelete(ret, listClientResponseDetail); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
public void OnModify(NS_DM_DVI_TGIAN obj) { Mouse.OverrideCursor = Cursors.Wait; try { NhanSuProcess processNhanSu = new NhanSuProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; ret = processNhanSu.DonViThoiGian(DatabaseConstant.Action.SUA, ref obj, ref listClientResponseDetail); AfterModify(ret, obj, listClientResponseDetail); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
public void OnAddNew(NS_DM_LDO_TVIEC obj) { Mouse.OverrideCursor = Cursors.Wait; try { NhanSuProcess processNhanSu = new NhanSuProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; ret = processNhanSu.LyDoThoiViec(DatabaseConstant.Action.THEM, ref obj, ref listClientResponseDetail); AfterAddNew(ret, obj, listClientResponseDetail); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
private void LoadGrid() { NhanSuProcess processNhanSu = new NhanSuProcess(); Mouse.OverrideCursor = Cursors.Wait; try { List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); List <NS_DM_DANH_MUC> lstDMDanhMuc = new List <NS_DM_DANH_MUC>(); bool ret = processNhanSu.DanhSachDanhMuc(DatabaseConstant.Action.LOAD_DATA, ref lstDMDanhMuc, ref listClientResponseDetail); if (ret == true) { int i = 1; List <NS_DM_DANH_MUC_DTO> lstDTO = new List <NS_DM_DANH_MUC_DTO>(); NS_DM_DANH_MUC_DTO obj = null; for (i = 0; i < lstDMDanhMuc.Count; i++) { obj = new NS_DM_DANH_MUC_DTO(); obj.ID = lstDMDanhMuc[i].ID; obj.STT = i + 1; obj.MA_DANH_MUC = lstDMDanhMuc[i].MA_DANH_MUC; obj.TEN_DANH_MUC = lstDMDanhMuc[i].TEN_DANH_MUC; lstDTO.Add(obj); } grid.DataContext = lstDTO; } else { grid.DataContext = null; } } catch (System.Exception ex) { CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } Mouse.OverrideCursor = Cursors.Arrow; }
/// <summary> /// Xóa /// </summary> /// <param name="listId"></param> private void OnDelete(List <int> listId) { NhanSuProcess processNhanSu = new NhanSuProcess(); Mouse.OverrideCursor = Cursors.Wait; try { List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); List <NS_DM_LOAI_HDLD> lstDMLoaiHdld = new List <NS_DM_LOAI_HDLD>(); NS_DM_LOAI_HDLD obj = null; foreach (int id in listId) { obj = new NS_DM_LOAI_HDLD(); obj.ID = id; lstDMLoaiHdld.Add(obj); } bool ret = processNhanSu.DanhSachLoaiHdld(DatabaseConstant.Action.XOA, ref lstDMLoaiHdld, ref listClientResponseDetail); AfterDelete(ret, listId, listClientResponseDetail); } catch (System.Exception ex) { // Yêu cầu unlock dữ liệu UtilitiesProcess process = new UtilitiesProcess(); bool retUnlockData = process.UnlockData(DatabaseConstant.Module.NSTL, DatabaseConstant.Function.NS_DM_LOAI_HDLD_DS, DatabaseConstant.Table.NS_DM_LOAI_HDLD, DatabaseConstant.Action.XOA, listId); this.Cursor = Cursors.Arrow; CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } Mouse.OverrideCursor = Cursors.Arrow; }
private void LoadCombobox() { COMBOBOX_DTO combo = null; List <string> lstDieuKien = null; List <COMBOBOX_DTO> lstCombobox = new List <COMBOBOX_DTO>(); //Loại phụ cấp lstDieuKien = new List <string>(); lstDieuKien.Add("NS_DM_DU_AN"); lstDieuKien.Add(ClientInformation.MaDonVi); combo = new COMBOBOX_DTO(); combo.maCSo = DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC_NHAN_SU_THEO_BANG.getValue(); combo.combobox = cmbDuAn; combo.lstSource = lstSourceDuAn; combo.lstDieuKien = lstDieuKien; lstCombobox.Add(combo); AutoComboBox auto = new AutoComboBox(); auto.GenAutoComboBoxTheoList(ref lstCombobox); cmbDuAn.SelectedIndex = 0; DataSet dsNQL = new NhanSuProcess().GetDanhSachHoSo(ClientInformation.MaDonViGiaoDich, BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri(), BusinessConstant.LOAI_HO_SO.CHINH_THUC.layGiaTri()); if (dsNQL != null && dsNQL.Tables[0].Rows.Count > 0) { ((GridViewComboBoxColumn)grid.Columns["NQL"]).ItemsSource = dsNQL.Tables[0].DefaultView; } else { ((GridViewComboBoxColumn)grid.Columns["NQL"]).ItemsSource = null; } }