frmLgElements.cs 97 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165
  1. using System;
  2. using System.IO;
  3. using System.Drawing;
  4. using System.Collections;
  5. using System.Diagnostics;
  6. using System.ComponentModel;
  7. using System.Windows.Forms;
  8. using System.Data;
  9. using System.Threading;
  10. using CoreFS.CA06;
  11. using Infragistics.Win.UltraWinMaskedEdit;
  12. using Infragistics.Win.UltraWinGrid;
  13. using Infragistics.Win;
  14. using Core.StlMes.Client.LgCommon;
  15. using Core.Mes.Client.Comm.Control;
  16. namespace Core.StlMes.Client.LgIntegrationQuery
  17. {
  18. /// <summary>
  19. /// ELEMENTS 的摘要说明。
  20. /// </summary>
  21. public class frmLgElements : frmStyleBase
  22. {
  23. #region " Construct "
  24. private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
  25. private System.Windows.Forms.Label label1;
  26. private System.Windows.Forms.Label label2;
  27. private System.ComponentModel.IContainer components;
  28. private System.Windows.Forms.Label label3;
  29. private System.Windows.Forms.Panel panel1;
  30. private System.Windows.Forms.Label label5;
  31. private System.Windows.Forms.Label label6;
  32. private System.Windows.Forms.TextBox txtPage;
  33. private System.Windows.Forms.Button btn_Up;
  34. private System.Windows.Forms.Button btn_Down;
  35. private System.Windows.Forms.Button button3;
  36. private System.Windows.Forms.CheckBox chkRefresh;
  37. public string StrPost = "0";
  38. private Label label11;
  39. private Label label10;
  40. private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtBeginTime;
  41. private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtEndTime;
  42. private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter GridExcelExporter;
  43. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
  44. private UltraGrid EMGrid;
  45. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
  46. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
  47. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
  48. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
  49. private string m_szEntry = "";
  50. private DataSet dataSet1;
  51. private DataTable dataTable1;
  52. private DataColumn dataColumn7;
  53. private DataColumn dataColumn8;
  54. private DataColumn dataColumn9;
  55. private DataColumn dataColumn84;
  56. private DataColumn dataColumn85;
  57. string[] strERow;
  58. private TextBox txtSteel;
  59. private CheckBox chkGasSample; //化学成份列名
  60. string[] strRowName = new string[] { "C", "Mn", "S", "P", "Si", "Als", "Alt", "N", "Ti", "Nb", "B", "V", "Asn", "Sn", "Cu", "Sb", "O", "H" };
  61. bool Isbool = false;
  62. private DataColumn dataColumn1;
  63. private Infragistics.Win.UltraWinEditors.UltraComboEditor cmb_BZ;
  64. private Infragistics.Win.UltraWinEditors.UltraComboEditor cboGW;
  65. private Infragistics.Win.UltraWinEditors.UltraComboEditor comboBox2;
  66. private DataColumn dataColumn2;
  67. private DataColumn dataColumn3;
  68. private Infragistics.Win.UltraWinEditors.UltraPictureBox ultraPictureBox1;
  69. private DataColumn dataColumn4;
  70. private DataColumn dataColumn5;
  71. private DataColumn dataColumn6;
  72. private DataColumn dataColumn10;
  73. private TextBox ultraMaskedEdit2;
  74. private TextBox ultraMaskedEdit1;
  75. private CheckBox chkSteel;
  76. private CheckBox chkBZ;
  77. private Label label7;
  78. private CheckBox chkHeatbo;
  79. private DataColumn dataColumn11;
  80. public frmLgElements(string szPost)
  81. {
  82. InitializeComponent();
  83. this._devPos = szPost;
  84. }
  85. public frmLgElements()
  86. {
  87. //
  88. // Windows 窗体设计器支持所必需的
  89. //
  90. InitializeComponent();
  91. this._devPos = StrPost;
  92. }
  93. public frmLgElements(string szEntry, string szLH)
  94. {
  95. InitializeComponent();
  96. this._devPos = StrPost;
  97. this.m_szEntry = szEntry;
  98. this.ultraMaskedEdit1.Text = szLH;
  99. }
  100. /// <summary>
  101. /// 清理所有正在使用的资源。
  102. /// </summary>
  103. protected override void Dispose(bool disposing)
  104. {
  105. try
  106. {
  107. if (_getDataThread != null)
  108. _getDataThread.Abort();
  109. }
  110. catch { }
  111. if (disposing)
  112. {
  113. if (components != null)
  114. {
  115. components.Dispose();
  116. }
  117. }
  118. base.Dispose(disposing);
  119. }
  120. #region Windows 窗体设计器生成的代码
  121. /// <summary>
  122. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  123. /// 此方法的内容。
  124. /// </summary>
  125. private void InitializeComponent()
  126. {
  127. this.components = new System.ComponentModel.Container();
  128. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  129. Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
  130. Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
  131. Infragistics.Win.ValueListItem valueListItem3 = new Infragistics.Win.ValueListItem();
  132. Infragistics.Win.ValueListItem valueListItem4 = new Infragistics.Win.ValueListItem();
  133. Infragistics.Win.ValueListItem valueListItem30 = new Infragistics.Win.ValueListItem();
  134. Infragistics.Win.ValueListItem valueListItem31 = new Infragistics.Win.ValueListItem();
  135. Infragistics.Win.ValueListItem valueListItem5 = new Infragistics.Win.ValueListItem();
  136. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  137. Infragistics.Win.ValueListItem valueListItem11 = new Infragistics.Win.ValueListItem();
  138. Infragistics.Win.ValueListItem valueListItem6 = new Infragistics.Win.ValueListItem();
  139. Infragistics.Win.ValueListItem valueListItem7 = new Infragistics.Win.ValueListItem();
  140. Infragistics.Win.ValueListItem valueListItem8 = new Infragistics.Win.ValueListItem();
  141. Infragistics.Win.ValueListItem valueListItem9 = new Infragistics.Win.ValueListItem();
  142. Infragistics.Win.ValueListItem valueListItem10 = new Infragistics.Win.ValueListItem();
  143. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  144. Infragistics.Win.ValueListItem valueListItem12 = new Infragistics.Win.ValueListItem();
  145. Infragistics.Win.ValueListItem valueListItem13 = new Infragistics.Win.ValueListItem();
  146. Infragistics.Win.ValueListItem valueListItem14 = new Infragistics.Win.ValueListItem();
  147. Infragistics.Win.ValueListItem valueListItem15 = new Infragistics.Win.ValueListItem();
  148. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Table1", -1);
  149. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("序号");
  150. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("熔炼号", -1, null, 0, Infragistics.Win.UltraWinGrid.SortIndicator.Ascending, false);
  151. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("计划牌号");
  152. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("化验时间");
  153. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JHGZ");
  154. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("shiftcode", -1, 7905313);
  155. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Station");
  156. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn8 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SumTime");
  157. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn9 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_STL_GRD");
  158. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn10 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_RESULT");
  159. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn11 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("REG_ID");
  160. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn12 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_SEQ");
  161. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn13 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SIMN");
  162. Infragistics.Win.ValueList valueList1 = new Infragistics.Win.ValueList(7905313);
  163. Infragistics.Win.ValueListItem valueListItem32 = new Infragistics.Win.ValueListItem();
  164. Infragistics.Win.ValueListItem valueListItem33 = new Infragistics.Win.ValueListItem();
  165. Infragistics.Win.ValueListItem valueListItem34 = new Infragistics.Win.ValueListItem();
  166. Infragistics.Win.ValueListItem valueListItem35 = new Infragistics.Win.ValueListItem();
  167. Infragistics.Win.ValueListItem valueListItem36 = new Infragistics.Win.ValueListItem();
  168. Infragistics.Win.ValueListItem valueListItem37 = new Infragistics.Win.ValueListItem();
  169. Infragistics.Win.ValueListItem valueListItem38 = new Infragistics.Win.ValueListItem();
  170. Infragistics.Win.ValueListItem valueListItem39 = new Infragistics.Win.ValueListItem();
  171. Infragistics.Win.ValueListItem valueListItem40 = new Infragistics.Win.ValueListItem();
  172. Infragistics.Win.ValueListItem valueListItem41 = new Infragistics.Win.ValueListItem();
  173. Infragistics.Win.ValueListItem valueListItem42 = new Infragistics.Win.ValueListItem();
  174. Infragistics.Win.ValueListItem valueListItem43 = new Infragistics.Win.ValueListItem();
  175. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1");
  176. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  177. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("set");
  178. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("excel");
  179. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("SRow");
  180. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Close");
  181. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  182. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("set");
  183. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("excel");
  184. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("SRow");
  185. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Close");
  186. this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
  187. this.chkHeatbo = new System.Windows.Forms.CheckBox();
  188. this.chkBZ = new System.Windows.Forms.CheckBox();
  189. this.chkSteel = new System.Windows.Forms.CheckBox();
  190. this.ultraMaskedEdit2 = new System.Windows.Forms.TextBox();
  191. this.ultraMaskedEdit1 = new System.Windows.Forms.TextBox();
  192. this.comboBox2 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  193. this.cboGW = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  194. this.cmb_BZ = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  195. this.chkGasSample = new System.Windows.Forms.CheckBox();
  196. this.txtSteel = new System.Windows.Forms.TextBox();
  197. this.uldtEndTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
  198. this.uldtBeginTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
  199. this.label11 = new System.Windows.Forms.Label();
  200. this.label10 = new System.Windows.Forms.Label();
  201. this.chkRefresh = new System.Windows.Forms.CheckBox();
  202. this.label7 = new System.Windows.Forms.Label();
  203. this.button3 = new System.Windows.Forms.Button();
  204. this.btn_Down = new System.Windows.Forms.Button();
  205. this.btn_Up = new System.Windows.Forms.Button();
  206. this.txtPage = new System.Windows.Forms.TextBox();
  207. this.label6 = new System.Windows.Forms.Label();
  208. this.label5 = new System.Windows.Forms.Label();
  209. this.label1 = new System.Windows.Forms.Label();
  210. this.panel1 = new System.Windows.Forms.Panel();
  211. this.EMGrid = new Infragistics.Win.UltraWinGrid.UltraGrid();
  212. this.dataSet1 = new System.Data.DataSet();
  213. this.dataTable1 = new System.Data.DataTable();
  214. this.dataColumn7 = new System.Data.DataColumn();
  215. this.dataColumn8 = new System.Data.DataColumn();
  216. this.dataColumn9 = new System.Data.DataColumn();
  217. this.dataColumn84 = new System.Data.DataColumn();
  218. this.dataColumn85 = new System.Data.DataColumn();
  219. this.dataColumn1 = new System.Data.DataColumn();
  220. this.dataColumn2 = new System.Data.DataColumn();
  221. this.dataColumn3 = new System.Data.DataColumn();
  222. this.dataColumn4 = new System.Data.DataColumn();
  223. this.dataColumn5 = new System.Data.DataColumn();
  224. this.dataColumn6 = new System.Data.DataColumn();
  225. this.dataColumn10 = new System.Data.DataColumn();
  226. this.dataColumn11 = new System.Data.DataColumn();
  227. this.ultraPictureBox1 = new Infragistics.Win.UltraWinEditors.UltraPictureBox();
  228. this.label3 = new System.Windows.Forms.Label();
  229. this.label2 = new System.Windows.Forms.Label();
  230. this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  231. this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  232. this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  233. this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  234. this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  235. this.GridExcelExporter = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter(this.components);
  236. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
  237. this.ultraGroupBox1.SuspendLayout();
  238. ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).BeginInit();
  239. ((System.ComponentModel.ISupportInitialize)(this.cboGW)).BeginInit();
  240. ((System.ComponentModel.ISupportInitialize)(this.cmb_BZ)).BeginInit();
  241. ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).BeginInit();
  242. ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).BeginInit();
  243. this.panel1.SuspendLayout();
  244. ((System.ComponentModel.ISupportInitialize)(this.EMGrid)).BeginInit();
  245. ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
  246. ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).BeginInit();
  247. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
  248. this.SuspendLayout();
  249. //
  250. // ultraGroupBox1
  251. //
  252. this.ultraGroupBox1.Controls.Add(this.chkHeatbo);
  253. this.ultraGroupBox1.Controls.Add(this.chkBZ);
  254. this.ultraGroupBox1.Controls.Add(this.chkSteel);
  255. this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit2);
  256. this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit1);
  257. this.ultraGroupBox1.Controls.Add(this.comboBox2);
  258. this.ultraGroupBox1.Controls.Add(this.cboGW);
  259. this.ultraGroupBox1.Controls.Add(this.cmb_BZ);
  260. this.ultraGroupBox1.Controls.Add(this.chkGasSample);
  261. this.ultraGroupBox1.Controls.Add(this.txtSteel);
  262. this.ultraGroupBox1.Controls.Add(this.uldtEndTime);
  263. this.ultraGroupBox1.Controls.Add(this.uldtBeginTime);
  264. this.ultraGroupBox1.Controls.Add(this.label11);
  265. this.ultraGroupBox1.Controls.Add(this.label10);
  266. this.ultraGroupBox1.Controls.Add(this.chkRefresh);
  267. this.ultraGroupBox1.Controls.Add(this.label7);
  268. this.ultraGroupBox1.Controls.Add(this.button3);
  269. this.ultraGroupBox1.Controls.Add(this.btn_Down);
  270. this.ultraGroupBox1.Controls.Add(this.btn_Up);
  271. this.ultraGroupBox1.Controls.Add(this.txtPage);
  272. this.ultraGroupBox1.Controls.Add(this.label6);
  273. this.ultraGroupBox1.Controls.Add(this.label5);
  274. this.ultraGroupBox1.Controls.Add(this.label1);
  275. this.ultraGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
  276. this.ultraGroupBox1.Location = new System.Drawing.Point(0, 28);
  277. this.ultraGroupBox1.Name = "ultraGroupBox1";
  278. this.ultraGroupBox1.Size = new System.Drawing.Size(1350, 71);
  279. this.ultraGroupBox1.TabIndex = 3;
  280. //
  281. // chkHeatbo
  282. //
  283. this.chkHeatbo.Font = new System.Drawing.Font("宋体", 9F);
  284. this.chkHeatbo.Location = new System.Drawing.Point(15, 41);
  285. this.chkHeatbo.Name = "chkHeatbo";
  286. this.chkHeatbo.Size = new System.Drawing.Size(60, 24);
  287. this.chkHeatbo.TabIndex = 291;
  288. this.chkHeatbo.Text = "炉号从";
  289. this.chkHeatbo.CheckedChanged += new System.EventHandler(this.chkHeatbo_CheckedChanged);
  290. //
  291. // chkBZ
  292. //
  293. this.chkBZ.Font = new System.Drawing.Font("宋体", 9F);
  294. this.chkBZ.Location = new System.Drawing.Point(390, 38);
  295. this.chkBZ.Name = "chkBZ";
  296. this.chkBZ.Size = new System.Drawing.Size(51, 24);
  297. this.chkBZ.TabIndex = 290;
  298. this.chkBZ.Text = "班组";
  299. this.chkBZ.CheckedChanged += new System.EventHandler(this.chkBZ_CheckedChanged);
  300. //
  301. // chkSteel
  302. //
  303. this.chkSteel.Font = new System.Drawing.Font("宋体", 9F);
  304. this.chkSteel.Location = new System.Drawing.Point(655, 9);
  305. this.chkSteel.Name = "chkSteel";
  306. this.chkSteel.Size = new System.Drawing.Size(77, 24);
  307. this.chkSteel.TabIndex = 289;
  308. this.chkSteel.Text = "计划牌号";
  309. this.chkSteel.CheckedChanged += new System.EventHandler(this.chkSteel_CheckedChanged);
  310. //
  311. // ultraMaskedEdit2
  312. //
  313. this.ultraMaskedEdit2.Enabled = false;
  314. this.ultraMaskedEdit2.Location = new System.Drawing.Point(234, 41);
  315. this.ultraMaskedEdit2.MaxLength = 8;
  316. this.ultraMaskedEdit2.Name = "ultraMaskedEdit2";
  317. this.ultraMaskedEdit2.Size = new System.Drawing.Size(124, 21);
  318. this.ultraMaskedEdit2.TabIndex = 288;
  319. this.ultraMaskedEdit2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ultraMaskedEdit1_KeyPress);
  320. //
  321. // ultraMaskedEdit1
  322. //
  323. this.ultraMaskedEdit1.Enabled = false;
  324. this.ultraMaskedEdit1.Location = new System.Drawing.Point(78, 41);
  325. this.ultraMaskedEdit1.MaxLength = 8;
  326. this.ultraMaskedEdit1.Name = "ultraMaskedEdit1";
  327. this.ultraMaskedEdit1.Size = new System.Drawing.Size(124, 21);
  328. this.ultraMaskedEdit1.TabIndex = 287;
  329. this.ultraMaskedEdit1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ultraMaskedEdit1_KeyPress);
  330. //
  331. // comboBox2
  332. //
  333. appearance1.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
  334. appearance1.BorderColor = System.Drawing.Color.Black;
  335. this.comboBox2.Appearance = appearance1;
  336. this.comboBox2.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  337. this.comboBox2.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  338. this.comboBox2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  339. valueListItem1.DataValue = "0";
  340. valueListItem1.DisplayText = "铁水";
  341. valueListItem2.DataValue = "1";
  342. valueListItem2.DisplayText = "转炉";
  343. valueListItem3.DataValue = "2";
  344. valueListItem3.DisplayText = "吹氩站";
  345. valueListItem4.DataValue = "3";
  346. valueListItem4.DisplayText = "精炼炉";
  347. valueListItem30.DataValue = "4";
  348. valueListItem30.DisplayText = "RH炉";
  349. valueListItem31.DataValue = "5";
  350. valueListItem31.DisplayText = "VD炉";
  351. valueListItem5.DataValue = "6";
  352. valueListItem5.DisplayText = "连铸";
  353. this.comboBox2.Items.AddRange(new Infragistics.Win.ValueListItem[] {
  354. valueListItem1,
  355. valueListItem2,
  356. valueListItem3,
  357. valueListItem4,
  358. valueListItem30,
  359. valueListItem31,
  360. valueListItem5});
  361. this.comboBox2.Location = new System.Drawing.Point(523, 9);
  362. this.comboBox2.Name = "comboBox2";
  363. this.comboBox2.Size = new System.Drawing.Size(104, 19);
  364. this.comboBox2.TabIndex = 286;
  365. this.comboBox2.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  366. //
  367. // cboGW
  368. //
  369. appearance2.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
  370. appearance2.BorderColor = System.Drawing.Color.Black;
  371. this.cboGW.Appearance = appearance2;
  372. this.cboGW.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  373. this.cboGW.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  374. this.cboGW.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  375. valueListItem11.DataValue = "00";
  376. valueListItem11.DisplayText = "全部";
  377. valueListItem6.DataValue = "0";
  378. valueListItem6.DisplayText = "脱硫站";
  379. valueListItem7.DataValue = "1";
  380. valueListItem7.DisplayText = "转炉";
  381. valueListItem8.DataValue = "2";
  382. valueListItem8.DisplayText = "吹氩站";
  383. valueListItem9.DataValue = "3";
  384. valueListItem9.DisplayText = "精炼炉";
  385. valueListItem10.DataValue = "6";
  386. valueListItem10.DisplayText = "连铸";
  387. this.cboGW.Items.AddRange(new Infragistics.Win.ValueListItem[] {
  388. valueListItem11,
  389. valueListItem6,
  390. valueListItem7,
  391. valueListItem8,
  392. valueListItem9,
  393. valueListItem10});
  394. this.cboGW.Location = new System.Drawing.Point(444, 10);
  395. this.cboGW.Name = "cboGW";
  396. this.cboGW.Size = new System.Drawing.Size(71, 19);
  397. this.cboGW.TabIndex = 285;
  398. this.cboGW.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  399. this.cboGW.SelectionChanged += new System.EventHandler(this.cboGW_SelectionChanged);
  400. //
  401. // cmb_BZ
  402. //
  403. appearance3.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
  404. appearance3.BorderColor = System.Drawing.Color.Black;
  405. this.cmb_BZ.Appearance = appearance3;
  406. this.cmb_BZ.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  407. this.cmb_BZ.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  408. this.cmb_BZ.Enabled = false;
  409. this.cmb_BZ.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  410. valueListItem12.DataValue = "1";
  411. valueListItem12.DisplayText = "甲班";
  412. valueListItem13.DataValue = "2";
  413. valueListItem13.DisplayText = "乙班";
  414. valueListItem14.DataValue = "3";
  415. valueListItem14.DisplayText = "丙班";
  416. valueListItem15.DataValue = "4";
  417. valueListItem15.DisplayText = "丁班";
  418. this.cmb_BZ.Items.AddRange(new Infragistics.Win.ValueListItem[] {
  419. valueListItem12,
  420. valueListItem13,
  421. valueListItem14,
  422. valueListItem15});
  423. this.cmb_BZ.Location = new System.Drawing.Point(445, 41);
  424. this.cmb_BZ.Name = "cmb_BZ";
  425. this.cmb_BZ.Size = new System.Drawing.Size(71, 19);
  426. this.cmb_BZ.TabIndex = 284;
  427. this.cmb_BZ.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  428. //
  429. // chkGasSample
  430. //
  431. this.chkGasSample.Font = new System.Drawing.Font("宋体", 9F);
  432. this.chkGasSample.Location = new System.Drawing.Point(654, 37);
  433. this.chkGasSample.Name = "chkGasSample";
  434. this.chkGasSample.Size = new System.Drawing.Size(73, 24);
  435. this.chkGasSample.TabIndex = 85;
  436. this.chkGasSample.Text = "气体样";
  437. //
  438. // txtSteel
  439. //
  440. this.txtSteel.Enabled = false;
  441. this.txtSteel.Location = new System.Drawing.Point(732, 10);
  442. this.txtSteel.Name = "txtSteel";
  443. this.txtSteel.Size = new System.Drawing.Size(127, 21);
  444. this.txtSteel.TabIndex = 84;
  445. this.txtSteel.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSteel_KeyPress);
  446. //
  447. // uldtEndTime
  448. //
  449. this.uldtEndTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
  450. this.uldtEndTime.FormatString = "yyyy-MM-dd HH:mm";
  451. this.uldtEndTime.Location = new System.Drawing.Point(234, 9);
  452. this.uldtEndTime.MaskInput = "yyyy-mm-dd hh:mm";
  453. this.uldtEndTime.Name = "uldtEndTime";
  454. this.uldtEndTime.Size = new System.Drawing.Size(126, 21);
  455. this.uldtEndTime.TabIndex = 80;
  456. //
  457. // uldtBeginTime
  458. //
  459. this.uldtBeginTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
  460. this.uldtBeginTime.FormatString = "yyyy-MM-dd HH:mm";
  461. this.uldtBeginTime.Location = new System.Drawing.Point(78, 9);
  462. this.uldtBeginTime.MaskInput = "yyyy-mm-dd hh:mm";
  463. this.uldtBeginTime.Name = "uldtBeginTime";
  464. this.uldtBeginTime.Size = new System.Drawing.Size(126, 21);
  465. this.uldtBeginTime.TabIndex = 79;
  466. //
  467. // label11
  468. //
  469. this.label11.AutoSize = true;
  470. this.label11.Font = new System.Drawing.Font("宋体", 9F);
  471. this.label11.Location = new System.Drawing.Point(211, 43);
  472. this.label11.Name = "label11";
  473. this.label11.Size = new System.Drawing.Size(17, 12);
  474. this.label11.TabIndex = 78;
  475. this.label11.Text = "到";
  476. //
  477. // label10
  478. //
  479. this.label10.AutoSize = true;
  480. this.label10.Font = new System.Drawing.Font("宋体", 9F);
  481. this.label10.Location = new System.Drawing.Point(211, 12);
  482. this.label10.Name = "label10";
  483. this.label10.Size = new System.Drawing.Size(17, 12);
  484. this.label10.TabIndex = 77;
  485. this.label10.Text = "到";
  486. //
  487. // chkRefresh
  488. //
  489. this.chkRefresh.Font = new System.Drawing.Font("宋体", 9F);
  490. this.chkRefresh.Location = new System.Drawing.Point(733, 37);
  491. this.chkRefresh.Name = "chkRefresh";
  492. this.chkRefresh.Size = new System.Drawing.Size(82, 24);
  493. this.chkRefresh.TabIndex = 71;
  494. this.chkRefresh.Text = "自动刷新";
  495. this.chkRefresh.CheckedChanged += new System.EventHandler(this.chkRefresh_CheckedChanged);
  496. //
  497. // label7
  498. //
  499. this.label7.AutoSize = true;
  500. this.label7.Font = new System.Drawing.Font("宋体", 9F);
  501. this.label7.Location = new System.Drawing.Point(381, 12);
  502. this.label7.Name = "label7";
  503. this.label7.Size = new System.Drawing.Size(53, 12);
  504. this.label7.TabIndex = 68;
  505. this.label7.Text = "工序位置";
  506. //
  507. // button3
  508. //
  509. this.button3.Font = new System.Drawing.Font("宋体", 9F);
  510. this.button3.Location = new System.Drawing.Point(1272, 37);
  511. this.button3.Name = "button3";
  512. this.button3.Size = new System.Drawing.Size(72, 23);
  513. this.button3.TabIndex = 58;
  514. this.button3.Text = "全部显示";
  515. this.button3.UseVisualStyleBackColor = false;
  516. this.button3.Visible = false;
  517. //
  518. // btn_Down
  519. //
  520. this.btn_Down.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  521. this.btn_Down.Location = new System.Drawing.Point(1224, 37);
  522. this.btn_Down.Name = "btn_Down";
  523. this.btn_Down.Size = new System.Drawing.Size(40, 23);
  524. this.btn_Down.TabIndex = 57;
  525. this.btn_Down.Text = ">>";
  526. this.btn_Down.Visible = false;
  527. //
  528. // btn_Up
  529. //
  530. this.btn_Up.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  531. this.btn_Up.Location = new System.Drawing.Point(1120, 37);
  532. this.btn_Up.Name = "btn_Up";
  533. this.btn_Up.Size = new System.Drawing.Size(40, 23);
  534. this.btn_Up.TabIndex = 56;
  535. this.btn_Up.Text = "<<";
  536. this.btn_Up.Visible = false;
  537. //
  538. // txtPage
  539. //
  540. this.txtPage.Location = new System.Drawing.Point(1160, 38);
  541. this.txtPage.Name = "txtPage";
  542. this.txtPage.Size = new System.Drawing.Size(64, 21);
  543. this.txtPage.TabIndex = 55;
  544. this.txtPage.Text = "40";
  545. this.txtPage.Visible = false;
  546. //
  547. // label6
  548. //
  549. this.label6.AutoSize = true;
  550. this.label6.ForeColor = System.Drawing.Color.Red;
  551. this.label6.Location = new System.Drawing.Point(1214, 11);
  552. this.label6.Name = "label6";
  553. this.label6.Size = new System.Drawing.Size(0, 12);
  554. this.label6.TabIndex = 54;
  555. this.label6.Visible = false;
  556. //
  557. // label5
  558. //
  559. this.label5.AutoSize = true;
  560. this.label5.Font = new System.Drawing.Font("宋体", 9F);
  561. this.label5.Location = new System.Drawing.Point(1118, 10);
  562. this.label5.Name = "label5";
  563. this.label5.Size = new System.Drawing.Size(83, 12);
  564. this.label5.TabIndex = 52;
  565. this.label5.Text = "当前数据显示:";
  566. this.label5.Visible = false;
  567. //
  568. // label1
  569. //
  570. this.label1.AutoSize = true;
  571. this.label1.Font = new System.Drawing.Font("宋体", 9F);
  572. this.label1.Location = new System.Drawing.Point(7, 12);
  573. this.label1.Name = "label1";
  574. this.label1.Size = new System.Drawing.Size(65, 12);
  575. this.label1.TabIndex = 15;
  576. this.label1.Text = "化验时间从";
  577. //
  578. // panel1
  579. //
  580. this.panel1.Controls.Add(this.EMGrid);
  581. this.panel1.Controls.Add(this.ultraPictureBox1);
  582. this.panel1.Controls.Add(this.label3);
  583. this.panel1.Controls.Add(this.label2);
  584. this.panel1.Controls.Add(this.ultraGroupBox1);
  585. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
  586. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
  587. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
  588. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
  589. this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
  590. this.panel1.Location = new System.Drawing.Point(0, 0);
  591. this.panel1.Name = "panel1";
  592. this.panel1.Size = new System.Drawing.Size(1350, 653);
  593. this.panel1.TabIndex = 12;
  594. //
  595. // EMGrid
  596. //
  597. this.EMGrid.DataMember = "Table1";
  598. this.EMGrid.DataSource = this.dataSet1;
  599. ultraGridColumn1.Header.VisiblePosition = 0;
  600. ultraGridColumn1.Hidden = true;
  601. ultraGridColumn1.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  602. ultraGridColumn1.Width = 54;
  603. ultraGridColumn2.Header.Caption = "炉号";
  604. ultraGridColumn2.Header.VisiblePosition = 1;
  605. ultraGridColumn2.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  606. ultraGridColumn2.Width = 179;
  607. ultraGridColumn3.Header.VisiblePosition = 6;
  608. ultraGridColumn3.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  609. ultraGridColumn3.Width = 116;
  610. ultraGridColumn4.Header.VisiblePosition = 7;
  611. ultraGridColumn4.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  612. ultraGridColumn4.Width = 160;
  613. ultraGridColumn5.Header.VisiblePosition = 4;
  614. ultraGridColumn5.Hidden = true;
  615. ultraGridColumn5.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  616. ultraGridColumn6.Header.VisiblePosition = 5;
  617. ultraGridColumn6.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  618. ultraGridColumn6.Width = 53;
  619. ultraGridColumn7.Header.VisiblePosition = 2;
  620. ultraGridColumn7.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  621. ultraGridColumn7.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown;
  622. ultraGridColumn7.Width = 66;
  623. ultraGridColumn8.Header.VisiblePosition = 3;
  624. ultraGridColumn8.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  625. ultraGridColumn8.Width = 40;
  626. ultraGridColumn9.Header.VisiblePosition = 8;
  627. ultraGridColumn9.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  628. ultraGridColumn10.Header.VisiblePosition = 9;
  629. ultraGridColumn10.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  630. ultraGridColumn11.Header.VisiblePosition = 10;
  631. ultraGridColumn11.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  632. ultraGridColumn12.Header.VisiblePosition = 11;
  633. ultraGridColumn12.Hidden = true;
  634. ultraGridColumn12.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  635. ultraGridColumn13.Header.VisiblePosition = 12;
  636. ultraGridColumn13.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(70, 0);
  637. ultraGridColumn13.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 25);
  638. ultraGridBand1.Columns.AddRange(new object[] {
  639. ultraGridColumn1,
  640. ultraGridColumn2,
  641. ultraGridColumn3,
  642. ultraGridColumn4,
  643. ultraGridColumn5,
  644. ultraGridColumn6,
  645. ultraGridColumn7,
  646. ultraGridColumn8,
  647. ultraGridColumn9,
  648. ultraGridColumn10,
  649. ultraGridColumn11,
  650. ultraGridColumn12,
  651. ultraGridColumn13});
  652. ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
  653. this.EMGrid.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
  654. this.EMGrid.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  655. this.EMGrid.DisplayLayout.Override.WrapHeaderText = Infragistics.Win.DefaultableBoolean.True;
  656. valueListItem32.DataValue = "11";
  657. valueListItem32.DisplayText = "白班-甲";
  658. valueListItem33.DataValue = "12";
  659. valueListItem33.DisplayText = "白班-乙";
  660. valueListItem34.DataValue = "13";
  661. valueListItem34.DisplayText = "白班-丙";
  662. valueListItem35.DataValue = "14";
  663. valueListItem35.DisplayText = "白班-丁";
  664. valueListItem36.DataValue = "21";
  665. valueListItem36.DisplayText = "小夜-甲";
  666. valueListItem37.DataValue = "22";
  667. valueListItem37.DisplayText = "小夜-乙";
  668. valueListItem38.DataValue = "23";
  669. valueListItem38.DisplayText = "小夜-丙";
  670. valueListItem39.DataValue = "24";
  671. valueListItem39.DisplayText = "小夜-丁";
  672. valueListItem40.DataValue = "31";
  673. valueListItem40.DisplayText = "夜-甲";
  674. valueListItem41.DataValue = "32";
  675. valueListItem41.DisplayText = "大夜-乙";
  676. valueListItem42.DataValue = "33";
  677. valueListItem42.DisplayText = "大夜-丙";
  678. valueListItem43.DataValue = "34";
  679. valueListItem43.DisplayText = "大夜-丁";
  680. valueList1.ValueListItems.AddRange(new Infragistics.Win.ValueListItem[] {
  681. valueListItem32,
  682. valueListItem33,
  683. valueListItem34,
  684. valueListItem35,
  685. valueListItem36,
  686. valueListItem37,
  687. valueListItem38,
  688. valueListItem39,
  689. valueListItem40,
  690. valueListItem41,
  691. valueListItem42,
  692. valueListItem43});
  693. this.EMGrid.DisplayLayout.ValueLists.AddRange(new Infragistics.Win.ValueList[] {
  694. valueList1});
  695. this.EMGrid.Dock = System.Windows.Forms.DockStyle.Fill;
  696. this.EMGrid.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  697. this.EMGrid.Location = new System.Drawing.Point(0, 99);
  698. this.EMGrid.Name = "EMGrid";
  699. this.EMGrid.Size = new System.Drawing.Size(1350, 554);
  700. this.EMGrid.TabIndex = 6;
  701. this.EMGrid.DoubleClickRow += new Infragistics.Win.UltraWinGrid.DoubleClickRowEventHandler(this.EMGrid_DoubleClickRow);
  702. //
  703. // dataSet1
  704. //
  705. this.dataSet1.DataSetName = "NewDataSet";
  706. this.dataSet1.Locale = new System.Globalization.CultureInfo("zh-CN");
  707. this.dataSet1.Tables.AddRange(new System.Data.DataTable[] {
  708. this.dataTable1});
  709. //
  710. // dataTable1
  711. //
  712. this.dataTable1.Columns.AddRange(new System.Data.DataColumn[] {
  713. this.dataColumn7,
  714. this.dataColumn8,
  715. this.dataColumn9,
  716. this.dataColumn84,
  717. this.dataColumn85,
  718. this.dataColumn1,
  719. this.dataColumn2,
  720. this.dataColumn3,
  721. this.dataColumn4,
  722. this.dataColumn5,
  723. this.dataColumn6,
  724. this.dataColumn10,
  725. this.dataColumn11});
  726. this.dataTable1.TableName = "Table1";
  727. //
  728. // dataColumn7
  729. //
  730. this.dataColumn7.ColumnName = "序号";
  731. //
  732. // dataColumn8
  733. //
  734. this.dataColumn8.ColumnName = "熔炼号";
  735. //
  736. // dataColumn9
  737. //
  738. this.dataColumn9.ColumnName = "计划牌号";
  739. //
  740. // dataColumn84
  741. //
  742. this.dataColumn84.ColumnName = "化验时间";
  743. //
  744. // dataColumn85
  745. //
  746. this.dataColumn85.Caption = "牌号编码";
  747. this.dataColumn85.ColumnName = "JHGZ";
  748. //
  749. // dataColumn1
  750. //
  751. this.dataColumn1.Caption = "班别";
  752. this.dataColumn1.ColumnName = "shiftcode";
  753. //
  754. // dataColumn2
  755. //
  756. this.dataColumn2.Caption = "工序";
  757. this.dataColumn2.ColumnName = "Station";
  758. //
  759. // dataColumn3
  760. //
  761. this.dataColumn3.Caption = "次数";
  762. this.dataColumn3.ColumnName = "SumTime";
  763. //
  764. // dataColumn4
  765. //
  766. this.dataColumn4.Caption = "判定牌号";
  767. this.dataColumn4.ColumnName = "JUDGE_STL_GRD";
  768. //
  769. // dataColumn5
  770. //
  771. this.dataColumn5.Caption = "判定结果";
  772. this.dataColumn5.ColumnName = "JUDGE_RESULT";
  773. //
  774. // dataColumn6
  775. //
  776. this.dataColumn6.Caption = "判定人";
  777. this.dataColumn6.ColumnName = "REG_ID";
  778. //
  779. // dataColumn10
  780. //
  781. this.dataColumn10.Caption = "次数";
  782. this.dataColumn10.ColumnName = "JUDGE_SEQ";
  783. //
  784. // dataColumn11
  785. //
  786. this.dataColumn11.Caption = "MN/S";
  787. this.dataColumn11.ColumnName = "SIMN";
  788. //
  789. // ultraPictureBox1
  790. //
  791. this.ultraPictureBox1.BorderShadowColor = System.Drawing.Color.Empty;
  792. this.ultraPictureBox1.Location = new System.Drawing.Point(339, 286);
  793. this.ultraPictureBox1.Name = "ultraPictureBox1";
  794. this.ultraPictureBox1.Size = new System.Drawing.Size(100, 50);
  795. this.ultraPictureBox1.TabIndex = 16;
  796. //
  797. // label3
  798. //
  799. this.label3.BackColor = System.Drawing.Color.Blue;
  800. this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
  801. this.label3.Location = new System.Drawing.Point(564, 271);
  802. this.label3.Name = "label3";
  803. this.label3.Size = new System.Drawing.Size(100, 23);
  804. this.label3.TabIndex = 11;
  805. this.label3.Text = "label3";
  806. this.label3.Visible = false;
  807. //
  808. // label2
  809. //
  810. this.label2.BackColor = System.Drawing.Color.Red;
  811. this.label2.Location = new System.Drawing.Point(458, 230);
  812. this.label2.Name = "label2";
  813. this.label2.Size = new System.Drawing.Size(100, 23);
  814. this.label2.TabIndex = 6;
  815. this.label2.Text = "label2";
  816. this.label2.Visible = false;
  817. //
  818. // _panel1_Toolbars_Dock_Area_Left
  819. //
  820. this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  821. this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  822. this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  823. this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  824. this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 28);
  825. this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
  826. this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 625);
  827. this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
  828. //
  829. // ultraToolbarsManager1
  830. //
  831. this.ultraToolbarsManager1.DesignerFlags = 1;
  832. this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
  833. this.ultraToolbarsManager1.LockToolbars = true;
  834. this.ultraToolbarsManager1.ShowFullMenusDelay = 500;
  835. this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
  836. this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
  837. ultraToolbar1.DockedColumn = 0;
  838. ultraToolbar1.DockedRow = 0;
  839. buttonTool1.InstanceProps.IsFirstInGroup = true;
  840. buttonTool2.InstanceProps.IsFirstInGroup = true;
  841. buttonTool3.InstanceProps.IsFirstInGroup = true;
  842. buttonTool4.InstanceProps.IsFirstInGroup = true;
  843. buttonTool5.InstanceProps.IsFirstInGroup = true;
  844. ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  845. buttonTool1,
  846. buttonTool2,
  847. buttonTool3,
  848. buttonTool4,
  849. buttonTool5});
  850. ultraToolbar1.Text = "UltraToolbar1";
  851. this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  852. ultraToolbar1});
  853. buttonTool6.SharedPropsInternal.Caption = "查询(&Q)";
  854. buttonTool6.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  855. buttonTool7.SharedPropsInternal.Caption = "设置样点(&S)";
  856. buttonTool7.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  857. buttonTool8.SharedPropsInternal.Caption = "导出(&P)";
  858. buttonTool8.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  859. buttonTool9.SharedPropsInternal.Caption = "设置列(&R)";
  860. buttonTool9.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  861. buttonTool10.SharedPropsInternal.Caption = "关闭(&C)";
  862. buttonTool10.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  863. this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  864. buttonTool6,
  865. buttonTool7,
  866. buttonTool8,
  867. buttonTool9,
  868. buttonTool10});
  869. this.ultraToolbarsManager1.Visible = false;
  870. //
  871. // _panel1_Toolbars_Dock_Area_Right
  872. //
  873. this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  874. this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  875. this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  876. this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  877. this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1350, 28);
  878. this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
  879. this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 625);
  880. this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
  881. //
  882. // _panel1_Toolbars_Dock_Area_Top
  883. //
  884. this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  885. this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  886. this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  887. this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  888. this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  889. this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
  890. this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1350, 28);
  891. this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
  892. //
  893. // _panel1_Toolbars_Dock_Area_Bottom
  894. //
  895. this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  896. this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  897. this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  898. this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  899. this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 653);
  900. this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
  901. this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1350, 0);
  902. this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
  903. //
  904. // frmLgElements
  905. //
  906. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  907. this.ClientSize = new System.Drawing.Size(1350, 653);
  908. this.Controls.Add(this.panel1);
  909. this.Name = "frmLgElements";
  910. this.Text = "化学成分查询";
  911. this.Load += new System.EventHandler(this.ELEMENTS_Load);
  912. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
  913. this.ultraGroupBox1.ResumeLayout(false);
  914. this.ultraGroupBox1.PerformLayout();
  915. ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).EndInit();
  916. ((System.ComponentModel.ISupportInitialize)(this.cboGW)).EndInit();
  917. ((System.ComponentModel.ISupportInitialize)(this.cmb_BZ)).EndInit();
  918. ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).EndInit();
  919. ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).EndInit();
  920. this.panel1.ResumeLayout(false);
  921. ((System.ComponentModel.ISupportInitialize)(this.EMGrid)).EndInit();
  922. ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit();
  923. ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).EndInit();
  924. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
  925. this.ResumeLayout(false);
  926. }
  927. #endregion
  928. #endregion
  929. private DataSet _dsAll = new DataSet();
  930. private DataSet _dsSet;
  931. private int _intBegin = 0;
  932. private int _intEnd = 40;
  933. private string _strDuty = "0";
  934. private string _strGW = "";
  935. private string _dvRowFilter = "";
  936. private string _strWhere2 = "";
  937. private string _szTableName = "";
  938. public string _devPos = "";
  939. private Color c1 = Color.PaleGreen;
  940. private Color c2 = Color.White;
  941. public string workShopNo="";
  942. private Color c3 = Color.White;
  943. private Hashtable tabResult;
  944. private Hashtable tabSteel;
  945. public delegate void UpdateUIDelegate(bool IsDataLoaded);
  946. private void ELEMENTS_Load(object sender, System.EventArgs e)
  947. {
  948. label6.Visible = false;
  949. workShopNo = this.CustomInfo;
  950. uldtBeginTime.Value = DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:59";
  951. uldtEndTime.Value = DateTime.Today.ToString("yyyy-MM-dd") + " 23:59:59";
  952. getElements();
  953. GetDudgeResult();
  954. InitSteel();
  955. GetDataFromAll();
  956. StartGetDataThread();
  957. cboGW.SelectedIndex = 1;
  958. }
  959. // 获取所有化学成份列名
  960. /// <summary>
  961. /// 获取所有化学成份列名
  962. /// </summary>
  963. private void getElements()
  964. {
  965. try
  966. {
  967. string strElementsRow = ElementsConfig.GetElementsRow(); //调用函数获取要显示的列名
  968. strERow = strElementsRow.Split('*');
  969. for (int i = 0; i < strERow.Length; i++)
  970. {
  971. dataTable1.Columns.Add(strERow[i] , typeof(System.Decimal)); //添加列
  972. }
  973. //string strErr = "";
  974. //ArrayList arry = new ArrayList();
  975. //arry.Add("FrmLgElements.select");//此ID为XML文件ID
  976. //CommonClientToServer cctos = new CommonClientToServer();
  977. //cctos.ob = this.ob;
  978. //DataSet dsElements = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  979. // "doSimpleQuery", arry, out strErr);
  980. //if (strErr == "" && dsElements != null)
  981. //{
  982. // foreach (DataRow dr in dsElements.Tables[0].Rows)
  983. // {
  984. // dataTable1.Columns.Add(dr["BaseName"].ToString(), typeof(System.Decimal)); //添加列
  985. // }
  986. //}
  987. }
  988. catch { }
  989. }
  990. // 初始化Grind牌号
  991. /// <summary>
  992. /// 初始化Grind牌号
  993. /// </summary>
  994. private void InitSteel()
  995. {
  996. try
  997. {
  998. string strErr = "";
  999. EMGrid.DisplayLayout.ValueLists.Add("SteelCode");
  1000. EMGrid.DisplayLayout.ValueLists.Add("JUDGE_STL_GRD");
  1001. ArrayList arry = new ArrayList();
  1002. arry.Add("ElementsSteel.Query");//此ID为XML文件ID
  1003. CommonClientToServer cctos = new CommonClientToServer();
  1004. cctos.ob = this.ob;
  1005. DataSet dsSteel = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  1006. "doSimpleQuery", arry, out strErr);
  1007. if (strErr == "" && dsSteel != null)
  1008. {
  1009. //SetColumnModeSteel(EMGrid, dsSteel);
  1010. tabSteel = new Hashtable();
  1011. //初始经Grid牌号字段数据集
  1012. for (int i = 0; i < dsSteel.Tables[0].Rows.Count; i++)
  1013. {
  1014. EMGrid.DisplayLayout.ValueLists["SteelCode"].ValueListItems.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
  1015. EMGrid.DisplayLayout.ValueLists["JUDGE_STL_GRD"].ValueListItems.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
  1016. tabSteel.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
  1017. }
  1018. //绑定单位
  1019. EMGrid.DisplayLayout.Bands[0].Columns["计划牌号"].ValueList = EMGrid.DisplayLayout.ValueLists["SteelCode"];
  1020. EMGrid.DisplayLayout.Bands[0].Columns["JUDGE_STL_GRD"].ValueList = EMGrid.DisplayLayout.ValueLists["JUDGE_STL_GRD"];
  1021. }
  1022. }
  1023. catch { }
  1024. }
  1025. // 初始化判定结果编码
  1026. /// <summary>
  1027. /// 初始化判定结果编码
  1028. /// </summary>
  1029. public void GetDudgeResult()
  1030. {
  1031. try
  1032. {
  1033. string strErr = "";
  1034. ArrayList arry = new ArrayList();
  1035. arry.Add("frmBaseInfo_Children.select");
  1036. arry.Add("1031");
  1037. CommonClientToServer ccs = new CommonClientToServer();
  1038. ccs.ob = this.ob;
  1039. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  1040. tabResult = new Hashtable();
  1041. string strCode = "";
  1042. string strResult = "";
  1043. if (ds.Tables[0].Rows.Count > 0)
  1044. {
  1045. for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
  1046. {
  1047. strCode = ds.Tables[0].Rows[i]["BASECODE"].ToString();
  1048. strResult = ds.Tables[0].Rows[i]["BASENAME"].ToString();
  1049. tabResult.Add(strCode, strResult);
  1050. }
  1051. }
  1052. }
  1053. catch { }
  1054. }
  1055. // 铁水查询条件
  1056. /// <summary>
  1057. /// 铁水查询条件
  1058. /// </summary>
  1059. private void BuildSQLWithHMP()
  1060. {
  1061. try
  1062. {
  1063. _strWhere2 = "";
  1064. string strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1065. string strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1066. _strWhere2 += " and b.heatno = a.hudwid and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH24:Mi:ss')"
  1067. + "between '" + strStartTime + "' and '" + strEndTime + "'";
  1068. //岗位
  1069. if (_strGW != "")
  1070. {
  1071. _strWhere2 += String.Format(" and substr(b.STATIONCODE,1,1) ='{0}' ", this._strGW);
  1072. }
  1073. string szWZ = this._devPos.Substring(3, 2);
  1074. if (szWZ != "00")
  1075. {
  1076. _strWhere2 += string.Format(" and substr(b.STATIONCODE,2,2) = '{0}' ", szWZ);
  1077. }
  1078. //班组
  1079. if (chkBZ.Checked)
  1080. {
  1081. _strWhere2 += string.Format(" and substr(a.SHIFTCODE,2,1) = '{0}' ", this._strDuty);
  1082. }
  1083. //气体样
  1084. if (chkGasSample.Checked)
  1085. {
  1086. _strWhere2 += " and (N>0 or H>0 or O>0) ";
  1087. }
  1088. }
  1089. catch { }
  1090. }
  1091. // 非铁水查询条件
  1092. /// <summary>
  1093. /// 非铁水查询条件
  1094. /// </summary>
  1095. private void BuildSQLWithOutHMP()
  1096. {
  1097. try
  1098. {
  1099. string strErr = "";
  1100. _strWhere2 = "";
  1101. string strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1102. string strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1103. _strWhere2 += " and b.HEATNO = a.HEATNO and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH24:Mi:ss')"
  1104. +"between '" + strStartTime + "' and '" + strEndTime + "'";
  1105. //熔炼号
  1106. if (chkHeatbo.Checked)
  1107. {
  1108. if (this.ultraMaskedEdit1.Text.Length == 0 && this.ultraMaskedEdit2.Text.Length > 0)
  1109. {
  1110. _strWhere2 += String.Format(" and a.HEATNO like '%{0}%' ", this.ultraMaskedEdit2.Text.Trim());
  1111. }
  1112. if (this.ultraMaskedEdit2.Text.Length == 0 && this.ultraMaskedEdit1.Text.Length > 0)
  1113. {
  1114. _strWhere2 += String.Format(" and a.HEATNO like '%{0}%' ", this.ultraMaskedEdit1.Text.Trim());
  1115. }
  1116. if (this.ultraMaskedEdit2.Text.Length > 0 && this.ultraMaskedEdit1.Text.Length > 0)
  1117. {
  1118. _strWhere2 += String.Format(" and a.HEATNO between '{0}' and '{1}' ", this.ultraMaskedEdit1.Text.Trim(), this.ultraMaskedEdit2.Text.Trim());
  1119. }
  1120. }
  1121. //岗位
  1122. if (_strGW != "")
  1123. {
  1124. _strWhere2 += String.Format(" and substr(b.STATIONCODE,1,1) ='{0}' ", this._strGW);
  1125. }
  1126. string szWZ = this._devPos.Substring(3, 2);
  1127. if (szWZ != "00")
  1128. {
  1129. _strWhere2 += string.Format(" and substr(b.STATIONCODE,2,2) = '{0}' ", szWZ);
  1130. }
  1131. //班组
  1132. if (chkBZ.Checked)
  1133. {
  1134. _strWhere2 += string.Format(" and substr(a.SHIFTCODE,2,1) = '{0}' ", this._strDuty);
  1135. }
  1136. string str = "";
  1137. //牌号
  1138. if (chkSteel.Checked)
  1139. {
  1140. if (txtSteel.Text.Trim() != "")
  1141. str = txtSteel.Text.ToString();
  1142. else
  1143. str = "";
  1144. if (str != "")
  1145. {
  1146. string strSteeAll = "";
  1147. string steel = "";
  1148. string[] strSteel = str.Split(',');
  1149. for (int i = 0; i < strSteel.Length; i++)
  1150. {
  1151. if (!string.IsNullOrEmpty(strSteel[i]))
  1152. {
  1153. if (tabSteel != null)
  1154. {
  1155. foreach (DictionaryEntry dSteel in tabSteel)
  1156. {
  1157. if (dSteel.Value.ToString() == strSteel[i])
  1158. {
  1159. steel = dSteel.Key.ToString();
  1160. strSteeAll += "'" + steel + "',";
  1161. }
  1162. }
  1163. }
  1164. }
  1165. }
  1166. str = strSteeAll.Substring(0, strSteeAll.Length - 1);
  1167. _strWhere2 += string.Format(" and a.plansteel in ({0})", str);
  1168. }
  1169. }
  1170. //气体样
  1171. if (chkGasSample.Checked)
  1172. {
  1173. _strWhere2 += " and (N>0 or H>0 or O>0) ";
  1174. }
  1175. }
  1176. catch { }
  1177. }
  1178. private void BuildSQLWithOutID()
  1179. {
  1180. try
  1181. {
  1182. string begTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1183. string endTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1184. string strStartTime = "";
  1185. string strEndTime = "";
  1186. if (Convert.ToDateTime(uldtBeginTime.Text.Trim()) > Convert.ToDateTime(uldtEndTime.Text.Trim()))
  1187. {
  1188. //MessageBox.Show("选择的开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1189. return ;
  1190. }
  1191. strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1192. strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  1193. if (_devPos.Substring(0, 3) == "HMP" || _devPos.Substring(0, 4) == "SYGW")// 铁水 或者 所有岗位
  1194. {
  1195. _strWhere2 = " and a.hudwid = b.heatno and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH24:Mi:ss') between '" + strStartTime + "' and '" + strEndTime + "' ";
  1196. Isbool = true;
  1197. }
  1198. else
  1199. {
  1200. _strWhere2 = " and b.HEATNO = a.HEATNO and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH24:Mi:ss') between '" + strStartTime + "' and '" + strEndTime + "' ";
  1201. Isbool = false;
  1202. }
  1203. string str = this._devPos.Substring(0, 3), szWZ = this._devPos.Substring(3, 2);
  1204. if (this._strDuty != "0")
  1205. _strWhere2 += string.Format(" and substr(a.SHIFTCODE,2,1) = '{0}' ", this._strDuty);
  1206. if (str != "HMP" && szWZ != "00" && str != "SYG")
  1207. _strWhere2 += string.Format(" and substr(b.STATIONCODE,2,2) = '{0}'", szWZ);
  1208. if (_strGW != "")
  1209. {
  1210. _strWhere2 += String.Format(" and substr(b.STATIONCODE,1,1) ='{0}' ", this._strGW);
  1211. }
  1212. if (chkSteel.Checked)
  1213. {
  1214. if (txtSteel.Text.Trim() != "")
  1215. str = txtSteel.Text.ToString();
  1216. else
  1217. str = "";
  1218. if (str != "")
  1219. {
  1220. string strSteeAll = "";
  1221. string steel = "";
  1222. string[] strSteel = str.Split(',');
  1223. for (int i = 0; i < strSteel.Length; i++)
  1224. {
  1225. if (!string.IsNullOrEmpty(strSteel[i]))
  1226. {
  1227. if (tabSteel != null)
  1228. {
  1229. foreach (DictionaryEntry dSteel in tabSteel)
  1230. {
  1231. if (dSteel.Value.ToString() == strSteel[i].ToUpper())
  1232. {
  1233. steel = dSteel.Key.ToString().ToUpper();
  1234. strSteeAll += "'" + steel + "',";
  1235. }
  1236. }
  1237. }
  1238. }
  1239. }
  1240. if (strSteeAll.Length == 0)
  1241. {
  1242. str = "'1'";
  1243. }
  1244. if (strSteeAll.Length > 1)
  1245. {
  1246. str = strSteeAll.Substring(0, strSteeAll.Length - 1);
  1247. }
  1248. _strWhere2 += string.Format(" and a.plansteel in ({0})", str);
  1249. }
  1250. }
  1251. //气体样
  1252. if (chkGasSample.Checked)
  1253. {
  1254. _strWhere2 += " and (N>0 or H>0 or O>0) ";
  1255. }
  1256. }
  1257. catch { }
  1258. }
  1259. // 查询化学元素
  1260. /// <summary>
  1261. /// 查询化学元素
  1262. /// </summary>
  1263. public void GetDataFromAll()
  1264. {
  1265. try
  1266. {
  1267. if (Convert.ToDateTime(uldtEndTime.Value) < Convert.ToDateTime(uldtBeginTime.Value))
  1268. {
  1269. MessageBox.Show("结束时间必须大于等于开始时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1270. return;
  1271. }
  1272. if (chkHeatbo.Checked && this.ultraMaskedEdit1.Text.Length == 0 && this.ultraMaskedEdit2.Text.Length == 0)
  1273. {
  1274. MessageBox.Show("炉号不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1275. ultraMaskedEdit1.Focus();
  1276. return;
  1277. }
  1278. if (chkBZ.Checked && this.cmb_BZ.SelectedIndex<0)
  1279. {
  1280. MessageBox.Show("班组不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1281. cmb_BZ.Focus();
  1282. return;
  1283. }
  1284. if (chkSteel.Checked && txtSteel.Text.Length == 0)
  1285. {
  1286. MessageBox.Show("计划牌号不能空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1287. chkSteel.Focus();
  1288. return;
  1289. }
  1290. GetPost();
  1291. GetDuty();
  1292. string strFindName = "";
  1293. for (int i = 0; i < strERow.Length; i++)
  1294. {
  1295. if (!string.IsNullOrEmpty(strERow[i]))
  1296. strFindName = strFindName + "," + strERow[i];
  1297. }
  1298. if (_devPos.Substring(0, 3) == "HMP")
  1299. {
  1300. BuildSQLWithHMP();
  1301. Isbool = true;
  1302. }
  1303. else
  1304. {
  1305. BuildSQLWithOutHMP();
  1306. Isbool = false;
  1307. }
  1308. _dsAll = new DataSet();
  1309. //定义一个ArrayList集合存储变量[参数]值
  1310. ArrayList arry = new ArrayList();
  1311. ArrayList sqlList = new ArrayList();
  1312. if (Isbool)
  1313. {
  1314. arry.Add("FrmHMPElements_Query.select");
  1315. }
  1316. else
  1317. {
  1318. arry.Add("FrmLgElements_Query.select");
  1319. }
  1320. sqlList.Add(strFindName);
  1321. sqlList.Add(_szTableName);//表名
  1322. sqlList.Add("J#" + _szTableName);//表名
  1323. sqlList.Add(_strWhere2);
  1324. //调用服务端方法
  1325. CoreClientParam CCP_LgEts = new CoreClientParam();
  1326. DataTable dt = new DataTable();
  1327. CCP_LgEts.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
  1328. CCP_LgEts.MethodName = "doQuery";
  1329. CCP_LgEts.ServerParams = new object[] { arry, sqlList };
  1330. CCP_LgEts.SourceDataTable = dt;
  1331. this.ExecuteSortResultByQueryToDataTable(CCP_LgEts, CoreInvokeType.Internal);
  1332. _dsAll.Tables.Add(dt.Copy());
  1333. //_dsAll.Tables[0].DefaultView.RowFilter = _dvRowFilter;
  1334. //DataRow[] row = _dsAll.Tables[0].Select(_dvRowFilter);
  1335. //int currrow = row.Length;
  1336. //if (currrow < 40)
  1337. //{
  1338. // this._intEnd = currrow;
  1339. //}
  1340. //else
  1341. //{ _intEnd = Convert.ToInt32(this.txtPage.Text.Trim()); }
  1342. SetEachRowData();
  1343. }
  1344. catch (Exception ex)
  1345. {
  1346. Debug.WriteLine(ex.Message);
  1347. }
  1348. }
  1349. // 将数据装载到DATASET
  1350. /// <summary>
  1351. /// 将数据装载到DATASET
  1352. /// </summary>
  1353. private void SetEachRowData()
  1354. {
  1355. try
  1356. {
  1357. DataRow newRow = dataTable1.NewRow();
  1358. DataRow Drow=null;
  1359. dataTable1.Rows.Clear();
  1360. int RowId = 1;
  1361. if (_dsAll.Tables[0].Rows.Count == 0)
  1362. {
  1363. SetGridRowHidden();
  1364. }
  1365. for (int i = 0; i < this._dsAll.Tables[0].Rows.Count; i++)
  1366. {
  1367. newRow = dataTable1.NewRow();
  1368. // Drow = _dsAll.Tables[0].DefaultView[i].Row;
  1369. Drow = _dsAll.Tables[0].Rows[i];
  1370. newRow[0] = RowId++;
  1371. newRow[1] = Drow["HEATNO"].ToString();
  1372. newRow[6] = ClsBusinessPack.GetDeviceChineseName(Drow["STATIONCODE"].ToString());
  1373. string strAs = Drow["ASSAYTYPECODE"].ToString();
  1374. newRow[7] = strAs.Substring(strAs.Length - 1, 1); //次数
  1375. newRow[2] = Drow["gzbm"].ToString();
  1376. if (Drow["ASSAYDATE"].ToString() != "")
  1377. newRow[3] = Convert.ToDateTime(Drow["ASSAYDATE"]).ToString("yyyy-MM-dd HH:mm:ss");
  1378. //newRow[4] = Drow["GZBM"].ToString();
  1379. newRow[5] = Drow["shiftcode"].ToString();
  1380. //if (_devPos.Substring(0, 3) != "HMP")
  1381. //{
  1382. // newRow[11] = Drow["SIMN"].ToString();//20120109 新增
  1383. //}
  1384. foreach (DataColumn dc in _dsAll.Tables[0].Columns)
  1385. {
  1386. foreach (DataColumn dc1 in dataTable1.Columns)
  1387. {
  1388. if (dc1.ColumnName.ToUpper() == dc.ColumnName.ToUpper())
  1389. {
  1390. if (Drow[dc].ToString() != "")
  1391. newRow[dc1] = Drow[dc].ToString();
  1392. if (_devPos.Substring(0, 3) != "HMP")
  1393. {
  1394. if (newRow[7].ToString() != "" && Drow["JUDGE_SEQ"].ToString() != "")
  1395. {
  1396. if (strAs.Substring(0, 1) == "G")// && Convert.ToInt32(newRow[7]) == Convert.ToInt32(Drow["JUDGE_SEQ"].ToString()))
  1397. {
  1398. newRow[8] = Drow["JUDGE_STL_GRD"].ToString();
  1399. if (tabResult.Contains(Drow["JUDGE_RESULT"].ToString()))
  1400. {
  1401. newRow[9] = tabResult[Drow["JUDGE_RESULT"].ToString()].ToString(); //== "1" ? "合格" : "不合格";
  1402. }
  1403. newRow[10] = Drow["REG_ID"].ToString();
  1404. }
  1405. else
  1406. {
  1407. newRow[8] = null;
  1408. newRow[9] = null;
  1409. newRow[10] = null;
  1410. }
  1411. }
  1412. }
  1413. break;
  1414. }
  1415. }
  1416. }
  1417. dataTable1.Rows.Add(newRow);
  1418. }
  1419. SetGridRowHidden();
  1420. PublicMethod.RefreshAndAutoSize(EMGrid);
  1421. }
  1422. catch (Exception ex)
  1423. {
  1424. throw ex;
  1425. }
  1426. }
  1427. // 根据设置隐藏不要显示的列
  1428. /// <summary>
  1429. /// 根据设置隐藏不要显示的列
  1430. /// </summary>
  1431. private void SetGridRowHidden()
  1432. {
  1433. try
  1434. {
  1435. if (_devPos.Substring(0, 3) == "HMP")
  1436. {
  1437. EMGrid.DisplayLayout.Bands[0].Columns["熔炼号"].Header.Caption = "脱硫号";
  1438. }
  1439. else
  1440. {
  1441. EMGrid.DisplayLayout.Bands[0].Columns["熔炼号"].Header.Caption = "炉号";
  1442. }
  1443. //新增列时,相继修改J的值(新增n列时,j=j+n),否则将不会在界面显示
  1444. //for (int j = 13; j < EMGrid.DisplayLayout.Bands[0].Columns.Count; j++)
  1445. //{
  1446. // EMGrid.DisplayLayout.Bands[0].Columns[j].Hidden = true;
  1447. // EMGrid.DisplayLayout.Bands[0].Columns[j].Width = 60;
  1448. // EMGrid.DisplayLayout.Bands[0].Columns[j].CellActivation = Activation.NoEdit;
  1449. // EMGrid.DisplayLayout.Bands[0].Columns[0].CellActivation = Activation.AllowEdit;
  1450. // EMGrid.DisplayLayout.Bands[0].Columns[1].CellActivation = Activation.AllowEdit;
  1451. // EMGrid.DisplayLayout.Bands[0].Columns[2].CellActivation = Activation.NoEdit;
  1452. // EMGrid.DisplayLayout.Bands[0].Columns[3].CellActivation = Activation.NoEdit;
  1453. // EMGrid.DisplayLayout.Bands[0].Columns[4].CellActivation = Activation.NoEdit;
  1454. // EMGrid.DisplayLayout.Bands[0].Columns[5].CellActivation = Activation.NoEdit;
  1455. // EMGrid.DisplayLayout.Bands[0].Columns[6].CellActivation = Activation.NoEdit;
  1456. // EMGrid.DisplayLayout.Bands[0].Columns[7].CellActivation = Activation.NoEdit;
  1457. //}
  1458. //for (int i = 0; i < strERow.Length; i++)
  1459. //{
  1460. // if (!string.IsNullOrEmpty(strERow[i]))
  1461. // EMGrid.DisplayLayout.Bands[0].Columns[strERow[i]].Hidden = false;
  1462. //}
  1463. for (int j = 0; j < strERow.Length; j++)
  1464. {
  1465. EMGrid.DisplayLayout.Bands[0].Columns[strERow[j]].Header.VisiblePosition = j + 7;
  1466. }
  1467. EMGrid.DisplayLayout.Bands[0].Columns[5].Header.VisiblePosition = EMGrid.DisplayLayout.Bands[0].Columns.Count;
  1468. EMGrid.DisplayLayout.Bands[0].Columns[3].Header.VisiblePosition = EMGrid.DisplayLayout.Bands[0].Columns.Count;
  1469. EMGrid.DisplayLayout.Bands[0].Columns[6].Header.VisiblePosition = 2;
  1470. EMGrid.DisplayLayout.Bands[0].Columns[7].Header.VisiblePosition = 3;
  1471. EMGrid.DisplayLayout.Bands[0].Columns[2].Header.VisiblePosition = 4;
  1472. EMGrid.DisplayLayout.Bands[0].Columns[8].Header.VisiblePosition = 5;
  1473. EMGrid.DisplayLayout.Bands[0].Columns[9].Header.VisiblePosition = 6;
  1474. EMGrid.DisplayLayout.Bands[0].Columns[10].Header.VisiblePosition = 7;
  1475. // EMGrid.DisplayLayout.Bands[0].Columns[12].Header.VisiblePosition = 8;
  1476. EMGrid.DisplayLayout.Bands[0].Columns[1].Header.Fixed = true;
  1477. EMGrid.DisplayLayout.Bands[0].Columns[2].Header.Fixed = true;
  1478. EMGrid.DisplayLayout.Bands[0].Columns[6].Header.Fixed = true;
  1479. EMGrid.DisplayLayout.Bands[0].Columns[7].Header.Fixed = true;
  1480. for (int i = 0; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
  1481. {
  1482. EMGrid.DisplayLayout.Bands[0].Columns[i].CellActivation = Activation.ActivateOnly;
  1483. }
  1484. }
  1485. catch
  1486. {
  1487. }
  1488. }
  1489. // 获取工序位置
  1490. /// <summary>
  1491. /// 获取工序位置
  1492. /// </summary>
  1493. private void GetPost()
  1494. {
  1495. this._devPos = "";
  1496. switch (this.cboGW.SelectedIndex)
  1497. {
  1498. case 1:
  1499. this._devPos = "HMP0";
  1500. this._strGW = "B";
  1501. this._szTableName = "STL_HMP_OPTINFO";
  1502. break;
  1503. case 2:
  1504. this._devPos = "BOF0";
  1505. this._strGW = "C";
  1506. this._szTableName = "STL_BOF_OPTINFO";
  1507. break;
  1508. case 3:
  1509. this._devPos = "CAS0";
  1510. this._strGW = "D";
  1511. this._szTableName = "STL_CAS_OPTINFO";
  1512. break;
  1513. case 4:
  1514. this._devPos = "LFS0";
  1515. this._strGW = "E";
  1516. this._szTableName = "STL_LFS_OPTINFO";
  1517. break;
  1518. case 5:
  1519. this._devPos = "CCM0";
  1520. this._strGW = "G";
  1521. this._szTableName = "STL_CCM_OPTINFO";
  1522. break;
  1523. default:
  1524. this._devPos = "SYGW"; // 所有岗位
  1525. this._szTableName = "";
  1526. break;
  1527. }
  1528. this._devPos += this.comboBox2.Value.ToString();
  1529. }
  1530. // 根据选择获取班次序号
  1531. /// <summary>
  1532. /// 根据选择获取班次序号
  1533. /// </summary>
  1534. private void GetDuty()
  1535. {
  1536. if (cmb_BZ.SelectedIndex >= 0)
  1537. {
  1538. this._strDuty = this.cmb_BZ.Value.ToString();
  1539. }
  1540. }
  1541. // 工序位置下拉列表设置
  1542. /// <summary>
  1543. /// 工序位置下拉列表设置
  1544. /// </summary>
  1545. private void cboGW_SelectionChanged(object sender, EventArgs e)
  1546. {
  1547. comboBox2.Items.Clear();
  1548. int index;
  1549. index = cboGW.SelectedIndex;
  1550. switch (index)
  1551. {
  1552. case 1:
  1553. comboBox2.Items.Add(0, "所有");
  1554. comboBox2.Items.Add(1, "1#脱硫站");
  1555. comboBox2.Items.Add(2, "2#脱硫站");
  1556. break;
  1557. case 2:
  1558. comboBox2.Items.Add(0, "所有");
  1559. comboBox2.Items.Add(1, "1#转炉");
  1560. comboBox2.Items.Add(2, "2#转炉");
  1561. comboBox2.Items.Add(3, "3#转炉");
  1562. comboBox2.Items.Add(4, "4#转炉");
  1563. comboBox2.Items.Add(5, "5#转炉");
  1564. break;
  1565. case 3:
  1566. comboBox2.Items.Add(0, "所有");
  1567. comboBox2.Items.Add(1, "1#吹氩站");
  1568. comboBox2.Items.Add(2, "2#吹氩站");
  1569. comboBox2.Items.Add(3, "3#吹氩站");
  1570. comboBox2.Items.Add(4, "4#吹氩站");
  1571. comboBox2.Items.Add(5, "5#吹氩站");
  1572. break;
  1573. case 4:
  1574. comboBox2.Items.Add(0, "所有");
  1575. comboBox2.Items.Add(1, "1#精炼炉");
  1576. comboBox2.Items.Add(2, "2#精炼炉");
  1577. comboBox2.Items.Add(3, "3#精炼炉");
  1578. break;
  1579. case 5:
  1580. comboBox2.Items.Add(0, "所有");
  1581. comboBox2.Items.Add(1, "1#连铸");
  1582. comboBox2.Items.Add(2, "2#连铸");
  1583. comboBox2.Items.Add(3, "3#连铸");
  1584. comboBox2.Items.Add(4, "4#连铸");
  1585. comboBox2.Items.Add(5, "5#连铸");
  1586. break;
  1587. default:
  1588. comboBox2.Items.Add(0, "所有");
  1589. break;
  1590. }
  1591. if (index == 0)
  1592. {
  1593. chkHeatbo.Checked = false;
  1594. chkHeatbo.Enabled = false;
  1595. chkSteel.Checked = false;
  1596. chkSteel.Enabled = false;
  1597. }
  1598. else
  1599. {
  1600. chkHeatbo.Enabled = true;
  1601. chkSteel.Enabled = true;
  1602. }
  1603. comboBox2.SelectedIndex = 0;
  1604. }
  1605. #region "自动刷新"
  1606. private Thread _getDataThread;
  1607. private bool On_Off_GetDataThread = false;
  1608. private delegate void getDataFromAllDelegate();
  1609. private void StartGetDataThread()
  1610. {
  1611. try
  1612. {
  1613. ThreadStart ts = new ThreadStart(GetDataThread);
  1614. _getDataThread = new Thread(ts);
  1615. _getDataThread.Name = "GetDataThread ";
  1616. _getDataThread.Start();
  1617. }
  1618. catch { }
  1619. }
  1620. private void GetDataThread()
  1621. {
  1622. ReStartGetDataThread:
  1623. while (true)
  1624. {
  1625. if (!this.On_Off_Thread || !On_Off_GetDataThread)
  1626. {
  1627. System.Threading.Thread.Sleep(500);
  1628. continue;
  1629. }
  1630. try
  1631. {
  1632. this.Invoke(new getDataFromAllDelegate(GetDataFromAll));
  1633. System.Threading.Thread.Sleep(3000);
  1634. }
  1635. catch
  1636. { }
  1637. }
  1638. goto ReStartGetDataThread;
  1639. }
  1640. // 勾选是否自动刷新
  1641. /// <summary>
  1642. /// 勾选是否自动刷新
  1643. /// </summary>
  1644. private void chkRefresh_CheckedChanged(object sender, EventArgs e)
  1645. {
  1646. On_Off_GetDataThread = this.chkRefresh.Checked;
  1647. }
  1648. #endregion
  1649. // 解析作业路线
  1650. /// <summary>
  1651. /// 解析作业路线
  1652. /// </summary>
  1653. /// <param name="craftPath">路线代码</param>
  1654. /// <returns></returns>
  1655. public string analysPath(string craftPath, string strPath)
  1656. {
  1657. string path = "", strcPath = "";
  1658. strcPath = strPath;
  1659. try
  1660. {
  1661. string StationCode = craftPath.Substring(0, 2);
  1662. string strCS = "";
  1663. if (strPath.Length < 5)
  1664. {
  1665. strCS = strcPath.Substring(2, 2);
  1666. }
  1667. else if (strPath.Length > 5 && strcPath.Length < 7)
  1668. {
  1669. strCS = strcPath.Substring(2, 4);
  1670. }
  1671. else
  1672. strCS = strcPath.Substring(2, 3);
  1673. switch (StationCode)
  1674. {
  1675. case "B0":
  1676. path = "脱硫" + Convert.ToInt32(strCS) + "次样";
  1677. break;
  1678. case "B1":
  1679. path = "1#脱硫" + Convert.ToInt32(strCS) + "次样";
  1680. break;
  1681. case "B2":
  1682. path = "2#脱硫" + Convert.ToInt32(strCS) + "次样";
  1683. break;
  1684. case "C0":
  1685. path = "转炉" + Convert.ToInt32(strCS) + "次样";
  1686. break;
  1687. case "C1":
  1688. path = "1#转炉" + Convert.ToInt32(strCS) + "次样";
  1689. break;
  1690. case "C2":
  1691. path = "2#转炉" + Convert.ToInt32(strCS) + "次样";
  1692. break;
  1693. case "C3":
  1694. path = "3#转炉" + Convert.ToInt32(strCS) + "次样";
  1695. break;
  1696. case "C4":
  1697. path = "4#转炉" + Convert.ToInt32(strCS) + "次样";
  1698. break;
  1699. case "C5":
  1700. path = "5#转炉" + Convert.ToInt32(strCS) + "次样";
  1701. break;
  1702. case "D0":
  1703. path = "吹氩" + Convert.ToInt32(strCS) + "次样";
  1704. break;
  1705. case "D1":
  1706. path = "1#吹氩" + Convert.ToInt32(strCS) + "次样";
  1707. break;
  1708. case "D2":
  1709. path = "2#吹氩" + Convert.ToInt32(strCS) + "次样";
  1710. break;
  1711. case "D3":
  1712. path = "3#吹氩" + Convert.ToInt32(strCS) + "次样";
  1713. break;
  1714. case "D4":
  1715. path = "4#吹氩" + Convert.ToInt32(strCS) + "次样";
  1716. break;
  1717. case "D5":
  1718. path = "5#吹氩" + Convert.ToInt32(strCS) + "次样";
  1719. break;
  1720. //case "DQ":
  1721. // path = "CAS前" + Convert.ToInt32(strCS) + "次样";
  1722. // break;
  1723. //case "DH":
  1724. // path = "CAS后" + Convert.ToInt32(strCS) + "次样";
  1725. //break;
  1726. case "E0":
  1727. path = "LF炉" + Convert.ToInt32(strCS) + "次样";
  1728. break;
  1729. case "E1":
  1730. path = "1#LF炉" + Convert.ToInt32(strCS) + "次样";
  1731. break;
  1732. case "E2":
  1733. path = "2#LF炉" + Convert.ToInt32(strCS) + "次样";
  1734. break;
  1735. case "E3":
  1736. path = "3#LF炉" + Convert.ToInt32(strCS) + "次样";
  1737. break;
  1738. case "F0":
  1739. path = "RH炉" + Convert.ToInt32(strCS) + "次样";
  1740. break;
  1741. case "F1":
  1742. path = "RH炉" + Convert.ToInt32(strCS) + "次样";
  1743. break;
  1744. case "I0":
  1745. path = "VD炉" + Convert.ToInt32(strCS) + "次样";
  1746. break;
  1747. case "I1":
  1748. path = "VD炉" + Convert.ToInt32(strCS) + "次样";
  1749. break;
  1750. case "GP":
  1751. path = "连铸" + Convert.ToInt32(strCS) + "次样"; ;
  1752. break;
  1753. }
  1754. }
  1755. catch
  1756. {
  1757. }
  1758. return path;
  1759. }
  1760. public override void ToolBar_Click(object sender, string ToolbarKey)
  1761. {
  1762. switch (ToolbarKey)
  1763. {
  1764. case "Query":
  1765. this.GetDataFromAll();
  1766. break;
  1767. case "SetSampling": //设置样点
  1768. SetSampling();
  1769. break;
  1770. case "SetRowName": //设置化学成份字段显示
  1771. SetRowName();
  1772. break;
  1773. case "Export":
  1774. try
  1775. {
  1776. //Core.Mes.Client.Common.Globals.ulGridToExcel(EMGrid, Text);
  1777. GridHelper.ulGridToExcel(EMGrid, Text);
  1778. }
  1779. catch (Exception ex)
  1780. {
  1781. MessageBox.Show(ex.Message);
  1782. }
  1783. break;
  1784. case "Exit":
  1785. this.Close();
  1786. break;
  1787. default:
  1788. break;
  1789. }
  1790. base.ToolBar_Click(sender, ToolbarKey);
  1791. }
  1792. // 设置化学成份列名
  1793. /// <summary>
  1794. /// 设置化学成份列名
  1795. /// </summary>
  1796. private void SetRowName()
  1797. {
  1798. try
  1799. {
  1800. DataSet dsElements = new DataSet();
  1801. //定义一个ArrayList集合存储变量[参数]值
  1802. ArrayList arry = new ArrayList();
  1803. arry.Add("FrmSetRowName.select");
  1804. //调用服务端方法
  1805. CoreClientParam CCP_Sampling = new CoreClientParam();
  1806. DataTable dt = new DataTable();
  1807. CCP_Sampling.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
  1808. CCP_Sampling.MethodName = "doSimpleQuery";
  1809. CCP_Sampling.ServerParams = new object[] { arry };
  1810. CCP_Sampling.SourceDataTable = dt;
  1811. this.ExecuteSortResultByQueryToDataTable(CCP_Sampling, CoreInvokeType.Internal);
  1812. ArrayList alist = new ArrayList();
  1813. Hashtable htbl = new Hashtable();
  1814. if (dt != null)
  1815. {
  1816. if (dt.Rows.Count > 0)
  1817. {
  1818. DataRow newdr = dt.NewRow();
  1819. foreach (DataRow dr in dt.Rows)
  1820. {
  1821. if (dr["BASENAME"].ToString() != "As+Sn+Sb+Pb+Bi")
  1822. {
  1823. alist.Add(dr["BASENAME"].ToString());
  1824. htbl.Add(dr["BASENAME"].ToString(), "0");
  1825. }
  1826. }
  1827. }
  1828. }
  1829. if (htbl != null && htbl.Count > 0)
  1830. {
  1831. frmSetEleCols frm = new frmSetEleCols();
  1832. frm.alist = alist;
  1833. frm.htbl = htbl;
  1834. if (frm.ShowDialog() == DialogResult.OK)
  1835. {
  1836. //dataTable1.Clear();
  1837. //dataTable1.Reset();
  1838. for (int i = 0; i < strERow.Length; i++)
  1839. {
  1840. if (dataTable1.Columns.Contains(strERow[i]))
  1841. {
  1842. dataTable1.Columns.Remove(strERow[i]);
  1843. }
  1844. }
  1845. getElements();
  1846. GetDataFromAll();
  1847. }
  1848. }
  1849. else
  1850. {
  1851. MessageBox.Show("化学成分列获取失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1852. return;
  1853. }
  1854. //if (dt != null)
  1855. //{
  1856. // if (dt.Rows.Count > 0)
  1857. // {
  1858. // dt.Rows[0].Table.Columns.Add(new DataColumn("选择", typeof(System.Boolean)));
  1859. // DataRow newdr = dt.NewRow();
  1860. // foreach (DataRow dr in dt.Rows)
  1861. // {
  1862. // dr["选择"] = false;
  1863. // if (dr["BASENAME"].ToString() == "As+Sn+Sb+Pb+Bi")
  1864. // {
  1865. // newdr = dr;
  1866. // }
  1867. // }
  1868. // dt.Rows.Remove(newdr);
  1869. // frmConfigElementsRow frm = new frmConfigElementsRow();
  1870. // frm.StartPosition = FormStartPosition.CenterScreen;
  1871. // frm.WindowState = FormWindowState.Normal;
  1872. // dsElements.Tables.Add(dt);
  1873. // frm._dsSet = dsElements;
  1874. // frm.ShowDialog();
  1875. // // 判断是否有设置
  1876. // if (frm._setFlag)
  1877. // {
  1878. // string strElementsRow = ElementsConfig.GetElementsRow(); //调用函数获取要显示的列名
  1879. // strERow = strElementsRow.Split('*');
  1880. // GetDataFromAll();
  1881. // }
  1882. // }
  1883. // else
  1884. // MessageBox.Show("查询失败!!!", "提示");
  1885. //}
  1886. }
  1887. catch { }
  1888. }
  1889. // 显示样点
  1890. /// <summary>
  1891. /// 显示样点
  1892. /// </summary>
  1893. private void SetSampling()
  1894. {
  1895. try
  1896. {
  1897. DataTable dt = new DataTable();
  1898. if (dataSet1 != null)
  1899. {
  1900. _dsSet = new DataSet();
  1901. //定义一个ArrayList集合存储变量[参数]值
  1902. ArrayList arry = new ArrayList();
  1903. arry.Add("FrmSetSamplin.select");//此ID为XML文件ID
  1904. //调用服务端方法
  1905. CoreClientParam CCP_Sampling = new CoreClientParam();
  1906. CCP_Sampling.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
  1907. CCP_Sampling.MethodName = "doSimpleQuery";
  1908. CCP_Sampling.ServerParams = new object[] { arry };
  1909. CCP_Sampling.SourceDataTable = dt;
  1910. this.ExecuteSortResultByQueryToDataTable(CCP_Sampling, CoreInvokeType.Internal);
  1911. dt.Rows[0].Table.Columns.Add(new DataColumn("工序名", typeof(System.String)));
  1912. dt.Rows[0].Table.Columns.Add(new DataColumn("选择", typeof(System.Boolean)));
  1913. foreach (DataRow dr in dt.Rows)
  1914. {
  1915. string SetColumn = dr["ASSAYTYPECODE"].ToString().Substring(0, 2);
  1916. dr["ASSAYTYPECODE"] = dr["ASSAYTYPECODE"].ToString();
  1917. dr["工序名"] = analysPath(SetColumn, dr["ASSAYTYPECODE"].ToString());
  1918. dr["选择"] = true;
  1919. }
  1920. }
  1921. _dsSet.Tables.Add(dt);
  1922. frmSetSampling frm = new frmSetSampling();
  1923. frm._dsSet = _dsSet;
  1924. frm.ShowDialog();
  1925. if (frm._setFlag)
  1926. {
  1927. _dsSet = frm._dsSet;
  1928. _dsSet.AcceptChanges();
  1929. _dvRowFilter = "";
  1930. foreach (DataRow dr in _dsSet.Tables[0].Rows)
  1931. {
  1932. if (Convert.ToBoolean(dr["选择"]) == true)
  1933. {
  1934. _dvRowFilter += string.Format("or assaytypecode = '{0}' ", dr[0].ToString());
  1935. }
  1936. }
  1937. if (_dvRowFilter.Length > 0)
  1938. {
  1939. _dvRowFilter = _dvRowFilter.Substring(2, _dvRowFilter.Length - 2);
  1940. }
  1941. GetDataFromAll();
  1942. }
  1943. }
  1944. catch { }
  1945. }
  1946. private void EMGrid_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
  1947. {
  1948. try
  1949. {
  1950. //GetId(e.Row.Index, EMGrid);
  1951. //if (EMGrid.Rows[e.Row.Index].Cells[0].Value.ToString().IndexOf("√") > 0)
  1952. //{
  1953. if (cboGW.Text.ToString() == "铁水") return;
  1954. string strHeatNo = EMGrid.Rows[e.Row.Index].Cells["熔炼号"].Value.ToString();
  1955. if (strHeatNo.Length < 8)
  1956. return;
  1957. string strSteelCode = EMGrid.Rows[e.Row.Index].Cells["计划牌号"].Text.Trim();
  1958. //string szEleStd = "";
  1959. ////设置要获取的化学成分标准
  1960. //for (int i = 5; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
  1961. //{
  1962. // if (EMGrid.DisplayLayout.Bands[0].Columns[i].Hidden == false)
  1963. // {
  1964. // szEleStd = szEleStd + "','" + EMGrid.DisplayLayout.Bands[0].Columns[i].Header.Caption;
  1965. // }
  1966. //}
  1967. //frmLgEleDetail.szEleStd = szEleStd;
  1968. frmLgEleDetail Azhupi = new frmLgEleDetail(strHeatNo, ob);
  1969. Azhupi.ultrgridRow = EMGrid.ActiveRow;
  1970. Azhupi.ShowDialog(this);
  1971. //}
  1972. }
  1973. catch { }
  1974. }
  1975. private void EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1976. {
  1977. UltraMaskedEdit ume = (UltraMaskedEdit)sender;
  1978. switch (e.Button.Key)
  1979. {
  1980. //case "edit":
  1981. // frmNumberWriter frm = new frmNumberWriter();
  1982. // frm._strText = ume.Text.Trim();
  1983. // frm.Location = GetChildWindowLocation(frm.Size);
  1984. // frm.ShowDialog();
  1985. // ume.Text = frm._strText;
  1986. // break;
  1987. case "clear":
  1988. if (ume.Text.Trim().Length > 0)
  1989. {
  1990. ume.Tag = ume.Text.Trim();
  1991. ume.Text = "";
  1992. }
  1993. else
  1994. {
  1995. if (ume.Tag != null)
  1996. ume.Text = ume.Tag.ToString();
  1997. }
  1998. break;
  1999. }
  2000. }
  2001. private void chkSteel_CheckedChanged(object sender, EventArgs e)
  2002. {
  2003. if (chkSteel.Checked)
  2004. {
  2005. txtSteel.Enabled = true;
  2006. }
  2007. else
  2008. {
  2009. txtSteel.Enabled = false;
  2010. txtSteel.BackColor = Color.WhiteSmoke;
  2011. }
  2012. }
  2013. private void ultraMaskedEdit1_KeyPress(object sender, KeyPressEventArgs e)
  2014. {
  2015. if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b'))
  2016. {
  2017. e.Handled = true;
  2018. }
  2019. }
  2020. private void txtSteel_KeyPress(object sender, KeyPressEventArgs e)
  2021. {
  2022. if (!(e.KeyChar == ',' || e.KeyChar == '\b' || char.IsDigit(e.KeyChar) || char.IsLetter(e.KeyChar)))
  2023. {
  2024. e.Handled = true;
  2025. }
  2026. }
  2027. private void chkBZ_CheckedChanged(object sender, EventArgs e)
  2028. {
  2029. cmb_BZ.Enabled = chkBZ.Checked;
  2030. }
  2031. private void chkHeatbo_CheckedChanged(object sender, EventArgs e)
  2032. {
  2033. ultraMaskedEdit1.Enabled = ultraMaskedEdit2.Enabled = chkHeatbo.Checked;
  2034. }
  2035. }
  2036. }