| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- 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 ucNewResVds : ucNewResBase
- {
- public ucNewResVds()
- {
- InitializeComponent();
- ClsControlPack.SetUltraGridStyle(ugData, 1);
- }
- public StlVdsOptinfoEntity CurrentData = new StlVdsOptinfoEntity();
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- EntityHelper.ShowGridCaption<StlVdsOptinfoEntity>(ugData.DisplayLayout.Bands[0]);
- SetData(new List<object>() { new StlVdsOptinfoEntity() });
- }
- protected override void Refresh()
- {
- QueryDate(_stove, _station);
- }
- public void QueryDate(string Stove, string Station)
- {
- _stove = Stove;
- _station = Station;
- CurrentData = GetStlVdsOptinfoEntity(_stove);
- SetData(new List<object>
- {
- CurrentData
- });
- }
- /// <summary>
- /// 获取StlVdsOptinfoEntity 的实体类
- /// </summary>
- /// <param name="strStoveNo">电炉号</param>
- /// <param name="ob"></param>
- /// <param name="stationcode">工序点 如VD01</param>
- /// <returns></returns>
- public StlVdsOptinfoEntity GetStlVdsOptinfoEntity(string strStoveNo)
- {
- try
- {
- var list =
- EntityHelper.GetData<StlVdsOptinfoEntity>(
- "Core.LgMes.Server.LgDeviceManager.PerformanceManage.SelectStlVdsOptinfoEntity",
- new object[] { strStoveNo }, Ob);
- if ((list == null) || (list.Count <= 0))
- return new StlVdsOptinfoEntity
- {
- StoveNo = strStoveNo,
- Optdate = DateTime.Now
- };
- return list.FirstOrDefault();
- }
- catch (Exception ex)
- {
- return new StlVdsOptinfoEntity { StoveNo = strStoveNo, Optdate = DateTime.Now };
- }
- }
-
- }
- }
|