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_Part4 : UserControl { string PatientGuid; //ApoplexyBasicinformationDTO basicinformationDTO; public UserControl_Part4(string _PatientGuid) { InitializeComponent(); PatientGuid = _PatientGuid; } private void UserControl_Part4_Load(object sender, EventArgs e) { ApoplexyBasicinformationDTO basicinformationDTO = DBHelpClass.GetDateModel(string.Format("api/service/T_Service_Apoplexy_ArchivesCases/GetByPatientGuidTo2?PatientGuid={0}", PatientGuid)); if (basicinformationDTO != null) { radioGroup_YYXueXiaoBan.EditValue = basicinformationDTO.YYXueXiaoBan; PublicClass.SetItemChecked(checkedListBoxControl_YYXxbYm, basicinformationDTO.YYXxbYm, ';'); radioGroup_YYXxbYm48Gy.EditValue = basicinformationDTO.YYXxbYm48Gy; radioGroup_YYKangNing.EditValue = basicinformationDTO.YYKangNing; PublicClass.SetItemChecked(checkedListBoxControl_YYKnYm, basicinformationDTO.YYKnYm, ';'); radioGroup_YYJiangYa.EditValue = basicinformationDTO.YYJiangYa; PublicClass.SetItemChecked(checkedListBoxControl_YYJyZl, basicinformationDTO.YYJyZl, ';'); radioGroup_YYTiaoZhi.EditValue = basicinformationDTO.YYTiaoZhi; PublicClass.SetItemChecked(checkedListBoxControl_YYTzZl, basicinformationDTO.YYTzZl, ';'); radioGroup_YYJiangTang.EditValue = basicinformationDTO.YYJiangTang; PublicClass.SetItemChecked(checkedListBoxControl_YYJtZl, basicinformationDTO.YYJtZl, ';'); PublicClass.SetItemChecked(checkedListBoxControl_BFZZhengZhunag, basicinformationDTO.BFZZhengZhunag, ';'); textEdit_BFZQiTa.Text = basicinformationDTO.BFZQiTa; radioGroup_KFZLYN.EditValue = basicinformationDTO.KFZLYN; PublicClass.SetItemChecked(checkedListBoxControl_KFWays, basicinformationDTO.KFWays, ';'); PublicClass.SetItemChecked(checkedListBoxControl_KFPlace, basicinformationDTO.KFPlace, ';'); radioGroup_JYEduYN.EditValue = basicinformationDTO.JYEduYN; PublicClass.SetItemChecked(checkedListBoxControl_JYEduWays, basicinformationDTO.JYEduWays, ';'); timeControl_CYTime.TimeValue = basicinformationDTO.CYTime; radioGroup_CYLyFs.EditValue = basicinformationDTO.CYLyFs; timeControl_CYSwSj.TimeValue = basicinformationDTO.CYSwSj; PublicClass.SetItemChecked(checkedListBoxControl_CYSwYy, basicinformationDTO.CYSwYy, ';'); textEdit_CYSwYyOther.Text = basicinformationDTO.CYSwYyOther; } } public void save() { string Url = "api/service/T_Service_Apoplexy_ArchivesCases/Update"; List list = new List(); ApoplexyBasicinformationDTO model = new ApoplexyBasicinformationDTO(); model.GUID = PatientGuid; model.YYXueXiaoBan = radioGroup_YYXueXiaoBan.EditValue + ""; string SyndromeNumber; string Syndrome; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_YYXxbYm, ";", out SyndromeNumber, out Syndrome); model.YYXxbYm = SyndromeNumber; model.YYXxbYm48Gy = radioGroup_YYXxbYm48Gy.EditValue + ""; model.YYKangNing = radioGroup_YYKangNing.EditValue + ""; string SyndromeNumber1; string Syndrome1; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_YYKnYm, ";", out SyndromeNumber1, out Syndrome1); model.YYKnYm = SyndromeNumber1; model.YYJiangYa = radioGroup_YYJiangYa.EditValue + ""; string SyndromeNumber2; string Syndrome2; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_YYJyZl, ";", out SyndromeNumber2, out Syndrome2); model.YYJyZl = SyndromeNumber2; model.YYTiaoZhi = radioGroup_YYTiaoZhi.EditValue + ""; string SyndromeNumber3; string Syndrome3; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_YYTzZl, ";", out SyndromeNumber3, out Syndrome3); model.YYTzZl = SyndromeNumber3; model.YYJiangTang = radioGroup_YYJiangTang.EditValue + ""; string SyndromeNumber4; string Syndrome4; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_YYJtZl, ";", out SyndromeNumber4, out Syndrome4); model.YYJtZl = SyndromeNumber4; string SyndromeNumber5; string Syndrome5; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_BFZZhengZhunag, ";", out SyndromeNumber5, out Syndrome5); model.BFZZhengZhunag = SyndromeNumber5; model.BFZQiTa = textEdit_BFZQiTa.Text; model.KFZLYN = radioGroup_KFZLYN.EditValue + ""; string SyndromeNumber6; string Syndrome6; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_KFWays, ";", out SyndromeNumber6, out Syndrome6); model.KFWays = SyndromeNumber6; string SyndromeNumber7; string Syndrome7; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_KFPlace, ";", out SyndromeNumber7, out Syndrome7); model.KFPlace = SyndromeNumber7; model.JYEduYN = radioGroup_JYEduYN.EditValue + ""; string SyndromeNumber8; string Syndrome8; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_JYEduWays, ";", out SyndromeNumber8, out Syndrome8); model.JYEduWays = SyndromeNumber8; model.CYTime = timeControl_CYTime.TimeValue; model.CYLyFs = radioGroup_CYLyFs.EditValue + ""; model.CYSwSj = timeControl_CYSwSj.TimeValue; string SyndromeNumber9; string Syndrome9; PublicClass.GetCheckedListBoxItemValues(checkedListBoxControl_CYSwYy, ";", out SyndromeNumber9, out Syndrome9); model.CYSwYy = SyndromeNumber9; model.CYSwYyOther = textEdit_CYSwYyOther.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("保存失败!"); } } } }