예제 #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FrLstDocGiaEdit frm = new FrLstDocGiaEdit();

            frm.Tag = ""; //Tín hiệu cho biết thêm mới
            frm.ShowDialog();
            HienThiLstDocGia(GrDocGia);
        }
예제 #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            FrLstDocGiaEdit fr = new FrLstDocGiaEdit();

            fr                    = new FrLstDocGiaEdit();
            fr.Tag                = this.GrDocGia.CurrentRow.Cells["Ma_DocGia"].Value.ToString(); //Tín hiệu sửa
            fr.txtMaDG.Text       = this.GrDocGia.CurrentRow.Cells["Ma_DocGia"].Value.ToString();
            fr.txtTenDG.Text      = this.GrDocGia.CurrentRow.Cells["Ten_DocGia"].Value.ToString();
            fr.txtDiaChi.Text     = this.GrDocGia.CurrentRow.Cells["Dia_Chi"].Value.ToString();
            fr.txtSDT.Text        = this.GrDocGia.CurrentRow.Cells["So_DienThoai"].Value.ToString();
            fr.txtNgaySinh.Text   = this.GrDocGia.CurrentRow.Cells["Ngay_Sinh"].Value.ToString().Substring(0, 10);
            fr.txtNgayLap.Text    = this.GrDocGia.CurrentRow.Cells["Ngay_Lap"].Value.ToString().Substring(0, 10);
            fr.txtNgayHetHan.Text = this.GrDocGia.CurrentRow.Cells["Ngay_HetHan"].Value.ToString().Substring(0, 10);
            fr.ShowDialog();
            HienThiLstDocGia(GrDocGia);
        }