frmZhiduiIron.cs 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081
  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 frmZhiduiIron : CoreFS.CA06.FrmBase
  17. {
  18. #region defineData
  19. private Thread _getDataThread; // 取数据线程
  20. private bool _bIfGetData = true; // 控制取数据线程循环的标志
  21. private string[] ArrayIronRow = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存铁运进铁数据
  22. private string[] ArrayIronRow3 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存直兑出铁数据
  23. private string[] ArrayIronRow4 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存发送到转炉铁水数据
  24. private string User ="";//操作人
  25. private ArrayList alZDIn = new ArrayList(); //保存修改的直兑铁运进铁
  26. private string _strSendSucceededForBof1 = "";
  27. private string _strSendSucceededForBof2 = "";
  28. private string _strSendSucceededForBof3 = "";
  29. private string _strSendSucceededForHmp1 = "";
  30. private string _strSendSucceededForHmp2 = "";
  31. private string _strHmp1No = "";
  32. private string _strHmp2No = "";
  33. private bool blModify = false;
  34. #endregion
  35. #region formload
  36. public frmZhiduiIron()
  37. {
  38. InitializeComponent();
  39. CheckForIllegalCrossThreadCalls = false;
  40. }
  41. private void frmZhiduiIron_Load(object sender, EventArgs e)
  42. {
  43. try
  44. {
  45. User = this.UserInfo.GetUserName();
  46. lblZDJT.Text ="D" + this.Text.Substring(0, 1);
  47. lblZDCT.Text = "Z" + this.Text.Substring(0, 1);
  48. ultraDataSource1.Rows.Add(new object[] { "", "", "", "", "", "", "", "", null });
  49. StartUpThread();
  50. SetUserControlDelegate();
  51. timer1_Tick(null, new EventArgs());
  52. this.timer1.Start();
  53. setbutton("1");
  54. setucInIron("1");
  55. SetColumnModeShift(ucInIron1.ultraGrid1);
  56. SetColumnModeGroup(ucInIron1.ultraGrid1);
  57. SetColumnModequxiang();
  58. GetInIronData();
  59. setucHtInIron3("1");
  60. setbutton3("1");
  61. SetColumnModeShift(ucZDOutIron1.ultraGrid1);
  62. SetColumnModeGroup(ucZDOutIron1.ultraGrid1);
  63. SetColumnModeOutquxiang();
  64. GetHtOutIronData();
  65. GetElementData();
  66. }
  67. catch
  68. {
  69. }
  70. }
  71. #endregion
  72. #region dataevent
  73. private void RefreshHighheatNo()
  74. {
  75. string sqlstr = "";
  76. int nFurnaceNo = 0;
  77. try
  78. {
  79. if (this.rdoFNo1.Checked) nFurnaceNo = 1;
  80. if (this.rdoFNo2.Checked) nFurnaceNo = 2;
  81. if (this.rdoFNo3.Checked) nFurnaceNo = 3;
  82. if (this.rdoFNo4.Checked) nFurnaceNo = 4;
  83. if (this.rdoFNo5.Checked) nFurnaceNo = 5;
  84. if (this.rdoFNo6.Checked) nFurnaceNo = 6;
  85. if (this.rdoFNo7.Checked) nFurnaceNo = 7;
  86. if (this.rdoFNo8.Checked) nFurnaceNo = 6;
  87. if (this.rdoFNo9.Checked) nFurnaceNo = 7;
  88. if (this.radioButton1.Checked) nFurnaceNo = 0;
  89. if (nFurnaceNo > 0)
  90. {
  91. sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
  92. + " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
  93. + " from ( select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
  94. + " from job_chemelement "
  95. + " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
  96. + " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
  97. + " to_char(sysdate, 'YYYYMMDDHH24MISS') "
  98. + " and Assaytypecode like '%%A%%' and substr(checkno,1,1)='" + nFurnaceNo + "'"
  99. + " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
  100. + " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
  101. }
  102. else
  103. {
  104. sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
  105. + " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
  106. + " from (select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
  107. + " from job_chemelement "
  108. + " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
  109. + " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
  110. + " to_char(sysdate, 'YYYYMMDDHH24MISS') "
  111. + " and Assaytypecode like '%%A%%' "
  112. + " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
  113. + " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
  114. }
  115. string htOut = "", htWhere = "";
  116. //hengxing
  117. //CallingMessage par = new CallingMessage();
  118. //par.ServerName = "lgJobMgt";
  119. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  120. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  121. //par.MethodName = "GetHighHeatNo";
  122. //par.args = new object[] { sqlstr, htWhere };
  123. object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod(par, out htOut);
  124. if (htOut == "" && obj != null)
  125. {
  126. DataTable furnaceDs = ((DataSet)obj).Tables[0];
  127. ultraGrid1.DataSource = furnaceDs;
  128. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "高炉号/批次";
  129. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 60;
  130. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  131. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "C";
  132. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 50;
  133. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.Caption = "Si";
  134. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Width = 50;
  135. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Header.Caption = "Mn";
  136. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Width = 50;
  137. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Header.Caption = "P";
  138. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Width = 50;
  139. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Header.Caption = "S";
  140. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Width = 50;
  141. this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Header.Caption = "As";
  142. this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Width = 50;
  143. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Header.Caption = "化验时间";
  144. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Width = 60;
  145. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  146. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Format = "dd HH:mm";
  147. this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].Hidden = true;
  148. this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Header.Caption = "铁罐号";
  149. this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Width = 60;
  150. this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Header.Caption = "铁水总重";
  151. this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Width = 60;
  152. this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Header.Caption = "铁罐皮重";
  153. this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Width = 60;
  154. this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Header.Caption = "铁水净重";
  155. this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Width = 60;
  156. this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Header.Caption = "出铁时间";
  157. this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Width = 60;
  158. }
  159. }
  160. catch { return; }
  161. }
  162. private void GetRealData()
  163. {
  164. if (this.Text == "") return;
  165. string Wsid = this.Text.Substring(0, 1);
  166. string strwhere = "where wsid ='" + Wsid + "'";
  167. string err = "";
  168. try
  169. {
  170. //hengxing
  171. //CallingMessage par = new CallingMessage();
  172. //par.ServerName = "lgJobMgt";
  173. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  174. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  175. //par.MethodName = "GetRealData";
  176. //par.args = new object[] { strwhere };
  177. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  178. ultraDataSource1.Rows.Clear();
  179. if (ds.Tables.Count > 0)
  180. {
  181. foreach (DataRow dr in ds.Tables[0].Rows)
  182. {
  183. ultraDataSource1.Rows.Add(new object[] {
  184. dr["IRONWGT"].ToString(),
  185. dr["GASSTRESS"].ToString(),
  186. dr["IMPORTIRONTOTAL"].ToString(),
  187. dr["EXPORTIRONTOTAL"].ToString(),
  188. dr["SKIPIRONTOTAL"].ToString(),
  189. dr["IRONTEMPERATURE"].ToString(),
  190. dr["GASFLUX"].ToString(),
  191. dr["GASCONSUME"].ToString(),
  192. dr["UPDATETIME"].ToString()
  193. });
  194. }
  195. }
  196. }
  197. catch (Exception ex)
  198. {
  199. Console.WriteLine(ex.Message);
  200. }
  201. }
  202. #endregion
  203. #region gridevent
  204. private void ultHtOutIronGrid_Click(object sender, EventArgs e)
  205. {
  206. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
  207. if (aRow == null) return;
  208. ultSelectIron.Text = aRow.Cells["InIronNo"].Text;
  209. ArrayIronRow4[0] = aRow.Cells["InIronNo"].Text;
  210. ArrayIronRow4[1] = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  211. ArrayIronRow4[2] = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  212. ArrayIronRow4[3] = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  213. ArrayIronRow4[6] = aRow.Cells["ReturnHeatNo"].Text;
  214. ArrayIronRow4[7] = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
  215. ArrayIronRow4[8] = aRow.Cells["LDLing"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDLing"].Text : "0";
  216. }
  217. private void ultHtElementIron_AfterRowActivate(object sender, EventArgs e)
  218. {
  219. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtElementIron.ActiveRow;
  220. if (aRow == null) return;
  221. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text != "自动") return;
  222. try
  223. {
  224. ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  225. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  226. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  227. ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  228. ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  229. ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  230. ucZDOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["CHECKNO"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
  231. }
  232. catch
  233. {
  234. }
  235. }
  236. private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
  237. {
  238. if (blModify == false)
  239. {
  240. setbutton("2");
  241. setucInIron("2");
  242. string shiftgroup = getshift();
  243. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
  244. try
  245. {
  246. SetMisnoNoEdite();
  247. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
  248. ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
  249. ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", shiftgroup);
  250. ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", shiftgroup);
  251. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0, 1);
  252. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
  253. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
  254. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
  255. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
  256. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
  257. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
  258. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
  259. ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
  260. ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
  261. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
  262. }
  263. catch
  264. { }
  265. }
  266. else
  267. {
  268. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0, 1);
  269. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
  270. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
  271. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
  272. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
  273. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
  274. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
  275. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
  276. ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
  277. ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
  278. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
  279. }
  280. }
  281. /// <summary>
  282. /// 取相关数据到编辑区 铁运进铁数据
  283. /// </summary>
  284. /// <param name="sender"></param>
  285. /// <param name="e"></param>
  286. private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
  287. {
  288. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultraGrid2.ActiveRow;
  289. if (aRow == null) return;
  290. if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
  291. try
  292. {
  293. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = aRow.Cells["InIronNo"].Text;
  294. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = aRow.Cells["HighNo"].Text;
  295. ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  296. ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
  297. ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  298. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  299. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  300. ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = aRow.Cells["InTime"].Text;
  301. ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
  302. ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
  303. ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
  304. ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = aRow.Cells["FOLDPOTWGT"].Text;
  305. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  306. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  307. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  308. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  309. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  310. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  311. }
  312. catch { }
  313. }
  314. private void ultHtOutIronGrid_AfterRowActivate(object sender, EventArgs e)
  315. {
  316. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
  317. // Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
  318. if (aRow == null) return;
  319. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
  320. try
  321. {
  322. ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
  323. ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
  324. ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = aRow.Cells["IronSource"].Text;
  325. ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = aRow.Cells["StoveNo"].Text;
  326. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
  327. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
  328. ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
  329. ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
  330. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  331. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  332. // ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  333. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
  334. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  335. ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  336. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
  337. ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  338. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  339. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  340. ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  341. ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  342. ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  343. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
  344. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
  345. ucZDOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["CHECKNO"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
  346. }
  347. catch { }
  348. }
  349. #endregion
  350. #region function
  351. /// <summary>
  352. /// 发送CVT炉号
  353. /// </summary>
  354. private void SendIronToCvt()
  355. {
  356. string strError = "";
  357. string strWz = "";
  358. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "SendZDIronToCVT", new object[] { ArrayIronRow4 }, out strError);
  359. if (strError == "")
  360. {
  361. if (ArrayIronRow4[4].Substring(0, 1) == "H")
  362. strWz = ArrayIronRow4[4].Substring(0, 2);
  363. else
  364. strWz = ArrayIronRow4[4].Substring(2, 1);
  365. switch (strWz)
  366. {
  367. case "H1":
  368. _strSendSucceededForHmp1 = "Y";
  369. break;
  370. case "H2":
  371. _strSendSucceededForHmp2 = "Y";
  372. break;
  373. case "1":
  374. _strSendSucceededForBof1 = "Y";
  375. break;
  376. case "2":
  377. _strSendSucceededForBof2 = "Y";
  378. break;
  379. case "3":
  380. _strSendSucceededForBof3 = "Y";
  381. break;
  382. default:
  383. break;
  384. }
  385. MessageBox.Show("成功发送铁水!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  386. }
  387. else
  388. MessageBox.Show("发送失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  389. }
  390. private void StartUpThread()
  391. {
  392. ThreadStart ts = new ThreadStart(GetDataThread);
  393. _getDataThread = new Thread(ts);
  394. _getDataThread.Name = "GetDataThread ";
  395. _getDataThread.Start();
  396. }
  397. private void GetDataThread()
  398. {
  399. while (_bIfGetData)
  400. {
  401. if (!this.On_Off_Thread)//this.On_Off_Thread
  402. {
  403. System.Threading.Thread.Sleep(5000);
  404. continue;
  405. }
  406. try
  407. {
  408. // RefreshHighheatNo();
  409. GetRealData();
  410. GetCVTHeatno();
  411. Thread.Sleep(10000);
  412. }
  413. catch { }
  414. }
  415. }
  416. /// <summary>
  417. /// 获取冶炼炉号
  418. /// </summary>
  419. /// <param name="sender"></param>
  420. /// <param name="e"></param>
  421. ///
  422. private void GetCVTHeatno()
  423. {
  424. try
  425. {
  426. while (true)
  427. {
  428. this.txtCVT1.Text = "";
  429. this.txtCVT1.Appearance.BackColor = Color.LightGray;
  430. this.txtCVT2.Text = "";
  431. this.txtCVT2.Appearance.BackColor = Color.LightGray;
  432. this.txtCVT3.Text = "";
  433. this.txtCVT3.Appearance.BackColor = Color.LightGray;
  434. this.txtHMP1.Text = "";
  435. this.txtHMP1.Appearance.BackColor = Color.LightGray;
  436. this.txtHMP2.Text = "";
  437. this.txtHMP2.Appearance.BackColor = Color.LightGray;
  438. string strError = "";
  439. DataSet ds = null;// (DataSet)Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "getCVTHMPCurrentLH", new object[] { }, out strError);
  440. if (strError == "")
  441. {
  442. if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
  443. {
  444. for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
  445. {
  446. string v_LH = "";
  447. string v_POS = ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1);
  448. string v_POSID = ds.Tables[0].Rows[i]["objectpos"].ToString().Substring(3, 2);
  449. // if (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1) == "V") v_LH = "V" + v_LH;
  450. if (v_POS == "C")
  451. {
  452. v_LH = (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(5, 8));
  453. if (v_POSID == "01")
  454. {
  455. if (_strSendSucceededForBof1 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
  456. if (_strSendSucceededForBof1 == "Y") txtCVT1.Appearance.BackColor = Color.LightBlue;
  457. this.txtCVT1.Text = v_LH;
  458. }
  459. if (v_POSID == "02")
  460. {
  461. if (_strSendSucceededForBof2 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
  462. if (_strSendSucceededForBof2 == "Y") txtCVT2.Appearance.BackColor = Color.LightBlue;
  463. this.txtCVT2.Text = v_LH;
  464. }
  465. if (v_POSID == "03")
  466. {
  467. if (_strSendSucceededForBof3 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
  468. if (_strSendSucceededForBof3 == "Y") txtCVT3.Appearance.BackColor = Color.LightBlue;
  469. this.txtCVT3.Text = v_LH;
  470. }
  471. }
  472. if (v_POS == "H")
  473. {
  474. v_LH = ds.Tables[0].Rows[i]["objectid"].ToString();
  475. if (v_POSID == "01")
  476. {
  477. if (_strSendSucceededForHmp1 == "" || _strSendSucceededForHmp1 == "N") HeatNo_HudwId_Exist(v_LH);
  478. _strHmp1No = ds.Tables[0].Rows[i]["objectid"].ToString();
  479. if (_strSendSucceededForHmp1 == "Y") txtHMP1.Appearance.BackColor = Color.LightBlue;
  480. this.txtHMP1.Text = v_LH;
  481. }
  482. if (v_POSID == "02")
  483. {
  484. if (_strSendSucceededForHmp2 == "" || _strSendSucceededForHmp2 == "N") HeatNo_HudwId_Exist(v_LH);
  485. _strHmp2No = ds.Tables[0].Rows[i]["objectid"].ToString();
  486. if (_strSendSucceededForHmp2 == "Y") txtHMP2.Appearance.BackColor = Color.LightBlue;
  487. this.txtHMP2.Text = v_LH;
  488. }
  489. }
  490. }
  491. }
  492. if (txtCVT1.Text.Trim().Length == 0) _strSendSucceededForBof1 = "N";
  493. if (txtCVT2.Text.Trim().Length == 0) _strSendSucceededForBof2 = "N";
  494. if (txtCVT3.Text.Trim().Length == 0) _strSendSucceededForBof3 = "N";
  495. if (txtHMP1.Text.Trim().Length == 0) _strSendSucceededForHmp1 = "N";
  496. if (txtHMP2.Text.Trim().Length == 0) _strSendSucceededForHmp2 = "N";
  497. }
  498. Thread.Sleep(5000);
  499. }
  500. }
  501. catch (Exception EE)
  502. {
  503. }
  504. }
  505. /// <summary>
  506. /// 设置铁运进铁 按钮状态
  507. ///
  508. /// </summary>
  509. /// <param name="flag"></param>
  510. private void setbutton(string flag)
  511. {
  512. switch (flag)
  513. {
  514. case "1":
  515. ulbtnAdd.Enabled = true;
  516. ulbtnEdit.Enabled = true;
  517. ulbtnDelete.Enabled = true;
  518. ulbtnSave.Enabled = false;
  519. ulbtnCancel.Enabled = false;
  520. ulbtnRef.Enabled = true;
  521. ulbtnHisRequir.Enabled = true;
  522. break;
  523. case "2":
  524. ulbtnAdd.Enabled = false;
  525. ulbtnEdit.Enabled = false;
  526. ulbtnDelete.Enabled = false;
  527. ulbtnSave.Enabled = true;
  528. ulbtnCancel.Enabled = true;
  529. ulbtnRef.Enabled = true;
  530. ulbtnHisRequir.Enabled = true;
  531. break;
  532. }
  533. }
  534. /// <summary>
  535. /// 设置出铁界面BUTTON
  536. /// </summary>
  537. /// <param name="flag"></param>
  538. private void setbutton3(string flag)
  539. {
  540. switch (flag)
  541. {
  542. case "1":
  543. ulbtnAdd3.Enabled = true;
  544. ulbtnEdit3.Enabled = true;
  545. ulbtnDelete3.Enabled = true;
  546. ulbtnSave3.Enabled = false;
  547. ulbtnCancel3.Enabled = false;
  548. ulbtnRef3.Enabled = true;
  549. ulbtnHisRequir3.Enabled = true;
  550. break;
  551. case "2":
  552. ulbtnAdd3.Enabled = false;
  553. ulbtnEdit3.Enabled = false;
  554. ulbtnDelete3.Enabled = false;
  555. ulbtnSave3.Enabled = true;
  556. ulbtnCancel3.Enabled = true;
  557. ulbtnRef3.Enabled = true;
  558. ulbtnHisRequir3.Enabled = true;
  559. break;
  560. }
  561. }
  562. private void setucHtInIron3(string flag)
  563. {
  564. switch (flag)
  565. {
  566. case "1":
  567. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  568. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  569. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  570. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  571. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  572. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  573. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  574. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  575. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  576. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  577. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  578. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  579. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  580. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  581. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  582. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  583. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  584. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  585. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  586. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  587. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  588. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  589. ucZDOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  590. break;
  591. case "2":
  592. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  593. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  594. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  595. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  596. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  597. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  598. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  599. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  600. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  601. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  602. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  603. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  604. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  605. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  606. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  607. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  608. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  609. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  610. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  611. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  612. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  613. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  614. ucZDOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
  615. break;
  616. }
  617. }
  618. /// <summary>
  619. /// 设置 ucInIron Grid的读写状态
  620. /// 1:NoEDIT 2:ALLOWEDIT
  621. /// </summary>
  622. /// <param name="flag"></param>
  623. private void setucInIron(string flag)
  624. {
  625. switch (flag)
  626. {
  627. case "1":
  628. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  629. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  630. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  631. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  632. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  633. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  634. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  635. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  636. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  637. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  638. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  639. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  640. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  641. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  642. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  643. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  644. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  645. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  646. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  647. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  648. ucInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  649. break;
  650. case "2":
  651. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  652. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  653. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  654. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  655. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  656. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  657. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  658. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  659. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  660. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  661. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  662. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  663. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  664. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  665. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  666. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  667. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  668. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  669. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  670. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  671. ucInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
  672. break;
  673. }
  674. }
  675. private string getshift()
  676. {
  677. string err = "";
  678. //hengxing
  679. //CallingMessage par = new CallingMessage();
  680. //par.ServerName = "lgJobMgt";
  681. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  682. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classCommonModule";
  683. //par.MethodName = "GetCurrDuty";
  684. //par.args = new object[] { };
  685. string ds = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  686. if (ds != "")
  687. {
  688. return ds;
  689. }
  690. else
  691. {
  692. return "";
  693. }
  694. }
  695. /// <summary>
  696. /// 序号栏锁定
  697. /// </summary>
  698. private void SetMisnoNoEdite()
  699. {
  700. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  701. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  702. }
  703. /// <summary>
  704. /// 序号栏锁定
  705. /// </summary>
  706. private void SetMisnoNoEdite3()
  707. {
  708. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  709. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  710. //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  711. //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  712. //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  713. //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  714. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  715. ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  716. }
  717. /// <summary>
  718. /// 班组转化
  719. /// </summary>
  720. /// <param name="sender"></param>
  721. /// <param name="e"></param>
  722. private string ConvertShift(string flag, string shift)
  723. {
  724. string StrReturn = "";
  725. if (flag == "1" & shift != "")
  726. {
  727. switch (shift.Substring(0, 1))
  728. {
  729. case "1":
  730. StrReturn = "白";
  731. break;
  732. case "2":
  733. StrReturn = "中";
  734. break;
  735. case "3":
  736. StrReturn = "夜";
  737. break;
  738. }
  739. }
  740. else if (flag == "2" & shift != "")
  741. {
  742. switch (shift.Substring(1, 1))
  743. {
  744. case "1":
  745. StrReturn = "甲";
  746. break;
  747. case "2":
  748. StrReturn = "乙";
  749. break;
  750. case "3":
  751. StrReturn = "丙";
  752. break;
  753. case "4":
  754. StrReturn = "丁";
  755. break;
  756. }
  757. }
  758. else if (flag == "3" & shift != "")
  759. {
  760. switch (shift.Trim())
  761. {
  762. case "白":
  763. StrReturn = "1";
  764. break;
  765. case "中":
  766. StrReturn = "2";
  767. break;
  768. case "夜":
  769. StrReturn = "3";
  770. break;
  771. }
  772. }
  773. else if (flag == "4" & shift != "")
  774. {
  775. switch (shift.Trim())
  776. {
  777. case "甲":
  778. StrReturn = "1";
  779. break;
  780. case "乙":
  781. StrReturn = "2";
  782. break;
  783. case "丙":
  784. StrReturn = "3";
  785. break;
  786. case "丁":
  787. StrReturn = "4";
  788. break;
  789. }
  790. }
  791. return StrReturn;
  792. }
  793. /// <summary>
  794. /// 设置班组下拉框
  795. /// </summary>
  796. /// <param name="Grid"></param>
  797. private void SetColumnModeGroup(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
  798. {
  799. DataTable dt = new DataTable();
  800. dt.TableName = "JIALIAO";
  801. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  802. dt.Columns.Add(dc);
  803. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  804. dt.Columns.Add(dc);
  805. DataRow dr = dt.NewRow();
  806. dr["BCBM"] = "1";
  807. dr["BCNA"] = "白";
  808. dt.Rows.Add(dr);
  809. dr = dt.NewRow();
  810. dr["BCBM"] = "2";
  811. dr["BCNA"] = "中";
  812. dt.Rows.Add(dr);
  813. dr = dt.NewRow();
  814. dr["BCBM"] = "3";
  815. dr["BCNA"] = "夜";
  816. dt.Rows.Add(dr);
  817. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Group", 0, "班 组", 60, Grid, dt, "BCBM", "BCNA");
  818. }
  819. /// <summary>
  820. /// 设置班组下拉框
  821. /// </summary>
  822. /// <param name="Grid"></param>
  823. private void SetColumnModeShift(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
  824. {
  825. DataTable dt = new DataTable();
  826. dt.TableName = "JIALIAO";
  827. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  828. dt.Columns.Add(dc);
  829. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  830. dt.Columns.Add(dc);
  831. DataRow dr = dt.NewRow();
  832. dr["BCBM"] = "1";
  833. dr["BCNA"] = "甲";
  834. dt.Rows.Add(dr);
  835. dr = dt.NewRow();
  836. dr["BCBM"] = "2";
  837. dr["BCNA"] = "乙";
  838. dt.Rows.Add(dr);
  839. dr = dt.NewRow();
  840. dr["BCBM"] = "3";
  841. dr["BCNA"] = "丙";
  842. dt.Rows.Add(dr);
  843. dr = dt.NewRow();
  844. dr["BCBM"] = "4";
  845. dr["BCNA"] = "丁";
  846. dt.Rows.Add(dr);
  847. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Shift", 0, "班组", 60, Grid, dt, "BCBM", "BCNA");
  848. }
  849. /// <summary>
  850. /// 设置去向
  851. /// </summary>
  852. private void SetColumnModequxiang()
  853. {
  854. DataTable dt = new DataTable();
  855. dt.TableName = "JIALIAO";
  856. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  857. dt.Columns.Add(dc);
  858. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  859. dt.Columns.Add(dc);
  860. DataRow dr = dt.NewRow();
  861. dr["BCBM"] = "1";
  862. dr["BCNA"] = "1#直兑";
  863. dt.Rows.Add(dr);
  864. //dr = dt.NewRow();
  865. //dr["BCBM"] = "2";
  866. //dr["BCNA"] = "2#直兑";
  867. //dt.Rows.Add(dr);
  868. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("IronQuxiang", 0, "铁水去向", 135, ucInIron1.ultraGrid1, dt, "BCBM", "BCNA");
  869. }
  870. /// <summary>
  871. /// 设置去向
  872. /// </summary>
  873. private void SetColumnModeOutquxiang()
  874. {
  875. DataTable dt = new DataTable();
  876. dt.TableName = "JIALIAO";
  877. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  878. dt.Columns.Add(dc);
  879. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  880. dt.Columns.Add(dc);
  881. DataRow dr = dt.NewRow();
  882. dr["BCBM"] = "1";
  883. dr["BCNA"] = "1#转炉";
  884. dt.Rows.Add(dr);
  885. dr = dt.NewRow();
  886. dr["BCBM"] = "2";
  887. dr["BCNA"] = "2#转炉";
  888. dt.Rows.Add(dr);
  889. dr = dt.NewRow();
  890. dr["BCBM"] = "3";
  891. dr["BCNA"] = "3#转炉";
  892. dt.Rows.Add(dr);
  893. dr = dt.NewRow();
  894. dr["BCBM"] = "4";
  895. dr["BCNA"] = "1#预处理";
  896. dt.Rows.Add(dr);
  897. //dr = dt.NewRow();
  898. //dr["BCBM"] = "5";
  899. //dr["BCNA"] = "2#预处理";
  900. //dt.Rows.Add(dr);
  901. dr = dt.NewRow();
  902. dr["BCBM"] = "6";
  903. dr["BCNA"] = "1#混铁炉";
  904. dt.Rows.Add(dr);
  905. //dr = dt.NewRow();
  906. //dr["BCBM"] = "7";
  907. //dr["BCNA"] = "2#混铁炉";
  908. //dt.Rows.Add(dr);
  909. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCellEdit("IronQuxiang", 0, "铁水去向", 100, ucZDOutIron1.ultraGrid1, dt, "BCBM", "BCNA");
  910. }
  911. /// <summary>
  912. /// 铁运进铁设置初始数据
  913. /// </summary>
  914. private void SetGridNewIronData()
  915. {
  916. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
  917. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = "";
  918. ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
  919. ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
  920. ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
  921. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = "";
  922. ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
  923. ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
  924. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  925. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
  926. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
  927. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
  928. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
  929. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
  930. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
  931. ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = "0";
  932. ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = this.Text.Substring(0, 1);
  933. }
  934. /// <summary>
  935. /// 设置出铁初始数据
  936. /// </summary>
  937. private void SetGridNewIronData3()
  938. {
  939. ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "自动";
  940. ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = "1#转炉";
  941. ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = "";
  942. ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
  943. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
  944. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
  945. ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = DateTime.Now;
  946. ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = "直兑出铁";
  947. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "0";
  948. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "0";
  949. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "0";
  950. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
  951. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
  952. ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  953. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
  954. ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
  955. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
  956. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
  957. ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
  958. ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
  959. ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
  960. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
  961. }
  962. private void Modify_Es_Comeinto()
  963. {
  964. string strError = "";
  965. try
  966. {
  967. for (int i = 0; i < alZDIn.Count; i++)
  968. {
  969. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateZDHBData", new object[] { alZDIn[i] }, out strError);
  970. }
  971. alZDIn.Clear();
  972. }
  973. catch
  974. {
  975. MessageBox.Show("直兑进铁更新失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  976. return;
  977. }
  978. }
  979. /// <summary>
  980. /// 插入出铁记录
  981. /// </summary>
  982. /// <param name="sender"></param>
  983. /// <param name="e"></param>
  984. private void InsertData3()
  985. {
  986. GetGridData3();
  987. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动")
  988. {
  989. string strError = "";
  990. Modify_Es_Comeinto();
  991. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertZDOutIronData", new object[] { ArrayIronRow3 }, out strError);
  992. if (strError == "")
  993. {
  994. // MessageBox.Show("插入记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  995. }
  996. else
  997. MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  998. }
  999. else
  1000. {
  1001. string strError = "";
  1002. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateZDOutIronData", new object[] { ArrayIronRow3 }, out strError);
  1003. if (strError != "")
  1004. MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  1005. }
  1006. }
  1007. /// <summary>
  1008. /// 铁运进铁数据 ultraGrid2
  1009. /// </summary>
  1010. private void GetInIronData()
  1011. {
  1012. string err = "";
  1013. string htWhere = "";
  1014. htWhere = " where to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS')";
  1015. try
  1016. {
  1017. //hengxing
  1018. //CallingMessage par = new CallingMessage();
  1019. //par.ServerName = "lgJobMgt";
  1020. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  1021. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  1022. //par.MethodName = "SelectZDInIronData";
  1023. //par.args = new object[] { htWhere };
  1024. //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  1025. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  1026. ultraDataSource2.Rows.Clear();
  1027. if (ds.Tables.Count > 0)
  1028. {
  1029. foreach (DataRow dr in ds.Tables[0].Rows)
  1030. {
  1031. ultraDataSource2.Rows.Add(new object[] {
  1032. dr["MISID"].ToString(),
  1033. dr["MOLIRNSOURCE"].ToString(),
  1034. dr["STOVEID"].ToString(),
  1035. dr["TFPOTID"].ToString(),
  1036. dr["TFPOTGROSSWGT"].ToString(),
  1037. dr["TFPOTTAREWGT"].ToString(),
  1038. dr["TFPOTWGT"].ToString(),
  1039. dr["C"].ToString(),
  1040. dr["SI"].ToString(),
  1041. dr["MN"].ToString(),
  1042. dr["P"].ToString(),
  1043. dr["S"].ToString(),
  1044. dr["ASN"].ToString(),
  1045. dr["IRONTEMPERATURE"].ToString(),
  1046. dr["ARRIVETIME"].ToString(),
  1047. ConvertShift("1",dr["SHIFTCODE"].ToString()),
  1048. ConvertShift("2",dr["SHIFTCODE"].ToString()),
  1049. dr["FOLDPOTWGT"].ToString(),
  1050. });
  1051. }
  1052. }
  1053. }
  1054. catch
  1055. { }
  1056. }
  1057. private void timer1_Tick(object sender, EventArgs e)
  1058. {
  1059. RefreshHighheatNo();
  1060. // GetCVTHeatno();
  1061. }
  1062. /// <summary>
  1063. /// 数据CHECK
  1064. /// </summary>
  1065. /// <returns></returns>
  1066. private bool CheckData()
  1067. {
  1068. if (ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
  1069. ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
  1070. if (ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
  1071. ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
  1072. if (ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
  1073. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  1074. if (ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
  1075. ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
  1076. if (ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
  1077. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
  1078. if (ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
  1079. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
  1080. if (ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
  1081. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
  1082. if (ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
  1083. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
  1084. if (ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
  1085. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
  1086. if (ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
  1087. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
  1088. //if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
  1089. //{
  1090. // return false;
  1091. //}
  1092. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text))
  1093. {
  1094. return false;
  1095. }
  1096. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
  1097. {
  1098. return false;
  1099. }
  1100. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
  1101. {
  1102. return false;
  1103. }
  1104. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text))
  1105. {
  1106. return false;
  1107. }
  1108. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text))
  1109. {
  1110. return false;
  1111. }
  1112. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text))
  1113. {
  1114. return false;
  1115. }
  1116. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
  1117. {
  1118. return false;
  1119. }
  1120. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
  1121. {
  1122. return false;
  1123. }
  1124. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
  1125. {
  1126. return false;
  1127. }
  1128. return true;
  1129. }
  1130. private static bool IsDouble(string AValue)
  1131. {
  1132. try
  1133. {
  1134. Convert.ToDouble(AValue);
  1135. return true;
  1136. }
  1137. catch
  1138. {
  1139. return false;
  1140. }
  1141. }
  1142. private void InsertData()
  1143. {
  1144. GetGridData();
  1145. if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动")
  1146. {
  1147. string strError = "";
  1148. string[] strGLGH = ArrayIronRow[5].Split(',');
  1149. bool blErr = false;
  1150. for (int i = 0; i < strGLGH.Length; i++)
  1151. {
  1152. ArrayIronRow[5] = strGLGH[i];
  1153. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertZDIronData", new object[] { ArrayIronRow }, out strError);
  1154. if (strError == "") blErr = true;
  1155. }
  1156. if (blErr == false)
  1157. MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  1158. }
  1159. else
  1160. {
  1161. string strError = "";
  1162. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateZDIronData", new object[] { ArrayIronRow }, out strError);
  1163. if (strError != "")
  1164. MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  1165. }
  1166. }
  1167. /// <summary>
  1168. /// 取铁运进铁的数据 到数组
  1169. /// </summary>
  1170. private void GetGridData()
  1171. {
  1172. try
  1173. {
  1174. ArrayIronRow[0] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text;
  1175. ArrayIronRow[1] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
  1176. ArrayIronRow[2] = ConvertShift("3", ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucInIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
  1177. ArrayIronRow[3] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Text;
  1178. ArrayIronRow[4] = ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
  1179. ArrayIronRow[5] = ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Text;
  1180. ArrayIronRow[6] = ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
  1181. ArrayIronRow[7] = ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
  1182. ArrayIronRow[8] = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
  1183. ArrayIronRow[9] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
  1184. ArrayIronRow[10] = ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text;
  1185. ArrayIronRow[11] = ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
  1186. ArrayIronRow[12] = ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
  1187. ArrayIronRow[13] = ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text;
  1188. ArrayIronRow[14] = ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text;
  1189. ArrayIronRow[15] = ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text;
  1190. ArrayIronRow[16] = ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
  1191. ArrayIronRow[17] = User;
  1192. ArrayIronRow[18] = this.Text.Substring(0,1);
  1193. ArrayIronRow[19] = ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Text;
  1194. }
  1195. catch { }
  1196. }
  1197. /// <summary>
  1198. /// 取得出铁GRID数据
  1199. /// </summary>
  1200. /// <param name="sender"></param>
  1201. /// <param name="e"></param>
  1202. private void GetGridData3()
  1203. {
  1204. try
  1205. {
  1206. ArrayIronRow3[0] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text;
  1207. ArrayIronRow3[1] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Text; //高炉炉号
  1208. ArrayIronRow3[2] = ConvertShift("3", ucZDOutIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucZDOutIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
  1209. ArrayIronRow3[3] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Text;
  1210. ArrayIronRow3[4] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
  1211. ArrayIronRow3[5] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLDno"].Text;
  1212. ArrayIronRow3[6] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
  1213. ArrayIronRow3[7] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
  1214. ArrayIronRow3[8] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
  1215. ArrayIronRow3[9] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text; //铁水来源
  1216. ArrayIronRow3[10] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Text;
  1217. ArrayIronRow3[11] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
  1218. ArrayIronRow3[12] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
  1219. ArrayIronRow3[13] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Text;
  1220. ArrayIronRow3[14] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Text;
  1221. ArrayIronRow3[15] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Text;
  1222. ArrayIronRow3[16] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
  1223. ArrayIronRow3[17] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Text;
  1224. ArrayIronRow3[18] = User;
  1225. ArrayIronRow3[19] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text;
  1226. ArrayIronRow3[20] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Text;//出铁类型
  1227. ArrayIronRow3[21] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text;
  1228. ArrayIronRow3[22] = this.Text.Substring(0, 1);
  1229. ArrayIronRow3[23] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Text;
  1230. }
  1231. catch { }
  1232. }
  1233. /// <summary>
  1234. /// 事件的委托
  1235. /// </summary>
  1236. private void SetUserControlDelegate()
  1237. {
  1238. ucInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucInIron1_CellChange);
  1239. ucZDOutIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucZDOutIron1_CellChange);
  1240. ucZDOutIron1.ultraGrid1.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucZDOutIron1_ClickCellButton);
  1241. }
  1242. private void ucInIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  1243. {
  1244. float flPZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
  1245. float flMZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
  1246. float flJZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
  1247. switch (e.Cell.Column.Key)
  1248. {
  1249. case "LdMaoWeight":
  1250. {
  1251. try
  1252. {
  1253. if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1254. else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  1255. else if (flPZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1256. ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value;
  1257. }
  1258. catch { }
  1259. break;
  1260. }
  1261. case "LdKongWeight":
  1262. {
  1263. try
  1264. {
  1265. if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1266. else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
  1267. else if (flMZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1268. ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value;
  1269. }
  1270. catch { }
  1271. break;
  1272. }
  1273. case "IronWeight":
  1274. {
  1275. try
  1276. {
  1277. if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  1278. else if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  1279. else if (flMZ > 0 && flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  1280. ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = flJZ;
  1281. }
  1282. catch { }
  1283. break;
  1284. }
  1285. }
  1286. }
  1287. private void ucZDOutIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  1288. {
  1289. switch (e.Cell.Column.Key)
  1290. {
  1291. case "LdKongWeight":
  1292. {
  1293. try
  1294. {
  1295. float a = Convert.ToSingle(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
  1296. float b = Convert.ToSingle(ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
  1297. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(b + a);
  1298. }
  1299. catch { }
  1300. break;
  1301. }
  1302. case "ZhuanluLdNo":
  1303. {
  1304. try
  1305. {
  1306. string strStatus = "";
  1307. int intAge = 0;
  1308. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.ToString().Length > 0)
  1309. {
  1310. intAge = GetIronwrapAge(ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text, out strStatus);
  1311. if (strStatus == "备用")
  1312. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = intAge + 1;
  1313. else
  1314. {
  1315. // MessageBox.Show("当前铁包状态【" + strStatus + "】不能使用!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1316. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "";
  1317. // ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
  1318. }
  1319. }
  1320. else
  1321. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
  1322. }
  1323. catch
  1324. { }
  1325. break;
  1326. }
  1327. }
  1328. }
  1329. private void ucZDOutIron1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  1330. {
  1331. switch (e.Cell.Column.Key)
  1332. {
  1333. case "HtHeatNo":
  1334. {
  1335. 弹出窗体.frmZDInIron frmMixInSource_1 = new 弹出窗体.frmZDInIron();
  1336. using (frmMixInSource_1)
  1337. {
  1338. if (frmMixInSource_1.ShowDialog(this) == DialogResult.OK)
  1339. {
  1340. ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = frmMixInSource_1.Laiyuan;
  1341. ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = frmMixInSource_1.stoveNo;
  1342. ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = frmMixInSource_1.AllWeight;
  1343. alZDIn = frmMixInSource_1.alZDInIron;
  1344. string[] strIronEle = alZDIn[0] as string[];
  1345. ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = frmMixInSource_1.str_C;
  1346. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = frmMixInSource_1.str_Si;
  1347. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = frmMixInSource_1.str_Mn;
  1348. ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = frmMixInSource_1.str_P;
  1349. ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = frmMixInSource_1.str_S;
  1350. ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = frmMixInSource_1.str_Asn;
  1351. }
  1352. }
  1353. break;
  1354. }
  1355. default:
  1356. break;
  1357. }
  1358. }
  1359. private void GetHtOutIronData()
  1360. {
  1361. string err = "";
  1362. string htWhere = "";
  1363. string Wsid = this.Text.Substring(0, 1);
  1364. htWhere = " where to_char(TAPHOLESTARTTIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') and WSID='" + Wsid + "'";
  1365. try
  1366. {
  1367. //CallingMessage par = new CallingMessage();
  1368. //par.ServerName = "lgJobMgt";
  1369. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  1370. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  1371. //par.MethodName = "SelectZDOutIronData";
  1372. //par.args = new object[] { htWhere };
  1373. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  1374. ultraDataSource4.Rows.Clear();
  1375. if (ds.Tables.Count > 0)
  1376. {
  1377. foreach (DataRow dr in ds.Tables[0].Rows)
  1378. {
  1379. ultraDataSource4.Rows.Add(new object[] {
  1380. dr["MISID"].ToString(),
  1381. dr["MOLIRNLEAVE"].ToString(),
  1382. dr["IRONWRAPID"].ToString(),
  1383. dr["IRONPOTTAREWGT"].ToString(),
  1384. dr["IRONPOTGROSSWGT"].ToString(),
  1385. dr["IRONPOTWGT"].ToString(),
  1386. dr["C"].ToString(),
  1387. dr["SI"].ToString(),
  1388. dr["MN"].ToString(),
  1389. dr["P"].ToString(),
  1390. dr["S"].ToString(),
  1391. dr["ASN"].ToString(),
  1392. dr["IRONTEMPERATURE"].ToString(),
  1393. dr["TAPHOLESTARTTIME"].ToString(),
  1394. ConvertShift("1",dr["SHIFTCODE"].ToString()),
  1395. ConvertShift("2",dr["SHIFTCODE"].ToString()),
  1396. dr["IRONEXPORTTYPE"].ToString(),
  1397. dr["SMELTINGIDOFCVT"].ToString(),
  1398. dr["WEIGHTOFCVT"].ToString(),
  1399. dr["IRONWRAPAGE"].ToString(),
  1400. dr["MOLIRNSOURCE"].ToString(),
  1401. dr["STOVEID"].ToString(),
  1402. });
  1403. }
  1404. }
  1405. }
  1406. catch (Exception ex)
  1407. {
  1408. Console.WriteLine(ex.Message);
  1409. }
  1410. }
  1411. private void GetElementData()
  1412. {
  1413. string err = "";
  1414. string htWhere = "";
  1415. string Wsid = this.Text.Substring(0, 1);
  1416. htWhere = " and to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') ";
  1417. try
  1418. {
  1419. //hengxing
  1420. //CallingMessage par = new CallingMessage();
  1421. //par.ServerName = "lgJobMgt";
  1422. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  1423. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  1424. //par.MethodName = "SelectZDElementData";
  1425. //par.args = new object[] { htWhere };
  1426. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  1427. ultraDataSource5.Rows.Clear();
  1428. if (ds.Tables.Count > 0)
  1429. {
  1430. foreach (DataRow dr in ds.Tables[0].Rows)
  1431. {
  1432. ultraDataSource5.Rows.Add(new object[] {
  1433. dr["HEATNO"].ToString(),
  1434. dr["C"].ToString(),
  1435. dr["SI"].ToString(),
  1436. dr["MN"].ToString(),
  1437. dr["P"].ToString(),
  1438. dr["S"].ToString(),
  1439. dr["ASN"].ToString(),
  1440. dr["NI"].ToString(),
  1441. dr["CU"].ToString(),
  1442. dr["SN"].ToString(),
  1443. dr["SB"].ToString(),
  1444. dr["CHECKNO"].ToString()
  1445. });
  1446. }
  1447. }
  1448. }
  1449. catch (Exception ex)
  1450. {
  1451. Console.WriteLine(ex.Message);
  1452. }
  1453. }
  1454. private bool CheckData3()
  1455. {
  1456. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
  1457. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
  1458. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
  1459. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
  1460. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
  1461. ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  1462. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
  1463. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
  1464. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text.Trim().Length == 0)
  1465. ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "";
  1466. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.Trim().Length == 0)
  1467. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
  1468. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text.Trim().Length == 0)
  1469. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "";
  1470. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
  1471. ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
  1472. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
  1473. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
  1474. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
  1475. ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
  1476. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
  1477. ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
  1478. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
  1479. ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
  1480. if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
  1481. ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
  1482. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
  1483. {
  1484. return false;
  1485. }
  1486. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Text))
  1487. {
  1488. return false;
  1489. }
  1490. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
  1491. {
  1492. return false;
  1493. }
  1494. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
  1495. {
  1496. return false;
  1497. }
  1498. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Text))
  1499. {
  1500. return false;
  1501. }
  1502. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Text))
  1503. {
  1504. return false;
  1505. }
  1506. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Text))
  1507. {
  1508. return false;
  1509. }
  1510. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
  1511. {
  1512. return false;
  1513. }
  1514. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
  1515. {
  1516. return false;
  1517. }
  1518. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
  1519. {
  1520. return false;
  1521. }
  1522. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
  1523. {
  1524. return false;
  1525. }
  1526. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text))
  1527. {
  1528. return false;
  1529. }
  1530. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text))
  1531. {
  1532. return false;
  1533. }
  1534. if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text))
  1535. {
  1536. return false;
  1537. }
  1538. return true;
  1539. }
  1540. #endregion
  1541. #region buttonevent
  1542. private void ulbtnAdd_Click(object sender, EventArgs e)
  1543. {
  1544. setbutton("2");
  1545. setucInIron("2");
  1546. SetMisnoNoEdite();
  1547. SetGridNewIronData();
  1548. }
  1549. private void ulbtnEdit_Click(object sender, EventArgs e)
  1550. {
  1551. blModify = true;
  1552. setbutton("2");
  1553. setucInIron("2");
  1554. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1555. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1556. }
  1557. private void ulbtnDelete_Click(object sender, EventArgs e)
  1558. {
  1559. if (ultraGrid2.ActiveRow == null || ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
  1560. if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
  1561. MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
  1562. string strWhere = "where MISID='" + ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text + "'";
  1563. try
  1564. {
  1565. string strError = "";
  1566. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "DeleteZDIronData", new object[] { strWhere }, out strError);
  1567. if (strError == "")
  1568. MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1569. else
  1570. MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  1571. }
  1572. catch (Exception ee)
  1573. {
  1574. string s = ee.Message;
  1575. }
  1576. GetInIronData();
  1577. }
  1578. private void ulbtnSave_Click(object sender, EventArgs e)
  1579. {
  1580. if (CheckData() == false)
  1581. {
  1582. MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1583. return;
  1584. }
  1585. if (ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value.ToString().Length>0 && ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text.Substring(1, 1) != "#")
  1586. {
  1587. MessageBox.Show(this, "请选择铁水去向!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1588. return;
  1589. }
  1590. InsertData();
  1591. GetInIronData();
  1592. }
  1593. private void ulbtnCancel_Click(object sender, EventArgs e)
  1594. {
  1595. setbutton("1");
  1596. setucInIron("1");
  1597. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "";
  1598. ultraGrid2_AfterRowActivate(null, null);
  1599. blModify = false;
  1600. }
  1601. private void ulbtnRef_Click(object sender, EventArgs e)
  1602. {
  1603. GetInIronData();
  1604. }
  1605. private void ulbtnHisRequir_Click(object sender, EventArgs e)
  1606. {
  1607. frmRequryZDInIron frm1 = new frmRequryZDInIron();
  1608. frm1.MdiParent = this.MdiParent;
  1609. // frm3.RemotingHelp = this.RemotingHelp;
  1610. frm1.Show();
  1611. }
  1612. private void ulbtnAdd3_Click(object sender, EventArgs e)
  1613. {
  1614. setbutton3("2");
  1615. setucHtInIron3("2");
  1616. SetMisnoNoEdite3();
  1617. SetGridNewIronData3();
  1618. }
  1619. private void ulbtnEdit3_Click(object sender, EventArgs e)
  1620. {
  1621. setbutton3("2");
  1622. setucHtInIron3("2");
  1623. SetMisnoNoEdite3();
  1624. }
  1625. private void ulbtnDelete3_Click(object sender, EventArgs e)
  1626. {
  1627. if (ultHtOutIronGrid.ActiveRow == null || ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
  1628. if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
  1629. MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
  1630. string strWhere = "where MISID='" + ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text + "'";
  1631. try
  1632. {
  1633. string strError = "";
  1634. //hengxing
  1635. //ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  1636. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  1637. // "DeleteZDOutIronData",
  1638. // new object[] { strWhere,this.Text.Substring(0,1),
  1639. // Convert.ToDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text) }, out strError);
  1640. if (strError == "")
  1641. MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1642. else
  1643. MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  1644. }
  1645. catch (Exception ee)
  1646. {
  1647. string s = ee.Message;
  1648. }
  1649. GetHtOutIronData();
  1650. }
  1651. private void ulbtnSave3_Click(object sender, EventArgs e)
  1652. {
  1653. if (CheckData3() == false)
  1654. {
  1655. MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1656. return;
  1657. }
  1658. InsertData3();
  1659. GetHtOutIronData();
  1660. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
  1661. ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
  1662. }
  1663. private void ulbtnCancel3_Click(object sender, EventArgs e)
  1664. {
  1665. setbutton3("1");
  1666. setucHtInIron3("1");
  1667. ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "";
  1668. ultHtOutIronGrid_AfterRowActivate(null, null);
  1669. }
  1670. private void ulbtnRef3_Click(object sender, EventArgs e)
  1671. {
  1672. GetHtOutIronData();
  1673. GetElementData();
  1674. }
  1675. private void ulbtnHisRequir3_Click(object sender, EventArgs e)
  1676. {
  1677. frmRequryZDoutIron frm1 = new frmRequryZDoutIron();
  1678. frm1.MdiParent = this.MdiParent;
  1679. // frm3.RemotingHelp = this.RemotingHelp;
  1680. frm1.Show();
  1681. }
  1682. private void ulbtnCVT1_Click(object sender, EventArgs e)
  1683. {
  1684. if (txtCVT1.Text.Trim().Length == 0)
  1685. {
  1686. MessageBox.Show("1#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1687. return;
  1688. }
  1689. if (ArrayIronRow4[0].Trim().Length > 0)
  1690. {
  1691. ArrayIronRow4[4] = txtCVT1.Text;
  1692. ArrayIronRow4[5] = "CVT";
  1693. SendIronToCvt();
  1694. ArrayIronRow4[0] = "";
  1695. ArrayIronRow4[1] = "";
  1696. ArrayIronRow4[2] = "";
  1697. ArrayIronRow4[3] = "";
  1698. ArrayIronRow4[4] = "";
  1699. ArrayIronRow4[5] = "";
  1700. GetHtOutIronData();
  1701. }
  1702. else
  1703. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1704. }
  1705. private void ulbtnCVT2_Click(object sender, EventArgs e)
  1706. {
  1707. if (txtCVT2.Text.Trim().Length == 0)
  1708. {
  1709. MessageBox.Show("2#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1710. return;
  1711. }
  1712. if (ArrayIronRow4[0].Trim().Length > 0)
  1713. {
  1714. ArrayIronRow4[4] = txtCVT2.Text;
  1715. ArrayIronRow4[5] = "CVT";
  1716. SendIronToCvt();
  1717. ArrayIronRow4[0] = "";
  1718. ArrayIronRow4[1] = "";
  1719. ArrayIronRow4[2] = "";
  1720. ArrayIronRow4[3] = "";
  1721. ArrayIronRow4[4] = "";
  1722. ArrayIronRow4[5] = "";
  1723. GetHtOutIronData();
  1724. }
  1725. else
  1726. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1727. }
  1728. private void ulbtnCVT3_Click(object sender, EventArgs e)
  1729. {
  1730. if (txtCVT3.Text.Trim().Length == 0)
  1731. {
  1732. MessageBox.Show("3#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1733. return;
  1734. }
  1735. if (ArrayIronRow4[0].Trim().Length > 0)
  1736. {
  1737. ArrayIronRow4[4] = txtCVT3.Text;
  1738. ArrayIronRow4[5] = "CVT";
  1739. SendIronToCvt();
  1740. ArrayIronRow4[0] = "";
  1741. ArrayIronRow4[1] = "";
  1742. ArrayIronRow4[2] = "";
  1743. ArrayIronRow4[3] = "";
  1744. ArrayIronRow4[4] = "";
  1745. ArrayIronRow4[5] = "";
  1746. GetHtOutIronData();
  1747. }
  1748. else
  1749. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1750. }
  1751. private void ulbtnHMP1_Click(object sender, EventArgs e)
  1752. {
  1753. if (txtHMP1.Text.Trim().Length == 0)
  1754. {
  1755. MessageBox.Show("1#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1756. return;
  1757. }
  1758. if (ArrayIronRow4[0].Trim().Length > 0)
  1759. {
  1760. ArrayIronRow4[4] = _strHmp1No;// txtHMP1.Text;
  1761. ArrayIronRow4[5] = "HMP";
  1762. SendIronToCvt();
  1763. ArrayIronRow4[0] = "";
  1764. ArrayIronRow4[1] = "";
  1765. ArrayIronRow4[2] = "";
  1766. ArrayIronRow4[3] = "";
  1767. ArrayIronRow4[4] = "";
  1768. ArrayIronRow4[5] = "";
  1769. ArrayIronRow4[8] = "";
  1770. GetHtOutIronData();
  1771. }
  1772. else
  1773. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1774. }
  1775. private void ulbtnHMP2_Click(object sender, EventArgs e)
  1776. {
  1777. if (txtHMP2.Text.Trim().Length == 0)
  1778. {
  1779. MessageBox.Show("2#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1780. return;
  1781. }
  1782. if (ArrayIronRow4[0].Trim().Length > 0)
  1783. {
  1784. ArrayIronRow4[4] = _strHmp2No; //txtHMP2.Text;
  1785. ArrayIronRow4[5] = "HMP";
  1786. SendIronToCvt();
  1787. ArrayIronRow4[0] = "";
  1788. ArrayIronRow4[1] = "";
  1789. ArrayIronRow4[2] = "";
  1790. ArrayIronRow4[3] = "";
  1791. ArrayIronRow4[4] = "";
  1792. ArrayIronRow4[5] = "";
  1793. ArrayIronRow4[8] = "";
  1794. GetHtOutIronData();
  1795. }
  1796. else
  1797. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1798. }
  1799. #endregion
  1800. /// <summary>
  1801. /// 获取铁包包龄
  1802. /// </summary>
  1803. /// <param name="strIronwrapID"></param>
  1804. /// <returns></returns>
  1805. private int GetIronwrapAge(string strIronwrapID, out string strStatus)
  1806. {
  1807. string strErr = "";
  1808. int intIronAge = 0;
  1809. string _strStatus = "";
  1810. object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  1811. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  1812. // "GetIronwrapAge", new object[] { "res_es_taphole", strIronwrapID }, out strErr);
  1813. if (strErr == "")
  1814. {
  1815. DataSet ds = (DataSet)obj;
  1816. if (ds.Tables.Count > 0)
  1817. {
  1818. if (ds.Tables[0].Rows.Count > 0)
  1819. {
  1820. intIronAge = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  1821. _strStatus = ds.Tables[0].Rows[0]["STATUS"].ToString();
  1822. }
  1823. }
  1824. }
  1825. strStatus = _strStatus;
  1826. return intIronAge;
  1827. }
  1828. private void HeatNo_HudwId_Exist(string strID)
  1829. {
  1830. string strErr = "";
  1831. string strGw = "";
  1832. if (strID.Substring(0, 1) == "H")
  1833. strGw = strID.Substring(0, 2);
  1834. else
  1835. strGw = strID.Substring(2, 1);
  1836. string obj = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  1837. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  1838. // "HeatNo_HudwId_Exist", new object[] { strID }, out strErr);
  1839. if (strErr == "")
  1840. {
  1841. switch (strGw)
  1842. {
  1843. case "H1":
  1844. _strSendSucceededForHmp1 = obj;
  1845. break;
  1846. case "H2":
  1847. _strSendSucceededForHmp2 = obj;
  1848. break;
  1849. case "1":
  1850. _strSendSucceededForBof1 = obj;
  1851. break;
  1852. case "2":
  1853. _strSendSucceededForBof2 = obj;
  1854. break;
  1855. case "3":
  1856. _strSendSucceededForBof3 = obj;
  1857. break;
  1858. default:
  1859. break;
  1860. }
  1861. }
  1862. }
  1863. private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  1864. {
  1865. if(e.Tab.Index==1)
  1866. GetElementData();
  1867. }
  1868. }
  1869. }