PlanInfomation.cs 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Windows.Forms;
  10. using CoreFS.CA06;
  11. using Core.Mes.Client.Comm.Server;
  12. using Core.Mes.Client.Comm.Control;
  13. using Infragistics.Win.UltraWinGrid;
  14. using Core.StlMes.Client.YdmStuffManage.Entity;
  15. namespace Core.StlMes.Client.YdmStuffManage
  16. {
  17. public partial class PlanInfomation: UserControl
  18. {
  19. private Infragistics.Win.UltraWinGrid.UltraGrid _grid = null;
  20. /// <summary>
  21. /// 编辑区GRID
  22. /// </summary>
  23. public Infragistics.Win.UltraWinGrid.UltraGrid Grid
  24. {
  25. get { return _grid; }
  26. }
  27. ///<summary>
  28. /// 计划实体对象
  29. /// </summary>
  30. PlnSteelforOrdEntity _plan = new PlnSteelforOrdEntity();
  31. [Browsable(false)]
  32. [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
  33. public PlnSteelforOrdEntity Value
  34. {
  35. get { return _plan; }
  36. set
  37. {
  38. if (value != null)
  39. {
  40. _plan = value;
  41. UpdateData();
  42. }
  43. }
  44. }
  45. public PlanInfomation()
  46. {
  47. InitializeComponent();
  48. GridHelper.InitCardGrid(MatMesDataSource, ultraGrid4);
  49. _grid = this.ultraGrid4;
  50. }
  51. /// <summary>
  52. /// 刷新控件数据显示
  53. /// </summary>
  54. public void UpdateData()
  55. {
  56. if (_plan != null)
  57. {
  58. //熔炼炉号
  59. MatMesDataSource.Rows[0]["StoveNo"] = _plan.StoveNo;
  60. //物料描述
  61. MatMesDataSource.Rows[0]["MaterialName"] = _plan.MaterialName;
  62. //直径
  63. MatMesDataSource.Rows[0]["Diameter"] = _plan.Diameter;
  64. //总坯长
  65. MatMesDataSource.Rows[0]["LengthM"] = _plan.LengthM;
  66. //单倍坯长
  67. MatMesDataSource.Rows[0]["LenGpSingle"] = _plan.LenGpSingle;
  68. ////品种,钢级,规格,扣型
  69. //string Pz = "";
  70. //Pz = _plan.Varieties + "," + _plan.SteelName + "," + _plan.PipeSize + "," + _plan.BuckleType;
  71. //MatMesDataSource.Rows[0]["Varieties"] = Pz;
  72. //倍尺数
  73. MatMesDataSource.Rows[0]["CutNumGp"] = _plan.CutNumGp;
  74. //钢种
  75. MatMesDataSource.Rows[0]["Gradename"] = _plan.Gradename;
  76. //浇次号
  77. MatMesDataSource.Rows[0]["CastNo"] = _plan.CastNo;
  78. //铸流号
  79. MatMesDataSource.Rows[0]["Flowno"] = _plan.Flowno;
  80. //打印炉号
  81. MatMesDataSource.Rows[0]["FlagStoveNo"] = _plan.FlagStoveNo;
  82. //判定炉号
  83. MatMesDataSource.Rows[0]["JudgeStoveNo"] = _plan.JudgeStoveNo;
  84. MatMesDataSource.Rows[0]["TotMumM"] = _plan.TotMumM;
  85. MatMesDataSource.Rows[0]["TotWeightM"] = _plan.TotWeightM;
  86. ////轧管判定标准
  87. //MatMesDataSource.Rows[0]["RollStandard"] = _plan.RollStandrad;
  88. ////单倍长
  89. //MatMesDataSource.Rows[0]["DbLength"] = _plan.DbLength;
  90. ////制程号
  91. //MatMesDataSource.Rows[0]["ProcessNo"] = _plan.ProcessNo;
  92. ////炼钢判定标准
  93. //MatMesDataSource.Rows[0]["SteelStandard"] = _plan.SteelStandrad;
  94. ////目标长度
  95. //MatMesDataSource.Rows[0]["ContractLength"] = _plan.TargetLength;
  96. ////去向
  97. //MatMesDataSource.Rows[0]["Destination"] = _plan.Target;
  98. ////断面,钢种
  99. //string DM = "";
  100. //DM = _plan.PipeSection + "," + _plan.GradeName;
  101. //MatMesDataSource.Rows[0]["Section"] = DM;
  102. ////成品备注
  103. //MatMesDataSource.Rows[0]["ProductRemark"] = _plan.ReMark;
  104. ////轧制长度
  105. //MatMesDataSource.Rows[0]["RollLength"] = _plan.RollLength;
  106. ////分切数
  107. //MatMesDataSource.Rows[0]["SawSize"] = _plan.SawNum;
  108. ////工艺状态
  109. //MatMesDataSource.Rows[0]["Status"] = _plan.ProcessStatus;
  110. ////支
  111. //MatMesDataSource.Rows[0]["PlanNum"] = _plan.PlanNum;
  112. ////吨
  113. //MatMesDataSource.Rows[0]["PlanTons"] = _plan.PlanTon;
  114. ////目标库
  115. //MatMesDataSource.Rows[0]["TargetLirbrary"] = _plan.TargetLiabrary;
  116. }
  117. }
  118. /// <summary>
  119. /// 控件编辑后更新已修改数据
  120. /// </summary>
  121. public new void Update()
  122. {
  123. ultraGrid4.UpdateData();
  124. }
  125. }
  126. }