| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.LgClassModel;
- namespace Core.StlMes.Client.LgCommon.公共自定义控件.实绩管理
- {
- public partial class ucNewResEaf : ucNewResBase
- {
- public ucNewResEaf()
- {
- InitializeComponent();
- ClsControlPack.SetUltraGridStyle(ugData, 1);
- }
- public StlEafOptinfoEntity CurrentData = new StlEafOptinfoEntity();
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- EntityHelper.ShowGridCaption<StlEafOptinfoEntity>(ugData.DisplayLayout.Bands[0]);
- SetData(new List<object> {new StlEafOptinfoEntity()});
- }
- protected override void Refresh()
- {
- QueryDate(_stove,_station);
- }
- public void QueryDate(string Stove,string Station)
- {
- _stove = Stove;
- _station = Station;
- CurrentData = GetStlEafOptinfoEntity(_stove);
- SetData(new List<object>
- {
- CurrentData
- });
- }
- public StlEafOptinfoEntity GetStlEafOptinfoEntity(string strStoveNo)
- {
- try
- {
- var list =
- EntityHelper.GetData<StlEafOptinfoEntity>(
- "Core.LgMes.Server.LgDeviceManager.PerformanceManage.SelectStlEafOptinfoEntity",
- new object[] {strStoveNo}, Ob);
- if ((list == null) || (list.Count <= 0))
- return new StlEafOptinfoEntity
- {
- StoveNo = strStoveNo,
- Optdate = DateTime.Now
- };
- return list.FirstOrDefault();
- }
- catch (Exception ex)
- {
- return new StlEafOptinfoEntity { StoveNo = strStoveNo, Optdate = DateTime.Now };
- }
- }
- }
- }
|