using System; using System.Collections; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Windows.Forms; using Core.Mes.Client.Comm; using Core.Mes.Client.Comm.Server; using Core.StlMes.Client.LgClassModel; using Core.StlMes.Client.LgCommon; namespace Core.StlMes.Client.LgResMgt { public partial class frmCcmResults : NewResultsBase { private StlCcmOptinfoEntity StlCcmOptinfoEntity = null; private StlCcmMouldinfoEntity StlCcmMouldinfoEntity = null; private string CurrentCast = ""; protected override bool ValueChanged { get { return ucNewResCcm.HasChanged || ucTempManualSampling.Changed || ucNewResCcmCast1.HasChanged; } } /// /// 控件的值是否可以保存数据 /// protected override bool CanSave { get { return ucNewResCcm.AllowSave && ucTempManualSampling.CanSave; } } protected override bool DataOver { get { return ucNewResCcm.CurrentData.Baleleavetime != null && ucNewResCcm.CurrentData.Balepftime != null; } } public frmCcmResults() { InitializeComponent(); Width2 = 286; } protected override void OnLoad(EventArgs e) { Process = LG_PROCESS.CCM; base.OnLoad(e); ucResStovePlanCcm.SetBase(ob, UserName, ShifCode,Process); ucNewResCcmCast1.SetBase(ob, UserName, ShifCode, Process); ucNewResCcm.SetBase(ob, UserName, ShifCode, Process); ucNewResCcm.OperationOver += ucStoveQuery1.GoNext; ucNewResCcm.OperationBegin += ucStoveQuery1.QueryStovePlan; } protected override void QueryTemperature() { ucTempManualSampling.SetData(CurrentEntity.StoveNo, Station, "01", ob); } protected override void QueryPlan() { ucResStovePlanCcm.SetData(new List() { CurrentEntity }); } protected override void Queryother() { ucNewResCcmCast1.QueryDate(CurrentEntity.CastNo); } protected override string SaveAllData(string Msg) { Msg = base.SaveAllData(Msg); /* if (!SaveAdditives()) Msg = Msg + " 添加料界面数据保存失败";*/ if (!ucNewResCcmCast1.SaveStlCcmMouldinfoEntity()) Msg = Msg + " 浇次信息数据保存失败"; if (!ucTempManualSampling.SaveDate()) Msg = Msg + " 温度界面数据保存失败"; return Msg; } /// /// 查询操作界面 /// protected override void QueryOperation() { ucNewResCcm.QueryDate(CurrentEntity.StoveNo, Station); } protected override bool SavePerformance() { return ucNewResCcm.saveDate(); } } }