RollingInfomation.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 Core.StlMes.Client.ZGMil;
  14. using com.steering.mes.zgmil.entity;
  15. using Infragistics.Win.UltraWinGrid;
  16. using Core.StlMes.Client.ZGMil.Common;
  17. namespace Core.StlMes.Client.ZGMil.Result
  18. {
  19. public partial class RollingInfomation: UserControl
  20. {
  21. private Infragistics.Win.UltraWinGrid.UltraGrid _grid = null;
  22. /// <summary>
  23. /// 编辑区GRID
  24. /// </summary>
  25. public Infragistics.Win.UltraWinGrid.UltraGrid Grid
  26. {
  27. get { return _grid; }
  28. }
  29. ///<summary>
  30. /// 计划实体对象
  31. /// </summary>
  32. private MilPlan _plan = new MilPlan();
  33. [Browsable(false)]
  34. [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
  35. public MilPlan Value
  36. {
  37. get { return _plan; }
  38. set
  39. {
  40. if (value != null)
  41. {
  42. _plan = value;
  43. UpdateData();
  44. }
  45. }
  46. }
  47. public RollingInfomation()
  48. {
  49. InitializeComponent();
  50. GridHelper.InitCardGrid(MatMesDataSource, ultraGrid4);
  51. _grid = this.ultraGrid4;
  52. //ultraGrid4.DisplayLayout.
  53. }
  54. /// <summary>
  55. /// 刷新控件数据显示
  56. /// </summary>
  57. public void UpdateData()
  58. {
  59. if (_plan != null)
  60. {
  61. //生产批号
  62. MatMesDataSource.Rows[0]["RollLotNo"]= _plan.LotNo;
  63. //炉号
  64. MatMesDataSource.Rows[0]["HeatNo"] = _plan.JudgeStoveNo;
  65. //监制
  66. MatMesDataSource.Rows[0]["Producer"] = _plan.Producer;
  67. //执行工艺号
  68. MatMesDataSource.Rows[0]["ImpProcess"] = _plan.ImpProcess;
  69. //执行工艺号路径
  70. MatMesDataSource.Rows[0]["ImpProcessPath"] = _plan.ImpProcessPath;
  71. //工序合同号
  72. MatMesDataSource.Rows[0]["ContractNo"] = _plan.ContractNo;
  73. //品种,标准类别 钢级,规格,扣型
  74. string Pz = "";
  75. Pz = _plan.Varieties + "," + _plan.StdStyleDesc + " " + _plan.SteelName + "," + _plan.PipeSize + "," + _plan.BuckleType;
  76. if (_plan.StdStyleDesc == null)
  77. {
  78. Pz = _plan.Varieties + "," + _plan.SteelName + "," + _plan.PipeSize + "," + _plan.BuckleType;
  79. }
  80. MatMesDataSource.Rows[0]["Varieties"] = Pz;
  81. //长度范围
  82. MatMesDataSource.Rows[0]["LengthRange"] = _plan.LengthRange;
  83. //用户
  84. MatMesDataSource.Rows[0]["FinishUser"] = _plan.FinishUser;
  85. //轧管判定标准
  86. MatMesDataSource.Rows[0]["RollStandard"] = _plan.RollStandrad;
  87. //单倍长
  88. MatMesDataSource.Rows[0]["DbLength"] = _plan.DbLength;
  89. //制程号
  90. MatMesDataSource.Rows[0]["ProcessNo"] = _plan.ProcessNo;
  91. //炼钢判定标准
  92. MatMesDataSource.Rows[0]["SteelStandard"] = _plan.SteelStandrad;
  93. //目标长度
  94. MatMesDataSource.Rows[0]["ContractLength"] = _plan.TargetLength;
  95. //去向
  96. MatMesDataSource.Rows[0]["Destination"] = _plan.Target;
  97. //断面,钢种
  98. string DM = "";
  99. DM = _plan.PipeSection + "," + _plan.GradeName;
  100. MatMesDataSource.Rows[0]["Section"] = DM;
  101. //成品备注
  102. MatMesDataSource.Rows[0]["ProductRemark"] = _plan.ReMark;
  103. //轧制长度
  104. MatMesDataSource.Rows[0]["RollLength"] = _plan.RollLength;
  105. //分切数
  106. MatMesDataSource.Rows[0]["SawSize"] = _plan.SawNum;
  107. //工艺状态
  108. MatMesDataSource.Rows[0]["Status"] = _plan.ProcessStatus;
  109. //支
  110. MatMesDataSource.Rows[0]["PlanNum"] = _plan.PlanNum;
  111. //吨
  112. MatMesDataSource.Rows[0]["PlanTons"] = _plan.PlanTon;
  113. //目标库
  114. MatMesDataSource.Rows[0]["TargetLirbrary"] = _plan.TargetLiabrary;
  115. }
  116. else
  117. {
  118. //GridHelper.InitCardGrid(ultraDataSource1, ultraGrid1);
  119. }
  120. }
  121. /// <summary>
  122. /// 控件编辑后更新已修改数据
  123. /// </summary>
  124. public new void Update()
  125. {
  126. ultraGrid4.UpdateData();
  127. }
  128. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  129. {
  130. string CraftPath = _plan.ImpProcessPath.ToString().Trim();
  131. if (CraftPath == "" )
  132. {
  133. return;
  134. }
  135. BaseMethod.ViewCarft_No(CraftPath);
  136. }
  137. }
  138. }