frmCcmResults.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1.  using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Drawing;
  5. using System.Linq;
  6. using System.Windows.Forms;
  7. using Core.Mes.Client.Comm;
  8. using Core.Mes.Client.Comm.Server;
  9. using Core.StlMes.Client.LgClassModel;
  10. using Core.StlMes.Client.LgCommon;
  11. namespace Core.StlMes.Client.LgResMgt
  12. {
  13. public partial class frmCcmResults : NewResultsBase
  14. {
  15. private StlCcmOptinfoEntity StlCcmOptinfoEntity = null;
  16. private StlCcmMouldinfoEntity StlCcmMouldinfoEntity = null;
  17. private string CurrentCast = "";
  18. protected override bool ValueChanged
  19. {
  20. get { return ucNewResCcm.HasChanged || ucTempManualSampling.Changed || ucNewResCcmCast1.HasChanged; }
  21. }
  22. /// <summary>
  23. /// 控件的值是否可以保存数据
  24. /// </summary>
  25. protected override bool CanSave
  26. {
  27. get { return ucNewResCcm.AllowSave && ucTempManualSampling.CanSave; }
  28. }
  29. protected override bool DataOver
  30. {
  31. get
  32. {
  33. return ucNewResCcm.CurrentData.Baleleavetime != null &&
  34. ucNewResCcm.CurrentData.Balepftime != null;
  35. }
  36. }
  37. public frmCcmResults()
  38. {
  39. InitializeComponent();
  40. Width2 = 286;
  41. }
  42. protected override void OnLoad(EventArgs e)
  43. {
  44. Process = LG_PROCESS.CCM;
  45. base.OnLoad(e);
  46. ucResStovePlanCcm.SetBase(ob, UserName, ShifCode,Process);
  47. ucNewResCcmCast1.SetBase(ob, UserName, ShifCode, Process);
  48. ucNewResCcm.SetBase(ob, UserName, ShifCode, Process);
  49. ucNewResCcm.OperationOver += ucStoveQuery1.GoNext;
  50. ucNewResCcm.OperationBegin += ucStoveQuery1.QueryStovePlan;
  51. }
  52. protected override void QueryTemperature()
  53. {
  54. ucTempManualSampling.SetData(CurrentEntity.StoveNo, Station, "01", ob);
  55. }
  56. protected override void QueryPlan()
  57. {
  58. ucResStovePlanCcm.SetData(new List<object>() { CurrentEntity });
  59. }
  60. protected override void Queryother()
  61. {
  62. ucNewResCcmCast1.QueryDate(CurrentEntity.CastNo);
  63. }
  64. protected override string SaveAllData(string Msg)
  65. {
  66. Msg = base.SaveAllData(Msg);
  67. /* if (!SaveAdditives()) Msg = Msg + " 添加料界面数据保存失败";*/
  68. if (!ucNewResCcmCast1.SaveStlCcmMouldinfoEntity()) Msg = Msg + " 浇次信息数据保存失败";
  69. if (!ucTempManualSampling.SaveDate()) Msg = Msg + " 温度界面数据保存失败";
  70. return Msg;
  71. }
  72. /// <summary>
  73. /// 查询操作界面
  74. /// </summary>
  75. protected override void QueryOperation()
  76. {
  77. ucNewResCcm.QueryDate(CurrentEntity.StoveNo, Station);
  78. }
  79. protected override bool SavePerformance()
  80. {
  81. return ucNewResCcm.saveDate();
  82. }
  83. }
  84. }