frmMixInIronNo.cs 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using Core.LgMes.Client.LgResMgt;
  9. using System.Threading;
  10. using Core.LgMes.Client.lgClassModel;
  11. using System.Collections;
  12. using System.Reflection;
  13. using CoreFS.CA06;
  14. namespace Core.LgMes.Client.lgJobMgt.弹出窗体
  15. {
  16. public partial class frmMixInIronNo : Form
  17. {
  18. public string SourceID, BlastStoveNo, IronNo, Period, DutyNo, Temperature, PotNo, PotAge;
  19. public string C, Si, Mn, P, S, V;
  20. public string CanWeight, GrossWeight, NetWeight;
  21. public string strMisNo = "";
  22. public frmMixInIronNo()
  23. {
  24. InitializeComponent();
  25. }
  26. protected override void Dispose(bool disposing)
  27. {
  28. if (disposing)
  29. {
  30. if (components != null)
  31. {
  32. components.Dispose();
  33. }
  34. }
  35. base.Dispose(disposing);
  36. }
  37. private void frmMixInIronNo_Load(object sender, EventArgs e)
  38. {
  39. getInIronNoDate();
  40. }
  41. private void getInIronNoDate()
  42. {
  43. string strOut = "", strWhere = "";
  44. //string potid = this.Text.Substring(0, 1) + "#混铁炉";
  45. strWhere = " and wsid<>'" + strMisNo + "'"; //"where MISNO is null";
  46. //hengxing
  47. //CallingMessage par = new CallingMessage();
  48. //par.ServerName = "lgJobMgt";
  49. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  50. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  51. //par.MethodName = "GetInIronNoDate";
  52. //par.args = new object[] { strWhere };
  53. object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  54. if (strOut == "" && obj != null)
  55. {
  56. DataTable furnaceDs = ((DataSet)obj).Tables[0];
  57. ultraGrid1.DataSource = furnaceDs;
  58.  
  59. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "铁水来源";
  60. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 70;
  61. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  62. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "罐号";
  63. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 40;
  64. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  65. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Hidden = true;
  66. this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].Header.Caption = "进铁时间";
  67. this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].Width = 110;
  68. this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  69. this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].Format = "yyyy-MM-dd HH:mm";
  70. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Hidden = true;
  71. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Header.Caption = "皮重";
  72. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Width = 40;
  73. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  74. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Header.Caption = "毛重";
  75. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Width = 40;
  76. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  77. this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Header.Caption = "净重";
  78. this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Width = 40;
  79. this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  80. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Header.Caption = "剩余重量";
  81. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Width = 60;
  82. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  83. this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Hidden = true;
  84. this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Hidden = true;
  85. this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Hidden = true;
  86. this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Hidden = true;
  87. this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Hidden = true;
  88. this.ultraGrid1.DisplayLayout.Bands[0].Columns[14].Hidden = true;
  89. }
  90. }
  91. private void ulbtnOK_Click(object sender, EventArgs e)
  92. {
  93. Infragistics.Win.UltraWinGrid.UltraGridRow arow = ultraGrid1.ActiveRow;
  94. if (arow != null)
  95. {
  96. SourceID = arow.Cells["MISID"].Value.ToString();
  97. BlastStoveNo = arow.Cells["STOVEID"].Value.ToString();
  98. PotNo = arow.Cells["TFPOTID"].Value.ToString();
  99. C = arow.Cells["C"].Value.ToString();
  100. Si = arow.Cells["SI"].Value.ToString();
  101. Mn = arow.Cells["MN"].Value.ToString();
  102. P = arow.Cells["P"].Value.ToString();
  103. S = arow.Cells["S"].Value.ToString();
  104. V = arow.Cells["ASN"].Value.ToString();
  105. Temperature = arow.Cells["IRONTEMPERATURE"].Value.ToString();
  106. CanWeight = arow.Cells["TFPOTGROSSWGT"].Value.ToString();
  107. if (SourceID.Substring(0, 1) == "D")
  108. {
  109. NetWeight = arow.Cells["FOLDPOTWGT"].Value.ToString();
  110. GrossWeight =Convert.ToString( Convert.ToDouble(CanWeight) + Convert.ToDouble(NetWeight));
  111. }
  112. else
  113. {
  114. NetWeight = arow.Cells["TFPOTWGT"].Value.ToString();
  115. GrossWeight = arow.Cells["TFPOTTAREWGT"].Value.ToString();
  116. }
  117. }
  118. this.DialogResult = DialogResult.OK;
  119. }
  120. private void ulbtnCancel_Click(object sender, EventArgs e)
  121. {
  122. this.Close();
  123. }
  124. }
  125. }