示例#1
0
        private void gridView_Info_DoubleClick(object sender, EventArgs e)
        {
            this.maBenhNhan = gridView_Info.GetRowCellValue(gridView_Info.FocusedRowHandle, "MaBenhNhan").ToString();
            PSPatient infoPerson = BioBLL.GetInfoPersonByMa(maBenhNhan);

            txtTenMe.Text           = infoPerson.MotherName;
            txtTenCha.Text          = infoPerson.FatherName;
            txtNamSinhMe.EditValue  = !string.IsNullOrEmpty(infoPerson.MotherBirthday.ToString())? Convert.ToDateTime(infoPerson.MotherBirthday).ToString("dd/MM/yyyy") : string.Empty;
            txtNamSinhCha.EditValue = !string.IsNullOrEmpty(infoPerson.FatherBirthday.ToString())? Convert.ToDateTime(infoPerson.FatherBirthday).ToString("dd/MM/yyyy") : string.Empty;
            txtSDTMe.Text           = infoPerson.MotherPhoneNumber;
            txtSDTCha.Text          = infoPerson.FatherPhoneNumber;
            txtAddress.Text         = infoPerson.DiaChi;

            txtTenBenhNhan.Text          = infoPerson.TenBenhNhan;
            txtGioiTinh.EditValue        = infoPerson.GioiTinh;
            txtGioSinhBenhNhan.EditValue = !string.IsNullOrEmpty(infoPerson.NgayGioSinh.ToString()) ? Convert.ToDateTime(infoPerson.NgayGioSinh).ToString("H:mm:ss") : string.Empty;
            txtNamSinhBenhNhan.EditValue = !string.IsNullOrEmpty(infoPerson.NgayGioSinh.ToString()) ? Convert.ToDateTime(infoPerson.NgayGioSinh).ToString("dd/MM/yyyy") : string.Empty;
            txtNoiSinh.Text             = infoPerson.NoiSinh;
            lookUpDanToc.EditValue      = infoPerson.DanTocID;
            txtTuan.Value               = Convert.ToDecimal(infoPerson.TuanTuoiKhiSinh);
            txtNang.Text                = infoPerson.CanNang.ToString();
            cboPhuongPhapSinh.EditValue = infoPerson.PhuongPhapSinh;
            btnEdit.Enabled             = true;
            ReadOnlyText(true);
        }