示例#1
0
        private void btnThemMoi_Click(object sender, EventArgs e)
        {
            frmLoaiVatTu_ThemMoi frm = new frmLoaiVatTu_ThemMoi();

            frm.Closed += delegate
            {
                LoadData();
                this.Refresh();
            };
            frm.ShowDialog();
        }
示例#2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string maLoaiVT = grvData.GetRowCellValue(grvData.FocusedRowHandle, "MaLoaiVT").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;
            }
            frmLoaiVatTu_ThemMoi frm = new frmLoaiVatTu_ThemMoi(2, maLoaiVT);

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