using DevExpress.XtraEditors; using HL_FristAidPlatform_DTO; using HL_FristAidPlatform_Public; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HL_FristAidPlatform_Apoplexy { public partial class UserControl_Part2 : UserControl { string PatientGuid; ApoplexyBasicinformationDTO basicinformationDTO; public UserControl_Part2(string _PatientGuid) { InitializeComponent(); PatientGuid = _PatientGuid; } private void UserControl_Part2_Load(object sender, EventArgs e) { basicinformationDTO = DBHelpClass.GetDateModel(string.Format("api/service/T_Service_Apoplexy_ArchivesCases/GetByPatientGuid?PatientGuid={0}", PatientGuid)); if (basicinformationDTO != null) { textEdit_acLinkName1.Text = basicinformationDTO.acLinkName1; textEdit_acLinkTele1.Text = basicinformationDTO.acLinkTele1; textEdit_BCLinkTele2.Text = basicinformationDTO.BCLinkTele2; textEdit_BCLinkTele3.Text = basicinformationDTO.BCLinkTele3; textEdit_acHzCode.Text = basicinformationDTO.acHzCode; timeControl_acTime.TimeValue = basicinformationDTO.acTime; radioGroup_BCRyType.EditValue = basicinformationDTO.BCRyType; radioGroup_BCLyType.EditValue = basicinformationDTO.BCLyType; radioGroup_BCWyzyType.EditValue = basicinformationDTO.BCWyzyType; radioGroup_BCCyKb.EditValue = basicinformationDTO.BCCyKb; PublicClass.SetItemChecked(checkedListBoxControl_SFJwBs, basicinformationDTO.SFJwBs, ';'); textEdit_SFQxCs.Text = basicinformationDTO.SFQxCs; timeControl_SFQxFirstTime.TimeValue = basicinformationDTO.SFQxFirstTime; textEdit_SFCxCs.Text = basicinformationDTO.SFCxCs; timeControl_SFCxFirstTime.TimeValue = basicinformationDTO.SFCxFirstTime; textEdit_SFTIACs.Text = basicinformationDTO.SFTIACs; timeControl_SFTIAFirstYear.TimeValue = basicinformationDTO.SFTIAFirstYear; textEdit_SFGxyYear.Text = basicinformationDTO.SFGxyYear; textEdit_SFJwBsQiTa.Text = basicinformationDTO.SFJwBsQiTa; textEdit_SFTnbYear.Text = basicinformationDTO.SFTnbYear; radioGroup_LSSmoke.EditValue = basicinformationDTO.LSSmoke; textEdit_LSSmokeYear.Text = basicinformationDTO.LSSmokeYear; textEdit_LSSmokeZhi.Text = basicinformationDTO.LSSmokeZhi; textEdit_LSSmokeQYear.Text = basicinformationDTO.LSSmokeQYear; radioGroup_LSDrink.EditValue = basicinformationDTO.LSDrink; radioGroup_FHStroke.EditValue = basicinformationDTO.FHStroke; radioGroup_FHCHD.EditValue = basicinformationDTO.FHCHD; radioGroup_FHHypertension.EditValue = basicinformationDTO.FHHypertension; radioGroup_FHDM.EditValue = basicinformationDTO.FHDM; radioGroup_FHDyslipidemia.EditValue = basicinformationDTO.FHDyslipidemia; radioGroup_FHHLDRelation.EditValue = basicinformationDTO.FHHLDRelation; PublicClass.SetItemChecked(checkedListBoxControl_YQYYZhongLei, basicinformationDTO.YQYYZhongLei, ';'); textEdit_HEHeight.Text = basicinformationDTO.HEHeight; textEdit_HEWeight.Text = basicinformationDTO.HEWeight; textEdit_HEBMI.Text = basicinformationDTO.HEBMI; textEdit_HESsy.Text = basicinformationDTO.HESsy; textEdit_HESzy.Text = basicinformationDTO.HESzy; textEdit_HEBPulse.Text = basicinformationDTO.HeartRate + ""; radioGroup_RYMRSYN.EditValue = basicinformationDTO.RYMRSYN; textEdit_RYMRS.Text = basicinformationDTO.RYMRS; } } public void save() { string Url = "api/service/T_Service_Apoplexy_ArchivesCases/Update"; List list = new List(); ApoplexyBasicinformationDTO model = new ApoplexyBasicinformationDTO(); //model = basicinformationDTO; model.GUID = PatientGuid; model.acLinkName1 = textEdit_acLinkName1.Text + ""; model.acLinkTele1 = textEdit_acLinkTele1.Text + ""; model.BCLinkTele2 = textEdit_BCLinkTele2.Text + ""; model.BCLinkTele3 = textEdit_BCLinkTele3.Text + ""; model.acHzCode = textEdit_acHzCode.Text + ""; model.acTime = timeControl_acTime.TimeValue + ""; model.BCRyType = radioGroup_BCRyType.EditValue + ""; model.BCLyType = radioGroup_BCLyType.EditValue + ""; model.BCWyzyType = radioGroup_BCWyzyType.EditValue + ""; model.BCCyKb = radioGroup_BCCyKb.EditValue + ""; string SyndromeNumber; string Syndrome; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_SFJwBs, ";", out SyndromeNumber, out Syndrome); model.SFJwBs = SyndromeNumber; model.SFQxCs = textEdit_SFQxCs.Text + ""; model.SFQxFirstTime = timeControl_SFQxFirstTime.TimeValue + ""; model.SFCxCs = textEdit_SFCxCs.Text; model.SFCxFirstTime = timeControl_SFCxFirstTime.TimeValue + ""; model.SFTIACs = textEdit_SFTIACs.Text; model.SFTIAFirstYear = timeControl_SFTIAFirstYear.TimeValue + ""; model.SFGxyYear = textEdit_SFGxyYear.Text; model.SFJwBsQiTa = textEdit_SFJwBsQiTa.Text; model.SFTnbYear = textEdit_SFTnbYear.Text; model.LSSmoke = radioGroup_LSSmoke.EditValue + ""; model.LSSmokeYear = textEdit_LSSmokeYear.Text; model.LSSmokeZhi = textEdit_LSSmokeZhi.Text; model.LSSmokeQYear = textEdit_LSSmokeQYear.Text; model.LSDrink = radioGroup_LSDrink.EditValue + ""; model.FHStroke = radioGroup_FHStroke.EditValue + ""; model.FHCHD = radioGroup_FHCHD.EditValue + ""; model.FHHypertension = radioGroup_FHHypertension.EditValue + ""; model.FHDM = radioGroup_FHDM.EditValue + ""; model.FHDyslipidemia = radioGroup_FHDyslipidemia.EditValue + ""; model.FHHLDRelation = radioGroup_FHHLDRelation.EditValue + ""; string SyndromeNumber1; string Syndrome1; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_YQYYZhongLei, ";", out SyndromeNumber1, out Syndrome1); model.YQYYZhongLei = SyndromeNumber1; model.HEHeight = textEdit_HEHeight.Text; model.HEWeight = textEdit_HEWeight.Text; model.HEBMI = textEdit_HEBMI.Text; model.HESsy = textEdit_HESsy.Text; model.HESzy = textEdit_HESzy.Text; model.HeartRate = textEdit_HEBPulse.Text; model.RYMRSYN = radioGroup_RYMRSYN.EditValue + ""; model.RYMRS = textEdit_RYMRS.Text; list.Add(model); ClientFactory httpClient = new HttpClientFactory(); Client client = httpClient.VisitFactory(); //访问 ListEntity t = client.Post(Url, list); if (t.Success) { XtraMessageBox.Show("保存成功!"); } else { XtraMessageBox.Show("保存失败!"); } } private void radioGroup_LSSmoke_SelectedIndexChanged(object sender, EventArgs e) { if (radioGroup_LSSmoke.EditValue + "" == "2") { labelControl53.Visible = true; textEdit_LSSmokeYear.Visible = true; labelControl54.Visible = true; textEdit_LSSmokeZhi.Visible = true; } else { labelControl53.Visible = false; textEdit_LSSmokeYear.Visible = false; labelControl54.Visible = false; textEdit_LSSmokeZhi.Visible = false; } if (radioGroup_LSSmoke.EditValue + "" == "3") { labelControl55.Visible = true; textEdit_LSSmokeQYear.Visible = true; } else { labelControl55.Visible = false; textEdit_LSSmokeQYear.Visible = false; } } private void checkedListBoxControl_SFJwBs_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e) { string SyndromeNumber; string Syndrome; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_SFJwBs, ";", out SyndromeNumber, out Syndrome); var selectValue = SyndromeNumber.Split(';'); foreach (var item in selectValue) { if (item == "01") { labelControl13.Visible = true; textEdit_SFQxCs.Visible = true; labelControl8.Visible = true; labelControl11.Visible = true; timeControl_SFQxFirstTime.Visible = true; } if (item == "02" || item == "03") { labelControl15.Visible = true; textEdit_SFCxCs.Visible = true; labelControl14.Visible = true; labelControl12.Visible = true; timeControl_SFCxFirstTime.Visible = true; } if (item == "05") { labelControl18.Visible = true; textEdit_SFTIACs.Visible = true; labelControl17.Visible = true; labelControl16.Visible = true; timeControl_SFTIAFirstYear.Visible = true; } if (item == "06") { labelControl19.Visible = true; textEdit_SFGxyYear.Visible = true; labelControl20.Visible = true; } if (item == "07") { labelControl21.Visible = true; textEdit_SFTnbYear.Visible = true; labelControl27.Visible = true; } if (item == "99") { labelControl9.Visible = true; textEdit_SFJwBsQiTa.Visible = true; } } } } }