Пример #1
0
        private void btnThemMoi_Click(object sender, EventArgs e)
        {
            frmPhieuKT_ThemMoi frm = new frmPhieuKT_ThemMoi();

            frm.Closed += delegate
            {
                LoadData();
                this.Refresh();
            };
            frm.ShowDialog();
        }
Пример #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string maPhieuKT = grvData.GetRowCellValue(grvData.FocusedRowHandle, "MaPhieuKT").ToString();

            if (string.IsNullOrEmpty(maPhieuKT))
            {
                MessageBox.Show(string.Format("Vui lòng chọn bản ghi cần sửa!"), CommonConstant.MESSAGE_WARNING, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            frmPhieuKT_ThemMoi frm = new frmPhieuKT_ThemMoi(2, maPhieuKT);

            frm.Closed += delegate
            {
                LoadData();
                this.Refresh();
            };
            frm.ShowDialog();
        }