using DevExpress.XtraEditors; using HL_FristAidPlatform_DTO; using HL_FristAidPlatform_Public; using Newtonsoft.Json; using Newtonsoft.Json.Linq; 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_FollowUp { public partial class Form_Apoplexy_FollowUpDetailUpdateDate : XtraForm { public Form_Apoplexy_FollowUpDetailUpdateDate() { InitializeComponent(); } public string GUID; public string PatientGuid; public Form_Apoplexy_FollowUpDetailUpdateDate(string _guid,string _patientGuid) { InitializeComponent(); GUID = _guid; PatientGuid = _patientGuid; } private void Form_Apoplexy_FollowUpDetailUpdateDate_Load(object sender, EventArgs e) { } private void simpleButton1_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(timeControl1.TimeValue.ToString())) { //1、获取所需值 List list = new List(); T_Service_Apoplexy_FollowUpBaseDTO dto = new T_Service_Apoplexy_FollowUpBaseDTO(); dto.NextTime = Convert.ToDateTime(timeControl1.TimeValue.ToString()); dto.GUID = GUID; dto.PatientGuid = PatientGuid; dto.HospitalGuid = Information.Hospital.GUID; list.Add(dto); string Url = "api/service/T_Service_Apoplexy_FollowUpBase/Update"; //初始化两个工厂 ClientFactory httpClient = new HttpClientFactory(); Client client = httpClient.VisitFactory(); //访问 ListEntity t = client.Post(Url, list); if (t.Success) { //XtraMessageBox.Show("7天后随访计划保存成功"); JObject jo = (JObject)JsonConvert.DeserializeObject(t.DataString); string msg = jo["Msg"].ToString(); if (!string.IsNullOrEmpty(msg)) { XtraMessageBox.Show(msg); } this.Close(); } } else { XtraMessageBox.Show("下次随访日期不能为空"); } } } }