using HL_FristAidPlatform_DTO; using HL_FristAidPlatform_Public; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Windows.Forms; namespace HL_FristAidPlatform_ChestPain_Statistics { public partial class Form_ChestPain_Statistics_Report09 : Form { string dateEdit_start = ""; string dateEdit_end = ""; //string screen = ""; ReprotModel reprotModel = new ReprotModel(); public Form_ChestPain_Statistics_Report09(string startTime, string endTime) { dateEdit_start = startTime; dateEdit_end = endTime; InitializeComponent(); } private void Form_ChestPain_Statistics_Report01_Load(object sender, EventArgs e) { Report(); } /// /// 溶栓治疗的全部STEMI患者进门-溶栓时间 /// /// /// public void Report() { try { var itemJson = DBHelpClass.GetModel("api/service/T_Service_ChestPain_Prehospital/GetReport?startTime=" + dateEdit_start + "&endTime=" + dateEdit_end + "&reportName=ChestPain_Report09"); reprotModel = JsonConvert.DeserializeObject(itemJson); DataTable data = new DataTable("table1"); data.Columns.Add("月份", typeof(string)); data.Columns.Add("百分比", typeof(float)); List reprotMonths = new List(); reprotMonths = reprotModel.reprotMonths; if (reprotMonths != null) { foreach (ReprotMonth item in reprotMonths) { DataRow dataRow = data.NewRow(); dataRow["月份"] = item.月份; dataRow["百分比"] = Math.Round(Convert.ToDouble(item.百分比) / 100, 2); data.Rows.Add(dataRow); } } chartControl1.Series["实际情况"].ValueDataMembers[0] = "百分比"; chartControl1.Series["实际情况"].ArgumentDataMember = "月份"; chartControl1.Series["实际情况"].DataSource = data; gridControl1.DataSource = reprotModel.reprotMonths; } catch (Exception ex) { PublicClass.WriteErrorLog(Text, "在再灌注时间窗(12小时)以内到达的STEMI患者早期再灌注治疗比列" + ex); } } private void gridControl1_MouseDoubleClick(object sender, MouseEventArgs e) { if (gridView1.DataSource != null) { gridControl2.Visible = true; int selectRow = gridView1.GetSelectedRows()[0]; string date = gridView1.GetRowCellValue(selectRow, "月份").ToString(); if (!string.IsNullOrEmpty(date) && reprotModel.reportDetails != null) { var query = reprotModel.reportDetails.Where(details => details.月份 == date); gridControl2.DataSource = query; } } } private void gridControl2_MouseDoubleClick(object sender, MouseEventArgs e) { if (gridView2.DataSource != null) { //int selectRow = gridView2.GetSelectedRows()[0]; //long PatientID = PublicClass.ToInt64(gridView2.GetRowCellValue(selectRow, "ID").ToString(), 0); //string PatientGuid = gridView2.GetRowCellValue(selectRow, "GUID").ToString(); //string HospitalGuid = gridView2.GetRowCellValue(selectRow, "HospitalGuid").ToString(); //if (PatientID > 0) //{ // Form_ChestPain_PatientMain detail = new Form_ChestPain_PatientMain(PatientID, PatientGuid, HospitalGuid, Enumerate.PatientMainState.急救信息); // detail.ShowDialog(); // //查询 // simpleButton_Search_Click(null, null); // //定位 // PublicClass.LocationForGridView(gridView2, PatientID.ToString(),0); //} } } } }