示例#1
0
 public bool SaveUc()
 {
     if (GlbTools.IsChanged(this.DataSrc, this.srcData, new string[] { "ModelState", "VisitDoctor" }))
     {
         KidsTcmhmOneBLL kidsTcmhmOneBLL = new KidsTcmhmOneBLL();
         if (this.DataSrc.ModelState == RecordsStateModel.AddToDB)
         {
             kidsTcmhmOneBLL.Add(this.DataSrc);
         }
         else if (this.DataSrc.ModelState == RecordsStateModel.UpdateInDB)
         {
             kidsTcmhmOneBLL.Update(this.DataSrc);
         }
     }
     return(true);
 }
示例#2
0
 public bool SaveUc()
 {
     if (GlbTools.IsChanged(this.srcData, this.DataSrc, new string[] { "ModelState", "VisitDoctor" }))
     {
         KidsTcmhmOneToThreeBLL child_tcmhm_onethree = new KidsTcmhmOneToThreeBLL();
         if (this.DataSrc.ModelState == RecordsStateModel.AddToDB)
         {
             child_tcmhm_onethree.Add(this.DataSrc);
         }
         else if (this.DataSrc.ModelState == RecordsStateModel.UpdateInDB)
         {
             child_tcmhm_onethree.Update(this.DataSrc);
         }
     }
     return(true);
 }
示例#3
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     this.elderSelf.FollowUpDate     = new DateTime?(this.dtpCheckdate.Value.Date);
     this.elderSelf.NextFollowUpDate = new DateTime?(this.dtpNextF.Value.Date);
     this.UpdataToModel();
     if (this.elderSelf.TotalScore.HasValue)
     {
         this.account = this.elderSelf.TotalScore.Value;
     }
     if (GlbTools.IsChanged(this.cp_elderSelf, this.elderSelf, new string[] { "VisitDate", "NextfollowupDate" }))
     {
         OlderSelfCareabilityBLL olderSelfCareabilityBLL = new OlderSelfCareabilityBLL();
         if (olderSelfCareabilityBLL.Exists(this.IDPerson))
         {
             olderSelfCareabilityBLL.Update(this.elderSelf);
         }
     }
     base.DialogResult = DialogResult.OK;
 }
示例#4
0
        public bool SaveModelToDB()
        {
            this.elderSelf.FollowUpDate     = new DateTime?(this.dtpCheckdate.Value.Date);
            this.elderSelf.NextFollowUpDate = new DateTime?(this.dtpNextF.Value.Date);
            if (GlbTools.IsChanged(this.cp_elderSelf, this.elderSelf, new string[] { "VisitDate", "NextfollowupDate" }))
            {
                OlderSelfCareabilityBLL older_selfcareability = new OlderSelfCareabilityBLL();
                if (older_selfcareability.Exists(this.elderSelf.ID))
                {
                    older_selfcareability.Update(this.elderSelf);
                }

                RecordsGeneralConditionBLL   recordsGeneralConditionBLL   = new RecordsGeneralConditionBLL();
                RecordsGeneralConditionModel recordsGeneralConditionModel = recordsGeneralConditionBLL.GetModel(this.Model.IDCardNo);
                if (recordsGeneralConditionModel != null)
                {
                    recordsGeneralConditionModel.OldSelfCareability = this.tbTotal.Text;
                    if (this.account <= 3M)
                    {
                        recordsGeneralConditionModel.OldSelfCareability = "1";
                    }
                    else if ((this.account >= 4M) && (this.account <= 8M))
                    {
                        recordsGeneralConditionModel.OldSelfCareability = "2";
                    }
                    else if ((this.account >= 9M) && (this.account <= 18M))
                    {
                        recordsGeneralConditionModel.OldSelfCareability = "3";
                    }
                    else if (this.account >= 19M)
                    {
                        recordsGeneralConditionModel.OldSelfCareability = "4";
                    }
                    recordsGeneralConditionBLL.Update(recordsGeneralConditionModel);
                }
            }
            return(true);
        }