//xóa theo id chung tu private void btnXoaPhieu_Click(object sender, EventArgs e) { if (MessageBox.Show("Bạn có chắc chắn xóa bản ghi này?", "Thông báo", MessageBoxButtons.YesNo) == DialogResult.Yes) { Delete(); grcDanhSach.DataSource = DeNghiXuatTieuHaoProvider.GetListDeNghiXuatTieuHao(); } }
private void btnThemPhieu_Click(object sender, EventArgs e) { frm_PhieuDeNghiXuatTieuHao frm = new frm_PhieuDeNghiXuatTieuHao(); if (frm.ShowDialog() == DialogResult.OK) { grcDanhSach.DataSource = DeNghiXuatTieuHaoProvider.GetListDeNghiXuatTieuHao(); } }
private void frm_DanhSachPhieuDeNghiXuatTH_Load(object sender, EventArgs e) { grcDanhSach.DataSource = DeNghiXuatTieuHaoProvider.GetListDeNghiXuatTieuHao(); btnMoPhieu.Enabled = false; btnXoaPhieu.Enabled = IsSupperUser(); btnMoPhieu.Text = Resources.btnInfor; btnThemPhieu.Text = Resources.btnAdd; btnXoaPhieu.Text = Resources.btnDelete; btnDong.Text = Resources.btnClose; LoadTrangThai(); }
private void btnMoPhieu_Click(object sender, EventArgs e) { if (grvDanhSach.FocusedRowHandle < 0) { return; } ChungTuDeNghiXuatTieuHaoInfor info = ((ChungTuDeNghiXuatTieuHaoInfor)grvDanhSach.GetRow(grvDanhSach.FocusedRowHandle)); frm_PhieuDeNghiXuatTieuHao frm = new frm_PhieuDeNghiXuatTieuHao(info.IdChungTu, info.SoChungTu, info.NgayLap.ToString(), "", info.TrangThai, info.GhiChu, info.HoTen, info.IdChiPhi, info.IdPhongBan); if (frm.ShowDialog() == DialogResult.OK) { grcDanhSach.DataSource = DeNghiXuatTieuHaoProvider.GetListDeNghiXuatTieuHao(); } }