using System; using System.Collections.Generic; using Core.StlMes.Client.LgCommon; namespace Core.StlMes.Client.LgResMgt { public partial class frmSteelResults : NewResultsBase { public frmSteelResults() { InitializeComponent(); } /// /// 控件的值是否发生变化 /// protected override bool ValueChanged { get { return ucResAdditive.HasChanged || Temperature.Changed; } } /// /// 控件的值是否可以保存数据 /// protected override bool CanSave { get { return ucResAdditive.CanSave && Temperature.CanSave; } } protected override void OnLoad(EventArgs e) { base.OnLoad(e); try { ucResStovePlan1.SetBase(ob, UserName, ShifCode,Process); ucResAdditive.SetBase(ob, Station, UserName, ShifCode, SetHopperDel); ucResAdditive.SetHopperInfo(Station, DtMaterial, ob); } catch { // ignored } } /// /// 配置界面发生变化时 触发的事件 /// private void SetHopperDel() { bool bSuccess; string strMsg; DtMaterial = ClsDataAccessPack.GetMaterialData(out bSuccess, out strMsg, ob).Tables[0]; if (bSuccess) { ucResAdditive.SetHopperInfo(Station, DtMaterial, ob) ; ucResAdditive.ucResAdditiveProcess1.RefeshColumns(Station); ucResAdditive.SetResAdditiveData(Process, CurrentEntity.StoveNo, Station, "01"); } } /// /// 查询温度界面 /// protected override void QueryTemperature() { Temperature.SetData(CurrentEntity.StoveNo, Station, "01", ob); } /// /// 查询添加料界面 /// protected override void Queryother() { ucResAdditive.SetResAdditiveData(Process, CurrentEntity.StoveNo, Station, "01"); } /// /// 当产线发生变化 /// protected override void RestPline() { base.RestPline(); ucResAdditive.SetHopperInfo(Station, DtMaterial, ob); } /// /// 查询炉计划 /// protected override void QueryPlan() { ucResStovePlan1.SetData(new List {CurrentEntity}); } /// /// 保存数据 /// /// 返回消息 /// protected override string SaveAllData(string msg) { msg = base.SaveAllData(msg); if (!ucResAdditive.SaveAdditives()) msg = msg + " 添加料界面数据保存失败"; if (!Temperature.SaveDate()) msg = msg + " 温度界面数据保存失败"; return msg; } } }