public void InitEveryThing() { this.elderSelf = new OlderSelfCareabilityBLL().GetModelID(this.IDPerson); if (this.elderSelf == null) { return; } else { this.elderSelf.LastUpDateBy = new decimal?(ConfigHelper.GetNodeDec("doctor")); this.elderSelf.LastUpDateDate = new DateTime?(DateTime.Today); } this.cp_elderSelf = GlbTools.DeepCopy(this.elderSelf); if (string.IsNullOrEmpty(this.elderSelf.FollowUpDoctor)) { this.elderSelf.FollowUpDoctor = ConfigHelper.GetNode("doctorName"); } this.tbDoctor.DataBindings.Add("TEXT", this.elderSelf, "FollowUpDoctor", false, DataSourceUpdateMode.OnPropertyChanged); if (string.IsNullOrEmpty(this.elderSelf.NextVisitAim)) { this.elderSelf.NextVisitAim = "低盐饮食,预防高血压"; } this.txbNextVisitAim.DataBindings.Add("TEXT", this.elderSelf, "NextVisitAim", false, DataSourceUpdateMode.OnPropertyChanged); this.CbSimpleBind(this.cbDinner, "DINE"); this.CbSimpleBind(this.cbGromming, "Groming"); this.CbSimpleBind(this.cbDressing, "Dressing"); this.CbSimpleBind(this.cbTolet, "Tolet"); this.CbSimpleBind(this.cbAct, "Activity"); if (this.elderSelf.TotalScore.HasValue) { this.tbTotal.Text = this.elderSelf.TotalScore.Value.ToString(); } if (this.elderSelf.FollowUpDate.HasValue) { this.dtpCheckdate.Value = this.elderSelf.FollowUpDate.Value; } else { this.dtpCheckdate.Value = DateTime.Now; } if (this.elderSelf.NextFollowUpDate.HasValue) { this.dtpNextF.Value = this.elderSelf.NextFollowUpDate.Value; } else { this.dtpNextF.Value = DateTime.Today.AddYears(1); } MustChoose(); this.EveryThingIsOk = true; }
public void InitEveryThing() { if (this.HelderSelf == null) { HealthSelfCareabilityModel olderSelfCareabilityModel = new HealthSelfCareabilityModel { IDCardNo = this.Model.IDCardNo, Dine = 0, Groming = 0, Dressing = 0, Tolet = 0, Activity = 0, CreatedDate = new DateTime?(DateTime.Today) }; this.HelderSelf = olderSelfCareabilityModel; this.HelderSelf.CreatedBy = ConfigHelper.GetNode("doctorName"); } else { this.HelderSelf.LastUpDateBy = ConfigHelper.GetNode("doctorName"); this.HelderSelf.LastUpDateDate = new DateTime?(DateTime.Today); } this.cp_elderSelf = GlbTools.DeepCopy(this.HelderSelf); this.CbSimpleBind(this.cbDinner, "DINE"); this.CbSimpleBind(this.cbGromming, "Groming"); this.CbSimpleBind(this.cbDressing, "Dressing"); this.CbSimpleBind(this.cbTolet, "Tolet"); this.CbSimpleBind(this.cbAct, "Activity"); if (this.HelderSelf.TotalScore.HasValue) { this.tbTotal.Text = this.HelderSelf.TotalScore.Value.ToString(); } else { this.tbTotal.Text = "0"; } MustChoose(); this.EveryThingIsOk = true; }
public void InitUc() { if (string.IsNullOrEmpty(this.DataSrc.FollowDoctor)) { this.tbDoctor.Text = ConfigHelper.GetNode("doctorName"); } else { this.tbDoctor.Text = this.DataSrc.FollowDoctor; } if (this.DataSrc == null) { throw new Exception("DataSrc 为Null"); } this.baojian = new ManyCheckboxs <KidsTcmhmOneModel>(this.DataSrc); this.baojian.AddCk(new CheckBox[] { this.chk1, this.chk2, this.chk3 }); this.baojian.AddCk(this.chk4, this.tbBaojianOth); this.baojian.BindingProperty("Tcmhm", "TcmhmOther"); if (this.DataSrc.FollowupDate.HasValue) { this.dtpVisitDate.Value = this.DataSrc.FollowupDate.Value; } if (this.DataSrc.NextFollowDate.HasValue) { this.dtpNextVisitDate.Value = this.DataSrc.NextFollowDate.Value; } this.srcData = GlbTools.DeepCopy(this.DataSrc); if (this.SelIndex != 2) { this.tbBaojianOth.ReadOnly = false; this.baojian.MVisiable = false; this.lbOther.Visible = false; this.tbBaojianOth.Size = new Size(this.tbBaojianOth.Size.Width, this.tbBaojianOth.Size.Height * 2); this.tbBaojianOth.Dock = DockStyle.Fill; } if (this.SelIndex == 2)//6个月 { this.SignS = string.Format("{0}{1}_Mec6.png", this.SignPath, this.DataSrc.IDCardNo); this.SignDoc = string.Format("{0}{1}_Mec6_Doc.png", this.SignPath, this.DataSrc.IDCardNo); } //签名初始化 if (File.Exists(this.SignS)) { Image imgeb = Image.FromFile(SignS); Image bmp = new System.Drawing.Bitmap(imgeb); picSignJs.Image = bmp; picSignJs.Show(); imgeb.Dispose(); this.lkJs.Enabled = true; picSignJs.BackColor = Color.White; } if (File.Exists(this.SignDoc)) { Image imgeb = Image.FromFile(SignDoc); Image bmp = new System.Drawing.Bitmap(imgeb); picSignYs.Image = bmp; picSignYs.Show(); imgeb.Dispose(); this.lkYs.Enabled = true; picSignYs.BackColor = Color.White; } }
public void InitUc() { if (string.IsNullOrEmpty(this.DataSrc.FollowUpDoctor)) { this.tbDoctor.Text = ConfigHelper.GetNode("doctorName"); } else { this.tbDoctor.Text = this.DataSrc.FollowUpDoctor; } if (this.DataSrc == null) { throw new Exception("DataSrc 为Null"); } this.baojian = new ManyCheckboxs <KidsTcmhmOneToThreeModel>(this.DataSrc); this.baojian.AddCk(new CheckBox[] { this.chk1, this.chk2, this.chk3 }); this.baojian.AddCk(this.chk4, this.tbBaojianOth); this.baojian.BindingProperty("Tcmhm", "TcmhmOther"); if (this.DataSrc.FollowupDate.HasValue) { this.dtpVisitDate.Value = this.DataSrc.FollowupDate.Value; } if (this.DataSrc.NextFollowupDate.HasValue) { this.dtpNextVisitDate.Value = this.DataSrc.NextFollowupDate.Value; } this.SignS = string.Format("{0}{1}_Mec12.png", this.SignPath, this.DataSrc.IDCardNo); this.SignDoc = string.Format("{0}{1}_Mec12_Doc.png", this.SignPath, this.DataSrc.IDCardNo); this.srcData = GlbTools.DeepCopy(this.DataSrc); switch (this.SelIndex) { case 1: this.chk3.Text = "传授按揉迎香穴、足三里穴方法"; this.SignS = string.Format("{0}{1}_Mec18.png", this.SignPath, this.DataSrc.IDCardNo); this.SignDoc = string.Format("{0}{1}_Mec18_Doc.png", this.SignPath, this.DataSrc.IDCardNo); break; case 2: this.chk3.Text = "传授按揉迎香穴、足三里穴方法"; this.SignS = string.Format("{0}{1}_Mec24.png", this.SignPath, this.DataSrc.IDCardNo); this.SignDoc = string.Format("{0}{1}_Mec24_Doc.png", this.SignPath, this.DataSrc.IDCardNo); break; case 3: this.chk3.Text = "传授按揉四神聪穴方法"; this.SignS = string.Format("{0}{1}_Mec30.png", this.SignPath, this.DataSrc.IDCardNo); this.SignDoc = string.Format("{0}{1}_Mec30_Doc.png", this.SignPath, this.DataSrc.IDCardNo); break; } //签名初始化 if (File.Exists(this.SignS)) { Image imgeb = Image.FromFile(SignS); Image bmp = new System.Drawing.Bitmap(imgeb); picSignJs.Image = bmp; picSignJs.Show(); imgeb.Dispose(); this.lkJs.Enabled = true; picSignJs.BackColor = Color.White; } if (File.Exists(this.SignDoc)) { Image imgeb = Image.FromFile(SignDoc); Image bmp = new System.Drawing.Bitmap(imgeb); picSignYs.Image = bmp; picSignYs.Show(); imgeb.Dispose(); this.lkYs.Enabled = true; picSignYs.BackColor = Color.White; } }
public void InitEveryThing() { //this.elderSelf = new RecordsSelfcareabilityBLL().GetModelID(this.SelfID); if (this.elderSelf == null) { RecordsSelfcareabilityModel olderSelfCareabilityModel = new RecordsSelfcareabilityModel { IDCardNo = this.Model.IDCardNo, RecordID = this.Model.RecordID, FollowUpDoctor = this.Model.Doctor, Dine = 0, Groming = 0, Dressing = 0, Tolet = 0, Activity = 0, CreatedDate = new DateTime?(DateTime.Today) }; this.elderSelf = olderSelfCareabilityModel; this.elderSelf.CreatedBy = new decimal?(ConfigHelper.GetNodeDec("doctor")); this.dtpNextF.Value = DateTime.Today.AddYears(1); } else { this.elderSelf.LastUpDateBy = new decimal?(ConfigHelper.GetNodeDec("doctor")); this.elderSelf.LastUpDateDate = new DateTime?(DateTime.Today); if (this.elderSelf.NextFollowUpDate.HasValue && PhysicalInfoFactoryID > 0) { this.dtpNextF.Value = this.elderSelf.NextFollowUpDate.Value; } else { this.dtpNextF.Value = DateTime.Today.AddYears(1); } } this.cp_elderSelf = GlbTools.DeepCopy(this.elderSelf); if (string.IsNullOrEmpty(this.elderSelf.FollowUpDoctor)) { this.elderSelf.FollowUpDoctor = ConfigHelper.GetNode("doctorName"); } this.tbDoctor.DataBindings.Add("TEXT", this.elderSelf, "FollowUpDoctor", false, DataSourceUpdateMode.OnPropertyChanged); if (string.IsNullOrEmpty(this.elderSelf.NextVisitAim)) { //this.elderSelf.NextVisitAim = "防意外,防伤害,防坠床。"; this.elderSelf.NextVisitAim = "低盐饮食,预防高血压"; } this.txbNextVisitAim.DataBindings.Add("TEXT", this.elderSelf, "NextVisitAim", false, DataSourceUpdateMode.OnPropertyChanged); this.CbSimpleBind(this.cbDinner, "DINE"); this.CbSimpleBind(this.cbGromming, "Groming"); this.CbSimpleBind(this.cbDressing, "Dressing"); this.CbSimpleBind(this.cbTolet, "Tolet"); this.CbSimpleBind(this.cbAct, "Activity"); if (this.elderSelf.TotalScore.HasValue) { this.tbTotal.Text = this.elderSelf.TotalScore.Value.ToString(); } else { this.tbTotal.Text = "0"; } if (this.elderSelf.FollowUpDate.HasValue) { this.dtpCheckdate.Value = this.elderSelf.FollowUpDate.Value; } else { this.dtpCheckdate.Value = DateTime.Today; } //if (this.elderSelf.NextFollowUpDate.HasValue) //{ // this.dtpNextF.Value = this.elderSelf.NextFollowUpDate.Value; //} //else //{ // this.dtpNextF.Value = DateTime.Today; //} MustChoose(); this.EveryThingIsOk = true; }