private void tsbthem_Click(object sender, EventArgs e) { Khuyenmai1 frm = new Khuyenmai1(); frm.THEM = true; frm.MAKM = DEM2.ToString(); frm.ShowDialog(); LoadData(); }
private void tsbsua_Click(object sender, EventArgs e) { Khuyenmai1 frm = new Khuyenmai1(); frm.THEM = false; if (DEM1 == 0) { MessageBox.Show("Bạn chưa chọn thông tin khuyến mãi cần cập nhật.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { frm.MAKM = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAKM").ToString(); frm.THONGTIN = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "THONGTIN").ToString(); frm.GIATRI = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GIATRI").ToString(); frm.NGAYBATDAU = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGAYBATDAU").ToString(); frm.NGAYKETTHUC = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGAYKETTHUC").ToString(); frm.GHICHU = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GHICHU").ToString(); frm.ShowDialog(); } LoadData(); }