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

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

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

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