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

            frm.Closed += delegate
            {
                LoadData();
                this.Refresh();
            };
            frm.ShowDialog();
        }
Exemplo n.º 2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string maPhieuKT = grvData.GetRowCellValue(grvData.FocusedRowHandle, "MaPhieuNhap").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;
            }
            frmPhieuNhap_ThemMoi frm = new frmPhieuNhap_ThemMoi(2, maPhieuKT);

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