Пример #1
0
        private void btnThemMoi_Click(object sender, EventArgs e)
        {
            frmCTPKT_ThemMoi frm = new frmCTPKT_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, "MaCTKT").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;
            }
            frmCTPKT_ThemMoi frm = new frmCTPKT_ThemMoi(2, maPhieuKT);

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