public void btnChuyenTiep_Click(object sender, DirectEventArgs e) { string type = ""; bool datrungtuyen = false; HoSoUngVienController hosoungvien = new HoSoUngVienController(); DAL.HoSoUngVien hsuv = new DAL.HoSoUngVien(); if (Equals(hdfType.Text, "DaTrungTuyen")) { type = "DaTrungTuyen"; hsuv.DaTrungTuyen = true; datrungtuyen = true; } else { if (Equals(hdfType.Text, "store")) { type = "store"; } else { if (Equals(hdfType.Text, "black")) { type = "black"; } } } try { foreach (var item in checkboxSelection.SelectedRows) { hsuv.MaUngVien = decimal.Parse("0" + item.RecordID); hsuv.BlackListOrStore = type; hsuv.GhiChu = txt_Chuyen_GhiChu.Text; hsuv.MaLyDo = int.Parse("0" + hdfChuyen_LyDo.Text); hosoungvien.ChuyenDanhSach(hsuv, datrungtuyen); } btnDelete.Disabled = true; btnEdit.Disabled = true; btnNext.Disabled = true; btnPrint.Disabled = true; GridPanel1.Reload(); resetTabPanelAfterUpdate(); checkboxSelection.ClearSelections(); wdChuyenLyDo.Hide(); Dialog.ShowNotification("Chuyển thành công!"); } catch (Exception ex) { Dialog.ShowError("Thông báo", "Có lỗi xảy ra: " + ex.Message); } }
protected void btnChuyenTiep_Click(object sender, DirectEventArgs e) { string type = ""; bool datrungtuyen = false; HoSoUngVienController hosoungvien = new HoSoUngVienController(); DAL.HoSoUngVien hsuv = new DAL.HoSoUngVien(); if (Equals(hdfType.Text, "toList")) { type = ""; datrungtuyen = true; } else { if (Equals(hdfType.Text, "store")) { type = "store"; } else { if (Equals(hdfType.Text, "black")) { type = "black"; } } } try { foreach (var item in checkboxSelection.SelectedRows) { hsuv.MaUngVien = decimal.Parse("0" + item.RecordID); hsuv.BlackListOrStore = type; if (datrungtuyen == false) { hsuv.GhiChu = txt_Chuyen_GhiChu.Text; hsuv.MaLyDo = int.Parse("0" + hdfChuyen_LyDo.Text); } hosoungvien.ChuyenDanhSach(hsuv, datrungtuyen); } checkboxSelection.ClearSelections(); GridPanel1.Reload(); btnChuyenTiep.Disabled = true; btnRoiNgayDiLam.Disabled = true; btnTinhTrangDiLam.Disabled = true; Dialog.ShowNotification("Chuyển thành công!"); } catch (Exception ex) { Dialog.ShowError("Lỗi xảy ra " + ex.Message); } }
public void btn_ChuyenLichHenPV_Click(object sender, DirectEventArgs e) { try { LichPhongVanController lichphongvan = new LichPhongVanController(); DAL.LichHenPhongVan lpv = new DAL.LichHenPhongVan(); HoSoUngVienController hosoungvien = new HoSoUngVienController(); DAL.HoSoUngVien hsuv = new DAL.HoSoUngVien(); foreach (var item in RowSelectionModel3.SelectedRows) { lpv.FR_KEY = decimal.Parse("0" + item.RecordID); lpv.CreatedBy = CurrentUser.ID; lpv.CreatedDate = DateTime.Now; if (!df_NgayPhongVan.SelectedDate.ToString().Contains("0001")) { lpv.LichHen = Convert.ToDateTime(df_NgayPhongVan.SelectedDate); } lpv.ThoiGian = tf_GioPhongVan.Text; lpv.ThuTuPhongVan = int.Parse("0" + txt_ThuTuPhongVan.Text); lpv.VongPhongVan = int.Parse("0" + txt_VongPhongVan.Text); lpv.GhiChu = txt_ghichu.Text; lichphongvan.InsertByHoSoUngVien(lpv); hsuv.MaUngVien = decimal.Parse("0" + item.RecordID); hsuv.BlackListOrStore = ""; hosoungvien.ChuyenDanhSach(hsuv, false); } wdChuyenLichHenPV.Hide(); GridPanel1.Reload(); RowSelectionModel3.ClearSelections(); btnDelete.Disabled = true; btnEdit.Disabled = true; btnNext.Disabled = true; btnPrint.Disabled = true; Dialog.ShowNotification("Chuyển thành công!"); } catch (Exception ex) { Dialog.ShowError("Thông báo", "Có lỗi xảy ra: " + ex.Message); } }