Ejemplo n.º 1
0
        private void btnThemMoi_Click(object sender, EventArgs e)
        {
            frmKhoVT_ThemMoi frm = new frmKhoVT_ThemMoi();

            frm.Closed += delegate
            {
                LoadData();
                this.Refresh();
            };
            frm.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string maLoaiVT = grvData.GetRowCellValue(grvData.FocusedRowHandle, "MaKhoVT").ToString();

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

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