| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.LgClassModel;
- using Infragistics.Win;
- using Infragistics.Win.UltraWinGrid;
- namespace Core.StlMes.Client.LgCommon.公共自定义控件.实绩管理
- {
- public partial class ucNewResLfs : ucNewResBase
- {
- public ucNewResLfs()
- {
- InitializeComponent();
- ClsControlPack.SetUltraGridStyle(ugData, 1);
- }
- public StlLfsOptinfoEntity CurrentData = new StlLfsOptinfoEntity();
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- EntityHelper.ShowGridCaption<StlLfsOptinfoEntity>(ugData.DisplayLayout.Bands[0]);
- SetData(new List<object>() { new StlLfsOptinfoEntity() });
- }
- protected override void Refresh()
- {
- QueryDate(_stove, _station);
- }
- public void QueryDate(string Stove, string Station)
- {
- _stove = Stove;
- _station = Station;
- CurrentData = GetStlLfsOptinfoEntity(_stove);
- SetData(new List<object>
- {
- CurrentData
- });
- }
- /// <summary>
- /// 获取StlLfsOptinfoEntity 的实体类
- /// </summary>
- /// <param name="strStoveNo">电炉号</param>
- /// <param name="ob"></param>
- /// <param name="stationcode">工序点 如LF01</param>
- /// <returns></returns>
- public StlLfsOptinfoEntity GetStlLfsOptinfoEntity(string strStoveNo)
- {
- try
- {
- var list =
- EntityHelper.GetData<StlLfsOptinfoEntity>(
- "Core.LgMes.Server.LgDeviceManager.PerformanceManage.SelectStlLfsOptinfoEntity",
- new object[] { strStoveNo }, Ob);
- if ((list == null) || (list.Count <= 0))
- return new StlLfsOptinfoEntity
- {
- StoveNo = strStoveNo,
- Optdate = DateTime.Now
- };
- return list.FirstOrDefault();
- }
- catch (Exception ex)
- {
- return new StlLfsOptinfoEntity { StoveNo = strStoveNo, Optdate = DateTime.Now };
- }
- }
-
- }
- }
|