using DevComponents.DotNetBar.Layout; using DevComponents.DotNetBar.SuperGrid; 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; using WCS_Client.UC; using WCS_Client.Utility; namespace WCS_Client.Frm { public partial class Frm_ALARAMRE : Form { public Frm_ALARAMRE() { InitializeComponent(); InitFrm(); } private void InitFrm() { List GCList = new List() { SuperGridUtil.Get_GridColumn("ALARAMR_EQUNO", "设备编号", 80), SuperGridUtil.Get_GridColumn("ALARAMR_EQUTYPE", "设备类型", 100), SuperGridUtil.Get_GridColumn("ALARAMR_ALARAMNO", "故障代码", 100), SuperGridUtil.Get_GridColumn("ALARAMR_ALARAMMSG", "故障信息", 400), SuperGridUtil.Get_Datetime_GridColumn("ALARAMR_ALARAMSTARTTIME", "报警时间", 200), SuperGridUtil.Get_Datetime_GridColumn("ALARAMR_ALARAMENDTIME", "结束时间", 200) }; List LCIList = new List(); LCIList.Add(LCItemUtil.Add_TextboxX("ALARAMR_EQUNO", "设备编号:", 20, SubmitMethods, null)); LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "ALARAMR_EQUNO like '%{0}%'" }; LCIList.Add(LCItemUtil.Add_TextboxX("ALARAMR_EQUTYPE", "设备类型:", 20, SubmitMethods, null)); LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "ALARAMR_EQUTYPE like '%{0}%'" }; LCIList.Add(LCItemUtil.Add_ButtonX("btn_QDB", "查询", 80, 30, SubmitMethods)); LCIList.Add(LCItemUtil.Add_ButtonX("btn_QClear", "重置", 80, 30, SubmitMethods)); uC_QueryPage1.Init_QueryPage(30, true, true, "", GCList, LCIList, QueryPageDataMethodsms, RefreshRoleMethodsms, null, null, null); CommonShow.ShowProcessing("正在处理中,请稍候...", this, (obj) => { uC_QueryPage1.RefreshData(1, 0); }, null); } private PageData QueryPageDataMethodsms(int PageIndex, int PageSize) { string _SQLText = string.Format(@"SELECT [ALARAMR_EQUNO],[ALARAMR_EQUTYPE],[ALARAMR_ALARAMNO],[ALARAMR_ALARAMMSG],[ALARAMR_ALARAMSTARTTIME],[ALARAMR_ALARAMENDTIME] FROM [dbo].[WCS_ALARAMRECORD] where 1=1 and [ALARAMR_ALARAMENDTIME] is not null"); string _Orderby = "ALARAMR_ALARAMSTARTTIME desc"; PageData pd = BaseWorkflow.QueryPageData(_SQLText, _Orderby, uC_QueryPage1.GetQueryWhere(), PageIndex, 1000); return pd; } private void SubmitMethods(string LCName) { if (LCName == "btn_QDB") { uC_QueryPage1.RefreshData(); } else if (LCName == "btn_QClear") { uC_QueryPage1.ShowOpaqueLayer(); uC_QueryPage1.ClearLCItemValue(); uC_QueryPage1.RefreshData(1, 0); uC_QueryPage1.HideOpaqueLayer(); } } private void RefreshRoleMethodsms(bool ChkValue) { } } }