예제 #1
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            lb_MDG.Visible   = false;
            lb_Trung.Visible = false;
            DocGia dg = new DocGia();

            dg.MaDocGia    = txtMaDocGia.Text;
            dg.TenDangNhap = txt_TenDangNhap.Text;
            dg.HoTen       = txtHoTen.Text;
            dg.DiaChi      = txtDiaChi.Text;
            if (rdoBtnNam.Checked == true)
            {
                dg.GioiTinh = "Nam  ";
            }
            else if (rdoBtnNu.Checked == true)
            {
                dg.GioiTinh = "Nữ   ";
            }
            dg.NamSinh = dateNamSinh.DateTime;
            //kiem tra loi madocgia
            if (!docGiaBUS.Sua(dg))
            {
                lb_MDG.Visible = true;
            }

            //load lai
            ucFrmQLThanhVien_Load(sender, e);
            ResetGridview();
        }