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_Base { public partial class Form_TriageGoing : XtraForm { public Form_TriageGoing() { InitializeComponent(); } private void Form_InpatientDepartment_Load(object sender, EventArgs e) { DataTable ResultDT = DBHelpClass.Get("/api/admin/T_SYS_SystemModule/GetIsHaveTimeAxisList?isHaveTimeAxis=0"); PublicClass.SetLookUpList(ref lookUpEdit1, ResultDT, 0, 2, false); GetList(); } private void btn_Insert_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Form_TriageGoingInfo frm = new Form_TriageGoingInfo(0, "", 0, ""); frm.Owner = this; frm.Show(); } public void GetList() { long systemId = 0; if (!string.IsNullOrEmpty(lookUpEdit1.Text)) { systemId = long.Parse(lookUpEdit1.EditValue.ToString()); } List list = DBHelpClass.GetList(string.Format("api/base/T_Base_DiagnosisAndTriageGo/GetTriageGoList1?name={0}&systemId={1}", textEdit1.Text, systemId)); gridControl1.DataSource = list; } private void btn_Select_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { GetList(); } private void btn_Update_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (gridView1.DataRowCount > 0) { int selectRow = gridView1.GetSelectedRows()[0]; int id = int.Parse(gridView1.GetRowCellValue(selectRow, "ID") + "", 0); string name = gridView1.GetRowCellValue(selectRow, "Name") + ""; long systemId = long.Parse(gridView1.GetRowCellValue(selectRow, "SystemModuleID") + "", 0); string guid = gridView1.GetRowCellValue(selectRow, "GUID") + ""; Form_TriageGoingInfo frm = new Form_TriageGoingInfo(id, name, systemId, guid); frm.Owner = this; frm.Show(); } } private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) { if (e.Column.FieldName == "SystemModuleID") { string value = e.Value.ToString(); if (value == PublicClassForDataBase.Config10001) e.DisplayText = "胸痛系统"; if (value == PublicClassForDataBase.Config10002) e.DisplayText = "卒中系统"; if (value == PublicClassForDataBase.Config10003) e.DisplayText = "创伤系统"; if (value == PublicClassForDataBase.Config10004) e.DisplayText = "危重孕产妇系统"; if (value == PublicClassForDataBase.Config10005) e.DisplayText = "危重新生儿系统"; if (value == PublicClassForDataBase.Config10020) e.DisplayText = "急诊分诊系统"; if (value == PublicClassForDataBase.Config10007) e.DisplayText = "院前急救系统"; } } } }