private void GetModel() { this.ptb_oper = new ChronicLungerVisitBLL(); this.chronicLungerVisitModel = this.ptb_oper.GetModelByOutKey(PTBFactory.ID, this.visitCount); if (this.chronicLungerVisitModel == null) { ChronicLungerVisitModel chronicLungerVisit = new ChronicLungerVisitModel { IDCardNo = this.Model.IDCardNo, FollowupWay = "1" }; this.chronicLungerVisitModel = chronicLungerVisit; this.chronicLungerVisitModel.CreatedBy = ConfigHelper.GetNode("doctor"); this.chronicLungerVisitModel.CreatedDate = new DateTime?(DateTime.Today); } else { this.chronicLungerVisitModel.LastUpdateBy = ConfigHelper.GetNode("doctor"); this.chronicLungerVisitModel.LastUpdateDate = new DateTime?(DateTime.Today); } this.bindingManager = new SimpleBindingManager <ChronicLungerVisitModel>(this.inputRanges, this.inputrange_str, this.chronicLungerVisitModel); }
public void InitEveryThing() { if (HealthHouseFactory.ID == 0) //新增加时 { string checkDate = DateTime.Today.ToString("yyyy-MM-dd"); this.dtpCheckDate.Value = DateTime.Today; // 取得当前日期是否有查体资料 healthHouserModel = healthHouseBLL.GetData(this.Model.IDCardNo, checkDate); } else //查询已有数据 { this.healthHouserModel = healthHouseBLL.GetDataByID(HealthHouseFactory.ID); } if (healthHouserModel == null) { healthHouserModel = new HealthHouseModel(); this.healthHouserModel.IDCardNo = this.Model.IDCardNo; this.healthHouserModel.Doctor = ConfigHelper.GetNode("doctorName"); this.healthHouserModel.CreateBy = ConfigHelper.GetNode("doctor"); this.healthHouserModel.CreateDate = new DateTime?(DateTime.Today); } else { HealthHouseFactory.ID = this.healthHouserModel.ID; this.dtpCheckDate.Value = this.healthHouserModel.CheckDate.Value; } this.healthHouserModel.UpdataBy = ConfigHelper.GetNode("doctor"); this.healthHouserModel.UpdateDate = new DateTime?(DateTime.Today); this.bindingManager = new SimpleBindingManager <HealthHouseModel>(this.inputRanges, this.inputrange_str, this.healthHouserModel); this.SimpleBindingC(this.txtDoctor, "Doctor", false); this.bindingManager.SimpleBinding(this.txtBMI, "BMI", true); this.bindingManager.SimpleBinding(this.txtHeight, "Height", true); this.bindingManager.SimpleBinding(this.txtLeftHeight, "LeftHeight", true); this.bindingManager.SimpleBinding(this.txtLeftPre, "LeftPre", true); this.bindingManager.SimpleBinding(this.txtRightHeight, "RightHeight", true); this.bindingManager.SimpleBinding(this.txtRightPre, "RightPre", true); this.bindingManager.SimpleBinding(this.txtPulseRate, "PulseRate", true); this.bindingManager.SimpleBinding(this.txtWeight, "Weight", true); this.bindingManager.SimpleBinding(this.txtBloodOxygen, "BloodOxygen", true); this.bindingManager.SimpleBinding(this.txtleftsl, "LeftView", true); this.bindingManager.SimpleBinding(this.txtrightsl, "RightView", true); this.bindingManager.SimpleBinding(this.txtjzleft, "LeftEyecorrect", true); this.bindingManager.SimpleBinding(this.txtjzrightsl, "RightEyecorrect", true); this.bindingManager.SimpleBinding(this.tbFat, "Fat", true); this.bindingManager.SimpleBinding(this.tbWater, "Water", true); this.bindingManager.SimpleBinding(this.tbMuscle, "Muscle", true); this.bindingManager.SimpleBinding(this.tbSkeleton, "Skeleton", true); this.bindingManager.SimpleBinding(this.tbCalorie, "Calorie", true); this.txtName.Text = this.Model.CustomerName; this.EveryThingIsOk = true; }
private void FrmLogin_Load(object sender, EventArgs e) { this.areaOrg.VillageHB = ConfigHelper.GetNode("VillageHB"); this.areaOrg.OrgName = ConfigHelper.GetNode("VillageHB_NAME"); this.areaOrg.TownName = ConfigHelper.GetNode("TownName"); this.areaOrg.VillageName = ConfigHelper.GetNode("VillageName"); this.areaOrg.doctor = ConfigHelper.GetNode("doctor"); this.areaOrg.doctorName = ConfigHelper.GetNode("doctorName"); this.areaOrg.archiveid = ConfigHelper.GetNode("archiveid"); this.bindingManager = new SimpleBindingManager <AreaOrg>(this.inputRanges, this.inputrange_str, this.areaOrg); this.bindingManager.SimpleBinding(this.tbTownName, "TownName", false); this.bindingManager.SimpleBinding(this.tbVillageName, "VillageName", false); this.bindingManager.SimpleBinding(this.tbVillageHB_NAME, "VillageHB_NAME", false); this.bindingManager.SimpleBinding(this.mtbHBDep, "VillageHB", false); this.bindingManager.SimpleBinding(this.tbID, "doctor", false); this.bindingManager.SimpleBinding(this.tbName, "doctorName", false); this.bindingManager.SimpleBinding(this.mtbArchiveID, "archiveid", false); System.Configuration.Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); string str = "0"; if (configuration.AppSettings.Settings["AutoLogin"] == null) { configuration.AppSettings.Settings.Add("AutoLogin", str); configuration.Save(); } else { str = configuration.AppSettings.Settings["AutoLogin"].Value; } string node = ConfigHelper.GetNode("doctorName"); string str3 = ConfigHelper.GetNode("doctor"); if (((str == "1") && (node != "")) && (str3 != "")) { this.ckAutolog.Checked = true; this.autoTimer = new System.Timers.Timer(1000.0); this.autoTimer.Elapsed += new ElapsedEventHandler(this.autoTimer_Elapsed); this.autoTimer.Start(); } }
private void GetModel() { this.ptb_oper = new ChronicLungerFirstVisitBLL(); if (PTBFactory.ID == 0) { PTBFactory.NewAdd = true; //新增一笔数据标志 this.chronicLungerFirstVisitModel = this.ptb_oper.GetModel(this.Model.IDCardNo); this.dtpFollowupDate.Value = DateTime.Today.Date; } else { this.chronicLungerFirstVisitModel = this.ptb_oper.GetModelByID(PTBFactory.ID); if (this.chronicLungerFirstVisitModel.FollowupDate.HasValue) { this.dtpFollowupDate.Value = this.chronicLungerFirstVisitModel.FollowupDate.Value; this.visitdate = this.chronicLungerFirstVisitModel.FollowupDate.ToString(); } PTBFactory.NewAdd = false; } if (this.chronicLungerFirstVisitModel == null) { ChronicLungerFirstVisitModel chronicLungerFirstVisit = new ChronicLungerFirstVisitModel { IDCardNo = this.Model.IDCardNo, FollowupWay = "1" }; this.chronicLungerFirstVisitModel = chronicLungerFirstVisit; this.chronicLungerFirstVisitModel.CreatedBy = ConfigHelper.GetNode("doctor"); this.chronicLungerFirstVisitModel.CreatedDate = new DateTime?(DateTime.Today); } else { PTBFactory.ID = this.chronicLungerFirstVisitModel.ID; this.chronicLungerFirstVisitModel.LastUpdateBy = ConfigHelper.GetNode("doctor"); this.chronicLungerFirstVisitModel.LastUpdateDate = new DateTime?(DateTime.Today); } this.bindingManager = new SimpleBindingManager <ChronicLungerFirstVisitModel>(this.inputRanges, this.inputrange_str, this.chronicLungerFirstVisitModel); }
public void InitEveryThing() { this.HyperSurveyModel = new RecordsHyperSurveyBLL().GetModel(PhysicalInfoFactory.ID); this.HyperFoodsModel = new RecordsHyperFoodsBLL().GetModelList(string.Format("IDCardNo = '{0}' and OutKey={1}", this.Model.IDCardNo, PhysicalInfoFactory.ID)); if (this.HyperSurveyModel == null) { HyperSurveyModel = new RecordsHyperSurveyModel(); HyperSurveyModel.IDCardNo = Model.IDCardNo; } this.tbName.Text = Model.CustomerName; this.bindingManagersurvey = new SimpleBindingManager <RecordsHyperSurveyModel>(this.inputRangessurvey, this.inputrange_str, this.HyperSurveyModel); this.bindingManagersurvey.SimpleBindingInt(this.txbPersonSum, "EatPersonSum", true); this.bindingManagersurvey.SimpleBindingInt(this.txbPersonChild, "EatChildSum", true); this.bindingManagersurvey.SimpleBinding(this.txbSalt, "EatSaltQuantity", true); this.bindingManagersurvey.SimpleBinding(this.txbSoy, "EatSoyQuntity", true); for (int k = 0; k < this.foodControl.Count; k++) { if (k < HyperFoodsModel.Count) { switch (HyperFoodsModel[k].FoodName) { case "咸蛋": this.foodControl[0].Source = this.HyperFoodsModel[k]; break; case "咸鱼": this.foodControl[1].Source = this.HyperFoodsModel[k]; break; case "虾皮": this.foodControl[2].Source = this.HyperFoodsModel[k]; break; case "虾米": this.foodControl[3].Source = this.HyperFoodsModel[k]; break; case "方便面": this.foodControl[4].Source = this.HyperFoodsModel[k]; break; case "豆腐乳": this.foodControl[5].Source = this.HyperFoodsModel[k]; break; case "咸菜": this.foodControl[6].Source = this.HyperFoodsModel[k]; break; case "辣椒酱": this.foodControl[7].Source = this.HyperFoodsModel[k]; break; case "虾酱": this.foodControl[8].Source = this.HyperFoodsModel[k]; break; case "甜面酱": this.foodControl[9].Source = this.HyperFoodsModel[k]; break; case "豆瓣酱": this.foodControl[10].Source = this.HyperFoodsModel[k]; break; default: break; } } } for (int k = 0; k < this.foodControl.Count; k++) { if (this.foodControl[k].Source == null) { RecordsHyperFoodsModel recordsHyperFoodsModel = new RecordsHyperFoodsModel { IDCardNo = this.Model.IDCardNo, ModelState = RecordsStateModel.AddToDB }; this.foodControl[k].Source = recordsHyperFoodsModel; } else { this.foodControl[k].Source.ModelState = RecordsStateModel.UpdateInDB; } } this.EveryThingIsOk = true; }
public void InitEveryThing() { this.ChdStroke = new RecordsChdStrokeReportBLL().GetModel(PhysicalInfoFactory.ID); if (ChdStroke == null) { this.ChdStroke = new RecordsChdStrokeReportModel(); } this.bindingManager = new SimpleBindingManager <RecordsChdStrokeReportModel>(this.inputRanges, this.inputRange_str, this.ChdStroke); this.bindingManager.SimpleBinding(this.tbPatientNo, "PatientNo", false); this.bindingManager.SimpleBinding(this.tbADnum, "AdmissionNo", false); this.bindingManager.SimpleBinding(this.tbCardNum, "CardNo", false); this.bindingManager.SimpleBinding(this.tbICDnum, "ICD10Code", false); int age = Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd")) - Convert.ToInt32(Convert.ToDateTime(Model.Birthday).ToString("yyyyMMdd")); if (age.ToString().Length == 6) { age = Convert.ToInt32(age.ToString().Substring(0, 2)); } else if (age.ToString().Length == 7) { age = Convert.ToInt32(age.ToString().Substring(0, 3)); } else if (age.ToString().Length == 5) { age = Convert.ToInt32(age.ToString().Substring(0, 1)); } else { age = 0; } this.tbAge.Text = age.ToString(); this.tbPhoneNum.Text = Model.Phone; if (string.IsNullOrEmpty(this.ChdStroke.AddDistrict) && !string.IsNullOrEmpty(Model.DistrictID.ToString())) { DataTable dtdistict = new RecordsDistrictBLL().GetList(string.Format("Code={0}", Model.DistrictID)).Tables[0]; if (dtdistict.Rows.Count > 0) { DataRow rowdistict = dtdistict.Rows[0]; this.tbAdddistrict.Text = rowdistict["Name"].ToString(); } } else { this.tbAdddistrict.Text = this.ChdStroke.AddDistrict; } if (string.IsNullOrEmpty(this.ChdStroke.AddTown) && !string.IsNullOrEmpty(Model.TownID.ToString())) { DataTable dtTown = new RecordsTownBLL().GetList(string.Format("Code={0}", Model.TownID)).Tables[0]; if (dtTown.Rows.Count > 0) { DataRow rowTown = dtTown.Rows[0]; this.tbAddtown.Text = rowTown["Name"].ToString(); } } else { this.tbAddtown.Text = this.ChdStroke.AddTown; } if (string.IsNullOrEmpty(this.ChdStroke.AddVillage) && !string.IsNullOrEmpty(Model.VillageID.ToString())) { DataTable dtVillage = new RecordsVillageBLL().GetList(string.Format("Code={0}", Model.VillageID)).Tables[0]; if (dtVillage.Rows.Count > 0) { DataRow rowVillage = dtVillage.Rows[0]; this.tbAddVillage.Text = rowVillage["Name"].ToString(); } } else { this.tbAddVillage.Text = this.ChdStroke.AddVillage; } if (string.IsNullOrEmpty(this.ChdStroke.HouesAddDistrict) && !string.IsNullOrEmpty(Model.DistrictID.ToString())) { DataTable dtdistict1 = new RecordsDistrictBLL().GetList(string.Format("Code={0}", Model.DistrictID)).Tables[0]; if (dtdistict1.Rows.Count > 0) { DataRow rowdistict1 = dtdistict1.Rows[0]; this.tbAdddistrict2.Text = rowdistict1["Name"].ToString(); } } else { this.tbAdddistrict2.Text = this.ChdStroke.HouesAddDistrict; } if (string.IsNullOrEmpty(this.ChdStroke.HouesAddTown) && !string.IsNullOrEmpty(Model.TownID.ToString())) { DataTable dtTown1 = new RecordsTownBLL().GetList(string.Format("Code={0}", Model.TownID)).Tables[0]; if (dtTown1.Rows.Count > 0) { DataRow rowTown1 = dtTown1.Rows[0]; this.tbAddtown2.Text = rowTown1["Name"].ToString(); } } else { this.tbAddtown2.Text = this.ChdStroke.HouesAddTown; } if (string.IsNullOrEmpty(this.ChdStroke.HouseAddVillage) && !string.IsNullOrEmpty(Model.VillageID.ToString())) { DataTable dtVillage1 = new RecordsVillageBLL().GetList(string.Format("Code={0}", Model.VillageID)).Tables[0]; if (dtVillage1.Rows.Count > 0) { DataRow rowVillage1 = dtVillage1.Rows[0]; this.tbAddVillage2.Text = rowVillage1["Name"].ToString(); } } else { this.tbAddVillage2.Text = this.ChdStroke.HouseAddVillage; } this.bindingManager.SimpleBinding(tbAddNum, "AddNum", false); this.bindingManager.SimpleBinding(tbAddNum2, "HouseAddNum", false); if (!string.IsNullOrEmpty(this.ChdStroke.AcuteMI)) { string guanxinb = this.ChdStroke.AcuteMI; foreach (string jb in guanxinb.Split(',')) { int nums; if (int.TryParse(jb, out nums)) { this.gxbzd[nums - 1].Checked = true; } } } if (!string.IsNullOrEmpty(this.ChdStroke.SAH)) { string naocuz = this.ChdStroke.SAH; foreach (string jb in naocuz.Split(',')) { int nums; if (int.TryParse(jb, out nums)) { this.nczzd[nums - 1].Checked = true; } } } if (!string.IsNullOrEmpty(this.ChdStroke.Diagnosis)) { string linchuanzd = this.ChdStroke.Diagnosis; foreach (string jb in linchuanzd.Split(',')) { int nums; if (int.TryParse(jb, out nums)) { this.zdyj[nums - 1].Checked = true; } } } if (this.ChdStroke.DiseaseTime.HasValue) { this.fabDate.Value = this.ChdStroke.DiagnosisTime.Value; } else { this.fabDate.Value = DateTime.Now; } if (this.ChdStroke.DiagnosisTime.HasValue) { this.quezDate.Value = this.ChdStroke.DiagnosisTime.Value; } else { this.quezDate.Value = DateTime.Now; } if (this.ChdStroke.FirstOnset == "1") { this.rbyes.Checked = true; } else if (this.ChdStroke.FirstOnset == "2") { this.rbNo.Checked = true; } else { this.rbyes.Checked = false; this.rbNo.Checked = false; } if (!string.IsNullOrEmpty(this.ChdStroke.ConfirmedUnit)) { switch (this.ChdStroke.ConfirmedUnit) { case "1": this.rdprovinceh.Checked = true; break; case "2": this.rdcityh.Checked = true; break; case "3": this.rddistircth.Checked = true; break; case "4": this.rdtownh.Checked = true; break; case "5": this.rdotherh.Checked = true; break; case "9": this.rdbuxingh.Checked = true; break; default: break; } } this.bindingManager.SimpleBinding(this.tbBkUnit, "CardUnit", false); this.bindingManager.SimpleBinding(this.tbBkdoctor, "CardDoctor", false); if (this.ChdStroke.CardDate.HasValue) { this.baokDate.Value = this.ChdStroke.CardDate.Value; } else { this.baokDate.Value = DateTime.Now; } if (this.ChdStroke.DeathDate.HasValue) { this.deathUC.txtTime.Text = Convert.ToDateTime(this.ChdStroke.DeathDate).ToLongDateString(); } this.bindingManager.SimpleBinding(this.tbReason, "DeathReason", false); this.bindingManager.SimpleBindingInt(this.tbDieNum, "DeathCode", true); this.EveryThingIsOk = true; }
public void InitEveryThing() { this.AExamModel = new HealthAssessExamBLL().GetModel(HealthAssessFactory.ID); if (this.AExamModel == null) { this.AExamModel = new HealthAssessExamModel { IDCardNo = this.Model.IDCardNo }; } // 获取病人是否有健康指导 HealthHouseModel houseModel = new HealthHouseBLL().GetMaxData(this.Model.IDCardNo); RecordsBaseInfoModel baseInfo = new RecordsBaseInfoBLL().GetModel(this.Model.IDCardNo); // 体检人基本信息 this.lbName.Text = baseInfo.CustomerName; this.lbData.Text = houseModel.CheckDate.Value.ToString("yyyy-MM-dd"); this.lblAge.Text = timeParser.GetAge(baseInfo.Birthday); this.lblSex.Text = StringPlus.GetSex(baseInfo.Sex); CMoreChange change = new CMoreChange { MoreChange = this.cbFamilySick, Name = "家庭疾病史", Unusual = "无", Other = this.tbFamilySick, MaxBytesCount = 200 }; this.jzjbs = change; this.jzjbs.TransInfo(this.AExamModel.FamilyHistory, this.AExamModel.FamilyOther); CMoreChange change1 = new CMoreChange { MoreChange = this.cbSick, Name = "疾病史", Unusual = "无", Other = this.tbcbSick, MaxBytesCount = 200 }; this.jbs = change1; this.jbs.TransInfo(this.AExamModel.MedicalHistory, this.AExamModel.MedicalOther); CMoreChange change3 = new CMoreChange { MoreChange = this.cbdlfs, Name = "锻炼方式", Other = this.tbdlfs, MaxBytesCount = 200 }; this.dlfs = change3; this.dlfs.TransInfo(this.AExamModel.ExerciseExistense, this.AExamModel.ExerciseExistenseOther); this.bindingManager = new SimpleBindingManager <HealthAssessExamModel>(this.inputRanges, this.inputrange_str, this.AExamModel); this.bindingManager.SimpleBinding(this.txtMint, "ExerciseTimes", true); this.bindingManager.SimpleBinding(this.tbScore, "GloomyScore", true); this.bindingManager.SimpleBinding(this.tbDietOther, "DietaryOther", false); SetCom(this.cbDietCout, this.AExamModel.DietaryNum); SetCom(this.cbDietRe, this.AExamModel.DietaryLaw); SetCom(this.cmbduanlianpinlv, this.AExamModel.ExerciseRate); SetCom(this.cbzys, this.AExamModel.HospitalHistory); SetCom(this.cbfy, this.AExamModel.TakingMedicine); SetCom(this.cmbzilinengli, this.AExamModel.OldSelfCareability); this.TransHabit();//饮食习惯 if (this.Model.PopulationType.Contains("4")) { this.gpOld.Enabled = true; } else { this.gpOld.Enabled = false; } //老年人自理能力 this.HSelfModel = new HealthSelfCareabilityBLL().GetModel(this.AExamModel.PID); this.EveryThingIsOk = true; }
public void InitEveryThing() { this.Tumors = new RecordsTumorBLL().GetModel(PhysicalInfoFactory.ID); if (this.Tumors == null) { this.Tumors = new RecordsTumorModel(); } this.bindingManager = new SimpleBindingManager <RecordsTumorModel>(this.inputRanges, this.inputRange_str, this.Tumors); this.bindingManager.SimpleBinding(this.tbNum, "RecordID", false); this.bindingManager.SimpleBinding(this.tbICD10num, "ICD", false); this.bindingManager.SimpleBinding(this.tbICD3num, "ICDO", false); this.bindingManager.SimpleBinding(this.tbZYnum, "HospitalizationID", false); this.bindingManager.SimpleBinding(this.tbMZnum, "ClinicID", false); if (Model.Birthday != null) { this.tbAge.Text = (DateTime.Now.Year - Model.Birthday.Value.Year).ToString(); } this.tbPhone.Text = Model.Phone; this.bindingManager.SimpleBindingInt(this.tbHealthCard, "MedicareCardID", true); this.bindingManager.SimpleBinding(this.tbOldZd, "OrigDiagnose", false); if (this.Tumors.OrigDiagnoseDate.HasValue) { this.dtpyzddate.Value = this.Tumors.OrigDiagnoseDate.Value; } else { this.dtpyzddate.Value = DateTime.Now; } if (string.IsNullOrEmpty(this.Tumors.HouseholtDistict) && !string.IsNullOrEmpty(Model.DistrictID.ToString())) { DataTable dtdistict = new RecordsDistrictBLL().GetList(string.Format("Code={0}", Model.DistrictID)).Tables[0]; if (dtdistict.Rows.Count > 0) { DataRow rowdistict = dtdistict.Rows[0]; this.tbAdddistrict.Text = rowdistict["Name"].ToString(); } } else { this.tbAdddistrict.Text = this.Tumors.HouseholtDistict; } if (string.IsNullOrEmpty(this.Tumors.HouseholtTown) && !string.IsNullOrEmpty(Model.TownID.ToString())) { DataTable dtTown = new RecordsTownBLL().GetList(string.Format("Code={0}", Model.TownID)).Tables[0]; if (dtTown.Rows.Count > 0) { DataRow rowTown = dtTown.Rows[0]; this.tbAddtown.Text = rowTown["Name"].ToString(); } } else { this.tbAddtown.Text = this.Tumors.HouseholtTown; } if (string.IsNullOrEmpty(this.Tumors.HouseholtVillage) && !string.IsNullOrEmpty(Model.VillageID.ToString())) { DataTable dtVillage = new RecordsVillageBLL().GetList(string.Format("Code={0}", Model.VillageID)).Tables[0]; if (dtVillage.Rows.Count > 0) { DataRow rowVillage = dtVillage.Rows[0]; this.tbAddvillage.Text = rowVillage["Name"].ToString(); } } else { this.tbAddvillage.Text = this.Tumors.HouseholtVillage; } if (string.IsNullOrEmpty(this.Tumors.PresentDistict) && !string.IsNullOrEmpty(Model.DistrictID.ToString())) { DataTable dtdistict1 = new RecordsDistrictBLL().GetList(string.Format("Code={0}", Model.DistrictID)).Tables[0]; if (dtdistict1.Rows.Count > 0) { DataRow rowdistict1 = dtdistict1.Rows[0]; this.tbAdddistrict2.Text = rowdistict1["Name"].ToString(); } } else { this.tbAdddistrict2.Text = this.Tumors.PresentDistict; } if (string.IsNullOrEmpty(this.Tumors.PresentTown) && !string.IsNullOrEmpty(Model.TownID.ToString())) { DataTable dtTown1 = new RecordsTownBLL().GetList(string.Format("Code={0}", Model.TownID)).Tables[0]; if (dtTown1.Rows.Count > 0) { DataRow rowTown1 = dtTown1.Rows[0]; this.tbAddtown2.Text = rowTown1["Name"].ToString(); } } else { this.tbAddtown2.Text = this.Tumors.PresentTown; } if (string.IsNullOrEmpty(this.Tumors.PresentVillage) && !string.IsNullOrEmpty(Model.VillageID.ToString())) { DataTable dtVillage1 = new RecordsVillageBLL().GetList(string.Format("Code={0}", Model.VillageID)).Tables[0]; if (dtVillage1.Rows.Count > 0) { DataRow rowVillage1 = dtVillage1.Rows[0]; this.tbAddvillage2.Text = rowVillage1["Name"].ToString(); } } else { this.tbAddvillage2.Text = this.Tumors.PresentVillage; } this.bindingManager.SimpleBinding(this.tbAddNum, "HouseholtNum", false); this.bindingManager.SimpleBinding(this.tbAddNum2, "PresentNum", false); this.bindingManager.SimpleBinding(this.tbZD, "Diagnose", false); this.bindingManager.SimpleBinding(this.tbType, "PathologyType", false); this.bindingManager.SimpleBinding(this.tbLocation, "PrimaryParts", false); this.bindingManager.SimpleBinding(this.tbTNMt, "StageT", false); this.bindingManager.SimpleBinding(this.tbTNMn, "StageN", false); this.bindingManager.SimpleBinding(this.tbTNMm, "StageM", false); if (this.Tumors.DiagnoseDate.HasValue) { this.dtpzddate.Value = this.Tumors.DiagnoseDate.Value; } else { this.dtpzddate.Value = DateTime.Now; } this.bindingManager.SimpleBinding(this.tbUnit, "ReportsUnit", false); this.bindingManager.SimpleBinding(this.tbDoctor, "ReportsDoctor", false); if (this.Tumors.ReportDate.HasValue) { this.dtReportDate.Value = this.Tumors.ReportDate.Value; } else { this.dtReportDate.Value = DateTime.Now; } if (this.Tumors.DieDate.HasValue) { this.dieUC.txtTime.Text = this.Tumors.DieDate.Value.ToLongDateString(); } this.bindingManager.SimpleBinding(this.tbDieReason, "DieReason", false); if (!string.IsNullOrEmpty(this.Tumors.Judgment)) { string zhendyj = this.Tumors.Judgment; foreach (string zd in zhendyj.Split(',')) { int nums; if (int.TryParse(zd, out nums)) { this.zdyjs[nums - 1].Checked = true; } } } this.EveryThingIsOk = true; }