frmLgElements.cs.svn-base 143 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382
  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 System.Collections.Generic;
  15. using Core.Mes.Client.Common;
  16. using Core.LgMes.Client.LgJobMgt;
  17. using Core.LgMes.Client.lgClassModel.LgChem;
  18. using Core.LgMes.Client.lgClassModel.SqModel;
  19. namespace Core.LgMes.Client.LgIntegrationQuery
  20. {
  21. /// <summary>
  22. /// ELEMENTS 的摘要说明。
  23. /// </summary>
  24. public class frmLgElements : Core.Mes.Client.Common.frmStyleBase
  25. {
  26. #region " Construct "
  27. private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
  28. private System.Windows.Forms.Label label1;
  29. private System.Windows.Forms.Label label2;
  30. private System.ComponentModel.IContainer components;
  31. private System.Windows.Forms.Label label3;
  32. private System.Windows.Forms.Panel panel1;
  33. private System.Windows.Forms.Label label4;
  34. private System.Windows.Forms.Label label5;
  35. private System.Windows.Forms.Label label6;
  36. private System.Windows.Forms.TextBox txtPage;
  37. private System.Windows.Forms.Button btn_Up;
  38. private System.Windows.Forms.Button btn_Down;
  39. private System.Windows.Forms.Button button3;
  40. private System.Windows.Forms.Label label7;
  41. private System.Windows.Forms.Label label8;
  42. private System.Windows.Forms.CheckBox chkRefresh;
  43. private System.Windows.Forms.Label label9;
  44. public string StrPost = "0";
  45. private Label label11;
  46. private Label label10;
  47. private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtBeginTime;
  48. private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtEndTime;
  49. private UltraMaskedEdit ultraMaskedEdit2;
  50. private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter GridExcelExporter;
  51. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
  52. private UltraGrid EMGrid;
  53. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
  54. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
  55. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
  56. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
  57. private string m_szEntry = "";
  58. private DataSet dataSet1;
  59. private DataTable dataTable1;
  60. private DataColumn dataColumn7;
  61. private DataColumn dataColumn8;
  62. private DataColumn dataColumn9;
  63. private DataColumn dataColumn84;
  64. private DataColumn dataColumn85;
  65. string[] strERow;
  66. private TextBox txtSteel;
  67. private CheckBox chkGasSample; //化学成份列名
  68. string[] strRowName = new string[] { "C", "Mn", "S", "P", "Si", "Als", "Alt", "N", "Ti", "Nb", "B", "V", "Asn", "Sn", "Cu", "Sb", "O", "H", "Bsol" };
  69. bool Isbool = false;
  70. private DataColumn dataColumn1;
  71. private Infragistics.Win.UltraWinEditors.UltraComboEditor cmb_BZ;
  72. private Infragistics.Win.UltraWinEditors.UltraComboEditor cboGW;
  73. private Infragistics.Win.UltraWinEditors.UltraComboEditor comboBox2;
  74. private DataColumn dataColumn2;
  75. private DataColumn dataColumn3;
  76. private Infragistics.Win.UltraWinEditors.UltraPictureBox ultraPictureBox1;
  77. private DataColumn dataColumn4;
  78. private DataColumn dataColumn5;
  79. private DataColumn dataColumn6;
  80. private DataColumn dataColumn10;
  81. private DataColumn dataColumn11;
  82. private Button button1;
  83. private DataColumn dataColumn12;
  84. private DataColumn dataColumn13;
  85. private UltraMaskedEdit ultraMaskedEdit1;
  86. public frmLgElements(string szPost)
  87. {
  88. InitializeComponent();
  89. this._devPos = szPost;
  90. }
  91. public frmLgElements()
  92. {
  93. //
  94. // Windows 窗体设计器支持所必需的
  95. //
  96. InitializeComponent();
  97. this._devPos = StrPost;
  98. InitSteel();
  99. }
  100. public frmLgElements(string szEntry, string szLH)
  101. {
  102. InitializeComponent();
  103. this._devPos = StrPost;
  104. this.m_szEntry = szEntry;
  105. this.ultraMaskedEdit1.Text = szLH;
  106. }
  107. /// <summary>
  108. /// 初始化Grind牌号
  109. /// </summary>
  110. private void InitSteel()
  111. {
  112. string strErr = "";
  113. EMGrid.DisplayLayout.ValueLists.Add("SteelCode");
  114. DataSet dsSteel = null;//hengxing (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(
  115. // "lgIntegrationQuery",
  116. // "Core.LgMes.Server.lgIntegrationQuery.LgGeneralInfo",
  117. // "GetSteelInfo", new object[] { "where largeflag='1' order by steelcode " }, out strErr);
  118. if (strErr == "" && dsSteel != null)
  119. {
  120. //初始经Grid牌号字段数据集
  121. for (int i = 0; i < dsSteel.Tables[0].Rows.Count; i++)
  122. {
  123. EMGrid.DisplayLayout.ValueLists["SteelCode"].ValueListItems.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
  124. }
  125. //绑定单位
  126. EMGrid.DisplayLayout.Bands[0].Columns["计划牌号"].ValueList = EMGrid.DisplayLayout.ValueLists["SteelCode"];
  127. }
  128. }
  129. /// <summary>
  130. /// 清理所有正在使用的资源。
  131. /// </summary>
  132. protected override void Dispose(bool disposing)
  133. {
  134. try
  135. {
  136. if (_getDataThread != null)
  137. _getDataThread.Abort();
  138. }
  139. catch { }
  140. if (disposing)
  141. {
  142. if (components != null)
  143. {
  144. components.Dispose();
  145. }
  146. }
  147. base.Dispose(disposing);
  148. }
  149. #region Windows 窗体设计器生成的代码
  150. /// <summary>
  151. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  152. /// 此方法的内容。
  153. /// </summary>
  154. private void InitializeComponent()
  155. {
  156. this.components = new System.ComponentModel.Container();
  157. Infragistics.Win.UltraWinEditors.EditorButton editorButton1 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
  158. Infragistics.Win.UltraWinEditors.EditorButton editorButton2 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
  159. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  160. Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
  161. Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
  162. Infragistics.Win.ValueListItem valueListItem3 = new Infragistics.Win.ValueListItem();
  163. Infragistics.Win.ValueListItem valueListItem4 = new Infragistics.Win.ValueListItem();
  164. Infragistics.Win.ValueListItem valueListItem30 = new Infragistics.Win.ValueListItem();
  165. Infragistics.Win.ValueListItem valueListItem31 = new Infragistics.Win.ValueListItem();
  166. Infragistics.Win.ValueListItem valueListItem5 = new Infragistics.Win.ValueListItem();
  167. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  168. Infragistics.Win.ValueListItem valueListItem6 = new Infragistics.Win.ValueListItem();
  169. Infragistics.Win.ValueListItem valueListItem7 = new Infragistics.Win.ValueListItem();
  170. Infragistics.Win.ValueListItem valueListItem8 = new Infragistics.Win.ValueListItem();
  171. Infragistics.Win.ValueListItem valueListItem9 = new Infragistics.Win.ValueListItem();
  172. Infragistics.Win.ValueListItem valueListItem28 = new Infragistics.Win.ValueListItem();
  173. Infragistics.Win.ValueListItem valueListItem29 = new Infragistics.Win.ValueListItem();
  174. Infragistics.Win.ValueListItem valueListItem10 = new Infragistics.Win.ValueListItem();
  175. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  176. Infragistics.Win.ValueListItem valueListItem11 = new Infragistics.Win.ValueListItem();
  177. Infragistics.Win.ValueListItem valueListItem12 = new Infragistics.Win.ValueListItem();
  178. Infragistics.Win.ValueListItem valueListItem13 = new Infragistics.Win.ValueListItem();
  179. Infragistics.Win.ValueListItem valueListItem14 = new Infragistics.Win.ValueListItem();
  180. Infragistics.Win.ValueListItem valueListItem15 = new Infragistics.Win.ValueListItem();
  181. Infragistics.Win.UltraWinEditors.EditorButton editorButton3 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
  182. Infragistics.Win.UltraWinEditors.EditorButton editorButton4 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
  183. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Table1", -1);
  184. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("序号");
  185. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("熔炼号");
  186. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("计划牌号");
  187. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("化验时间");
  188. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JHGZ");
  189. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("shiftcode", -1, 7905313);
  190. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Station");
  191. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn8 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SumTime");
  192. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn9 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_STL_GRD");
  193. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn10 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_RESULT");
  194. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn11 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("REG_ID");
  195. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn12 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_SEQ");
  196. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn13 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SIMN");
  197. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn14 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("CM");
  198. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn15 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SAMPLE_DATE1");
  199. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  200. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  201. Infragistics.Win.ValueList valueList1 = new Infragistics.Win.ValueList(7905313);
  202. Infragistics.Win.ValueListItem valueListItem16 = new Infragistics.Win.ValueListItem();
  203. Infragistics.Win.ValueListItem valueListItem17 = new Infragistics.Win.ValueListItem();
  204. Infragistics.Win.ValueListItem valueListItem18 = new Infragistics.Win.ValueListItem();
  205. Infragistics.Win.ValueListItem valueListItem19 = new Infragistics.Win.ValueListItem();
  206. Infragistics.Win.ValueListItem valueListItem20 = new Infragistics.Win.ValueListItem();
  207. Infragistics.Win.ValueListItem valueListItem21 = new Infragistics.Win.ValueListItem();
  208. Infragistics.Win.ValueListItem valueListItem22 = new Infragistics.Win.ValueListItem();
  209. Infragistics.Win.ValueListItem valueListItem23 = new Infragistics.Win.ValueListItem();
  210. Infragistics.Win.ValueListItem valueListItem24 = new Infragistics.Win.ValueListItem();
  211. Infragistics.Win.ValueListItem valueListItem25 = new Infragistics.Win.ValueListItem();
  212. Infragistics.Win.ValueListItem valueListItem26 = new Infragistics.Win.ValueListItem();
  213. Infragistics.Win.ValueListItem valueListItem27 = new Infragistics.Win.ValueListItem();
  214. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1");
  215. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  216. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("set");
  217. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("excel");
  218. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("SRow");
  219. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Close");
  220. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  221. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("set");
  222. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("excel");
  223. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("SRow");
  224. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Close");
  225. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("FlushCeq");
  226. this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
  227. this.button1 = new System.Windows.Forms.Button();
  228. this.ultraMaskedEdit1 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
  229. this.comboBox2 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  230. this.cboGW = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  231. this.cmb_BZ = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  232. this.chkGasSample = new System.Windows.Forms.CheckBox();
  233. this.txtSteel = new System.Windows.Forms.TextBox();
  234. this.ultraMaskedEdit2 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
  235. this.uldtEndTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
  236. this.uldtBeginTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
  237. this.label11 = new System.Windows.Forms.Label();
  238. this.label10 = new System.Windows.Forms.Label();
  239. this.label9 = new System.Windows.Forms.Label();
  240. this.chkRefresh = new System.Windows.Forms.CheckBox();
  241. this.label8 = new System.Windows.Forms.Label();
  242. this.label7 = new System.Windows.Forms.Label();
  243. this.button3 = new System.Windows.Forms.Button();
  244. this.btn_Down = new System.Windows.Forms.Button();
  245. this.btn_Up = new System.Windows.Forms.Button();
  246. this.txtPage = new System.Windows.Forms.TextBox();
  247. this.label6 = new System.Windows.Forms.Label();
  248. this.label5 = new System.Windows.Forms.Label();
  249. this.label4 = new System.Windows.Forms.Label();
  250. this.label1 = new System.Windows.Forms.Label();
  251. this.panel1 = new System.Windows.Forms.Panel();
  252. this.EMGrid = new Infragistics.Win.UltraWinGrid.UltraGrid();
  253. this.dataSet1 = new System.Data.DataSet();
  254. this.dataTable1 = new System.Data.DataTable();
  255. this.dataColumn7 = new System.Data.DataColumn();
  256. this.dataColumn8 = new System.Data.DataColumn();
  257. this.dataColumn9 = new System.Data.DataColumn();
  258. this.dataColumn84 = new System.Data.DataColumn();
  259. this.dataColumn85 = new System.Data.DataColumn();
  260. this.dataColumn1 = new System.Data.DataColumn();
  261. this.dataColumn2 = new System.Data.DataColumn();
  262. this.dataColumn3 = new System.Data.DataColumn();
  263. this.dataColumn4 = new System.Data.DataColumn();
  264. this.dataColumn5 = new System.Data.DataColumn();
  265. this.dataColumn6 = new System.Data.DataColumn();
  266. this.dataColumn10 = new System.Data.DataColumn();
  267. this.dataColumn11 = new System.Data.DataColumn();
  268. this.dataColumn12 = new System.Data.DataColumn();
  269. this.dataColumn13 = new System.Data.DataColumn();
  270. this.ultraPictureBox1 = new Infragistics.Win.UltraWinEditors.UltraPictureBox();
  271. this.label3 = new System.Windows.Forms.Label();
  272. this.label2 = new System.Windows.Forms.Label();
  273. this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  274. this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  275. this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  276. this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  277. this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  278. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
  279. this.ultraGroupBox1.SuspendLayout();
  280. ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).BeginInit();
  281. ((System.ComponentModel.ISupportInitialize)(this.cboGW)).BeginInit();
  282. ((System.ComponentModel.ISupportInitialize)(this.cmb_BZ)).BeginInit();
  283. ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).BeginInit();
  284. ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).BeginInit();
  285. this.panel1.SuspendLayout();
  286. ((System.ComponentModel.ISupportInitialize)(this.EMGrid)).BeginInit();
  287. ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
  288. ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).BeginInit();
  289. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
  290. this.SuspendLayout();
  291. //
  292. // ultraGroupBox1
  293. //
  294. this.ultraGroupBox1.Controls.Add(this.button1);
  295. this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit1);
  296. this.ultraGroupBox1.Controls.Add(this.comboBox2);
  297. this.ultraGroupBox1.Controls.Add(this.cboGW);
  298. this.ultraGroupBox1.Controls.Add(this.cmb_BZ);
  299. this.ultraGroupBox1.Controls.Add(this.chkGasSample);
  300. this.ultraGroupBox1.Controls.Add(this.txtSteel);
  301. this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit2);
  302. this.ultraGroupBox1.Controls.Add(this.uldtEndTime);
  303. this.ultraGroupBox1.Controls.Add(this.uldtBeginTime);
  304. this.ultraGroupBox1.Controls.Add(this.label11);
  305. this.ultraGroupBox1.Controls.Add(this.label10);
  306. this.ultraGroupBox1.Controls.Add(this.label9);
  307. this.ultraGroupBox1.Controls.Add(this.chkRefresh);
  308. this.ultraGroupBox1.Controls.Add(this.label8);
  309. this.ultraGroupBox1.Controls.Add(this.label7);
  310. this.ultraGroupBox1.Controls.Add(this.button3);
  311. this.ultraGroupBox1.Controls.Add(this.btn_Down);
  312. this.ultraGroupBox1.Controls.Add(this.btn_Up);
  313. this.ultraGroupBox1.Controls.Add(this.txtPage);
  314. this.ultraGroupBox1.Controls.Add(this.label6);
  315. this.ultraGroupBox1.Controls.Add(this.label5);
  316. this.ultraGroupBox1.Controls.Add(this.label4);
  317. this.ultraGroupBox1.Controls.Add(this.label1);
  318. this.ultraGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
  319. this.ultraGroupBox1.Location = new System.Drawing.Point(0, 28);
  320. this.ultraGroupBox1.Name = "ultraGroupBox1";
  321. this.ultraGroupBox1.Size = new System.Drawing.Size(1008, 71);
  322. this.ultraGroupBox1.TabIndex = 3;
  323. //
  324. // button1
  325. //
  326. this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
  327. this.button1.Location = new System.Drawing.Point(594, 9);
  328. this.button1.Name = "button1";
  329. this.button1.Size = new System.Drawing.Size(70, 50);
  330. this.button1.TabIndex = 288;
  331. this.button1.Text = "生成复合元素";
  332. this.button1.UseVisualStyleBackColor = false;
  333. this.button1.Click += new System.EventHandler(this.button1_Click_1);
  334. //
  335. // ultraMaskedEdit1
  336. //
  337. this.ultraMaskedEdit1.BorderStyle = Infragistics.Win.UIElementBorderStyle.Inset;
  338. editorButton1.Key = "edit";
  339. editorButton1.Text = "";
  340. editorButton2.Key = "clear";
  341. this.ultraMaskedEdit1.ButtonsRight.Add(editorButton1);
  342. this.ultraMaskedEdit1.ButtonsRight.Add(editorButton2);
  343. this.ultraMaskedEdit1.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
  344. this.ultraMaskedEdit1.Location = new System.Drawing.Point(84, 40);
  345. this.ultraMaskedEdit1.Name = "ultraMaskedEdit1";
  346. this.ultraMaskedEdit1.PromptChar = ' ';
  347. this.ultraMaskedEdit1.Size = new System.Drawing.Size(97, 21);
  348. this.ultraMaskedEdit1.TabIndex = 287;
  349. this.ultraMaskedEdit1.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  350. this.ultraMaskedEdit1.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.EditorButtonClick);
  351. //
  352. // comboBox2
  353. //
  354. appearance1.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
  355. appearance1.BorderColor = System.Drawing.Color.Black;
  356. this.comboBox2.Appearance = appearance1;
  357. this.comboBox2.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  358. this.comboBox2.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  359. this.comboBox2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  360. valueListItem1.DataValue = "0";
  361. valueListItem1.DisplayText = "铁水";
  362. valueListItem2.DataValue = "1";
  363. valueListItem2.DisplayText = "转炉";
  364. valueListItem3.DataValue = "2";
  365. valueListItem3.DisplayText = "吹氩站";
  366. valueListItem4.DataValue = "3";
  367. valueListItem4.DisplayText = "精炼炉";
  368. valueListItem30.DataValue = "4";
  369. valueListItem30.DisplayText = "RH炉";
  370. valueListItem31.DataValue = "5";
  371. valueListItem31.DisplayText = "VD炉";
  372. valueListItem5.DataValue = "6";
  373. valueListItem5.DisplayText = "连铸";
  374. this.comboBox2.Items.AddRange(new Infragistics.Win.ValueListItem[] {
  375. valueListItem1,
  376. valueListItem2,
  377. valueListItem3,
  378. valueListItem4,
  379. valueListItem30,
  380. valueListItem31,
  381. valueListItem5});
  382. this.comboBox2.Location = new System.Drawing.Point(470, 9);
  383. this.comboBox2.Name = "comboBox2";
  384. this.comboBox2.Size = new System.Drawing.Size(118, 19);
  385. this.comboBox2.TabIndex = 286;
  386. this.comboBox2.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  387. //
  388. // cboGW
  389. //
  390. appearance2.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
  391. appearance2.BorderColor = System.Drawing.Color.Black;
  392. this.cboGW.Appearance = appearance2;
  393. this.cboGW.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  394. this.cboGW.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  395. this.cboGW.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  396. valueListItem6.DataValue = "0";
  397. valueListItem6.DisplayText = "铁水";
  398. valueListItem7.DataValue = "1";
  399. valueListItem7.DisplayText = "转炉";
  400. valueListItem8.DataValue = "2";
  401. valueListItem8.DisplayText = "吹氩站";
  402. valueListItem9.DataValue = "3";
  403. valueListItem9.DisplayText = "精炼炉";
  404. valueListItem28.DataValue = "4";
  405. valueListItem28.DisplayText = "RH炉";
  406. valueListItem29.DataValue = "5";
  407. valueListItem29.DisplayText = "VD炉";
  408. valueListItem10.DataValue = "6";
  409. valueListItem10.DisplayText = "连铸";
  410. this.cboGW.Items.AddRange(new Infragistics.Win.ValueListItem[] {
  411. valueListItem6,
  412. valueListItem7,
  413. valueListItem8,
  414. valueListItem9,
  415. valueListItem28,
  416. valueListItem29,
  417. valueListItem10});
  418. this.cboGW.Location = new System.Drawing.Point(405, 10);
  419. this.cboGW.Name = "cboGW";
  420. this.cboGW.Size = new System.Drawing.Size(56, 19);
  421. this.cboGW.TabIndex = 285;
  422. this.cboGW.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  423. this.cboGW.SelectionChanged += new System.EventHandler(this.cboGW_SelectionChanged);
  424. //
  425. // cmb_BZ
  426. //
  427. appearance3.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
  428. appearance3.BorderColor = System.Drawing.Color.Black;
  429. this.cmb_BZ.Appearance = appearance3;
  430. this.cmb_BZ.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  431. this.cmb_BZ.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  432. this.cmb_BZ.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  433. valueListItem11.DataValue = "0";
  434. valueListItem11.DisplayText = "全部";
  435. valueListItem12.DataValue = "1";
  436. valueListItem12.DisplayText = "甲班";
  437. valueListItem13.DataValue = "2";
  438. valueListItem13.DisplayText = "乙班";
  439. valueListItem14.DataValue = "3";
  440. valueListItem14.DisplayText = "丙班";
  441. valueListItem15.DataValue = "4";
  442. valueListItem15.DisplayText = "丁班";
  443. this.cmb_BZ.Items.AddRange(new Infragistics.Win.ValueListItem[] {
  444. valueListItem11,
  445. valueListItem12,
  446. valueListItem13,
  447. valueListItem14,
  448. valueListItem15});
  449. this.cmb_BZ.Location = new System.Drawing.Point(405, 41);
  450. this.cmb_BZ.Name = "cmb_BZ";
  451. this.cmb_BZ.Size = new System.Drawing.Size(56, 19);
  452. this.cmb_BZ.TabIndex = 284;
  453. this.cmb_BZ.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  454. //
  455. // chkGasSample
  456. //
  457. this.chkGasSample.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  458. this.chkGasSample.Location = new System.Drawing.Point(670, 38);
  459. this.chkGasSample.Name = "chkGasSample";
  460. this.chkGasSample.Size = new System.Drawing.Size(82, 24);
  461. this.chkGasSample.TabIndex = 85;
  462. this.chkGasSample.Text = "气体样";
  463. //
  464. // txtSteel
  465. //
  466. this.txtSteel.Location = new System.Drawing.Point(501, 40);
  467. this.txtSteel.Name = "txtSteel";
  468. this.txtSteel.Size = new System.Drawing.Size(87, 21);
  469. this.txtSteel.TabIndex = 84;
  470. //
  471. // ultraMaskedEdit2
  472. //
  473. this.ultraMaskedEdit2.BorderStyle = Infragistics.Win.UIElementBorderStyle.Inset;
  474. editorButton3.Key = "edit";
  475. editorButton3.Text = "";
  476. editorButton4.Key = "clear";
  477. this.ultraMaskedEdit2.ButtonsRight.Add(editorButton3);
  478. this.ultraMaskedEdit2.ButtonsRight.Add(editorButton4);
  479. this.ultraMaskedEdit2.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
  480. this.ultraMaskedEdit2.Location = new System.Drawing.Point(214, 40);
  481. this.ultraMaskedEdit2.Name = "ultraMaskedEdit2";
  482. this.ultraMaskedEdit2.PromptChar = ' ';
  483. this.ultraMaskedEdit2.Size = new System.Drawing.Size(111, 21);
  484. this.ultraMaskedEdit2.TabIndex = 83;
  485. this.ultraMaskedEdit2.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
  486. this.ultraMaskedEdit2.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.EditorButtonClick);
  487. //
  488. // uldtEndTime
  489. //
  490. this.uldtEndTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
  491. this.uldtEndTime.FormatString = "yyyy-MM-dd HH:mm";
  492. this.uldtEndTime.Location = new System.Drawing.Point(214, 9);
  493. this.uldtEndTime.MaskInput = "yyyy-mm-dd hh:mm";
  494. this.uldtEndTime.Name = "uldtEndTime";
  495. this.uldtEndTime.Size = new System.Drawing.Size(111, 21);
  496. this.uldtEndTime.TabIndex = 80;
  497. //
  498. // uldtBeginTime
  499. //
  500. this.uldtBeginTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
  501. this.uldtBeginTime.FormatString = "yyyy-MM-dd HH:mm";
  502. this.uldtBeginTime.Location = new System.Drawing.Point(84, 9);
  503. this.uldtBeginTime.MaskInput = "yyyy-mm-dd hh:mm";
  504. this.uldtBeginTime.Name = "uldtBeginTime";
  505. this.uldtBeginTime.Size = new System.Drawing.Size(97, 21);
  506. this.uldtBeginTime.TabIndex = 79;
  507. //
  508. // label11
  509. //
  510. this.label11.AutoSize = true;
  511. this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  512. this.label11.Location = new System.Drawing.Point(189, 43);
  513. this.label11.Name = "label11";
  514. this.label11.Size = new System.Drawing.Size(21, 14);
  515. this.label11.TabIndex = 78;
  516. this.label11.Text = "到";
  517. //
  518. // label10
  519. //
  520. this.label10.AutoSize = true;
  521. this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  522. this.label10.Location = new System.Drawing.Point(189, 12);
  523. this.label10.Name = "label10";
  524. this.label10.Size = new System.Drawing.Size(21, 14);
  525. this.label10.TabIndex = 77;
  526. this.label10.Text = "到";
  527. //
  528. // label9
  529. //
  530. this.label9.AutoSize = true;
  531. this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  532. this.label9.Location = new System.Drawing.Point(466, 43);
  533. this.label9.Name = "label9";
  534. this.label9.Size = new System.Drawing.Size(35, 14);
  535. this.label9.TabIndex = 72;
  536. this.label9.Text = "牌号";
  537. //
  538. // chkRefresh
  539. //
  540. this.chkRefresh.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  541. this.chkRefresh.Location = new System.Drawing.Point(670, 7);
  542. this.chkRefresh.Name = "chkRefresh";
  543. this.chkRefresh.Size = new System.Drawing.Size(82, 24);
  544. this.chkRefresh.TabIndex = 71;
  545. this.chkRefresh.Text = "自动刷新";
  546. this.chkRefresh.CheckedChanged += new System.EventHandler(this.chkRefresh_CheckedChanged);
  547. //
  548. // label8
  549. //
  550. this.label8.AutoSize = true;
  551. this.label8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  552. this.label8.Location = new System.Drawing.Point(335, 43);
  553. this.label8.Name = "label8";
  554. this.label8.Size = new System.Drawing.Size(70, 14);
  555. this.label8.TabIndex = 70;
  556. this.label8.Text = "选择班组:";
  557. //
  558. // label7
  559. //
  560. this.label7.AutoSize = true;
  561. this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  562. this.label7.Location = new System.Drawing.Point(335, 12);
  563. this.label7.Name = "label7";
  564. this.label7.Size = new System.Drawing.Size(70, 14);
  565. this.label7.TabIndex = 68;
  566. this.label7.Text = "工序位置:";
  567. //
  568. // button3
  569. //
  570. this.button3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  571. this.button3.Location = new System.Drawing.Point(914, 39);
  572. this.button3.Name = "button3";
  573. this.button3.Size = new System.Drawing.Size(72, 23);
  574. this.button3.TabIndex = 58;
  575. this.button3.Text = "全部显示";
  576. this.button3.UseVisualStyleBackColor = false;
  577. this.button3.Click += new System.EventHandler(this.button3_Click);
  578. //
  579. // btn_Down
  580. //
  581. this.btn_Down.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  582. this.btn_Down.Location = new System.Drawing.Point(866, 39);
  583. this.btn_Down.Name = "btn_Down";
  584. this.btn_Down.Size = new System.Drawing.Size(40, 23);
  585. this.btn_Down.TabIndex = 57;
  586. this.btn_Down.Text = ">>";
  587. this.btn_Down.Click += new System.EventHandler(this.btn_Down_Click);
  588. //
  589. // btn_Up
  590. //
  591. this.btn_Up.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  592. this.btn_Up.Location = new System.Drawing.Point(762, 39);
  593. this.btn_Up.Name = "btn_Up";
  594. this.btn_Up.Size = new System.Drawing.Size(40, 23);
  595. this.btn_Up.TabIndex = 56;
  596. this.btn_Up.Text = "<<";
  597. this.btn_Up.Click += new System.EventHandler(this.btn_Up_Click);
  598. //
  599. // txtPage
  600. //
  601. this.txtPage.Location = new System.Drawing.Point(802, 40);
  602. this.txtPage.Name = "txtPage";
  603. this.txtPage.Size = new System.Drawing.Size(64, 21);
  604. this.txtPage.TabIndex = 55;
  605. this.txtPage.Text = "40";
  606. //
  607. // label6
  608. //
  609. this.label6.AutoSize = true;
  610. this.label6.ForeColor = System.Drawing.Color.Red;
  611. this.label6.Location = new System.Drawing.Point(856, 13);
  612. this.label6.Name = "label6";
  613. this.label6.Size = new System.Drawing.Size(0, 12);
  614. this.label6.TabIndex = 54;
  615. //
  616. // label5
  617. //
  618. this.label5.AutoSize = true;
  619. this.label5.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  620. this.label5.Location = new System.Drawing.Point(760, 12);
  621. this.label5.Name = "label5";
  622. this.label5.Size = new System.Drawing.Size(98, 14);
  623. this.label5.TabIndex = 52;
  624. this.label5.Text = "当前数据显示:";
  625. //
  626. // label4
  627. //
  628. this.label4.AutoSize = true;
  629. this.label4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  630. this.label4.Location = new System.Drawing.Point(21, 43);
  631. this.label4.Name = "label4";
  632. this.label4.Size = new System.Drawing.Size(63, 14);
  633. this.label4.TabIndex = 48;
  634. this.label4.Text = "熔炼号从";
  635. //
  636. // label1
  637. //
  638. this.label1.AutoSize = true;
  639. this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  640. this.label1.Location = new System.Drawing.Point(7, 12);
  641. this.label1.Name = "label1";
  642. this.label1.Size = new System.Drawing.Size(77, 14);
  643. this.label1.TabIndex = 15;
  644. this.label1.Text = "化验时间从";
  645. //
  646. // panel1
  647. //
  648. this.panel1.Controls.Add(this.EMGrid);
  649. this.panel1.Controls.Add(this.ultraPictureBox1);
  650. this.panel1.Controls.Add(this.label3);
  651. this.panel1.Controls.Add(this.label2);
  652. this.panel1.Controls.Add(this.ultraGroupBox1);
  653. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
  654. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
  655. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
  656. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
  657. this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
  658. this.panel1.Location = new System.Drawing.Point(0, 0);
  659. this.panel1.Name = "panel1";
  660. this.panel1.Size = new System.Drawing.Size(1008, 653);
  661. this.panel1.TabIndex = 12;
  662. //
  663. // EMGrid
  664. //
  665. this.EMGrid.DataMember = "Table1";
  666. this.EMGrid.DataSource = this.dataSet1;
  667. ultraGridColumn1.Header.VisiblePosition = 0;
  668. ultraGridColumn1.Hidden = true;
  669. ultraGridColumn1.Width = 54;
  670. ultraGridColumn2.Header.Caption = "炉号";
  671. ultraGridColumn2.Header.VisiblePosition = 1;
  672. ultraGridColumn2.RowLayoutColumnInfo.OriginX = 0;
  673. ultraGridColumn2.RowLayoutColumnInfo.OriginY = 0;
  674. ultraGridColumn2.RowLayoutColumnInfo.SpanX = 1;
  675. ultraGridColumn2.RowLayoutColumnInfo.SpanY = 1;
  676. ultraGridColumn2.Width = 179;
  677. ultraGridColumn3.Header.VisiblePosition = 6;
  678. ultraGridColumn3.RowLayoutColumnInfo.OriginX = 4;
  679. ultraGridColumn3.RowLayoutColumnInfo.OriginY = 0;
  680. ultraGridColumn3.RowLayoutColumnInfo.SpanX = 1;
  681. ultraGridColumn3.RowLayoutColumnInfo.SpanY = 1;
  682. ultraGridColumn3.Width = 116;
  683. ultraGridColumn4.Header.VisiblePosition = 7;
  684. ultraGridColumn4.RowLayoutColumnInfo.OriginX = 5;
  685. ultraGridColumn4.RowLayoutColumnInfo.OriginY = 0;
  686. ultraGridColumn4.RowLayoutColumnInfo.SpanX = 1;
  687. ultraGridColumn4.RowLayoutColumnInfo.SpanY = 1;
  688. ultraGridColumn4.Width = 160;
  689. ultraGridColumn5.Header.VisiblePosition = 4;
  690. ultraGridColumn5.Hidden = true;
  691. ultraGridColumn6.Header.VisiblePosition = 5;
  692. ultraGridColumn6.RowLayoutColumnInfo.OriginX = 3;
  693. ultraGridColumn6.RowLayoutColumnInfo.OriginY = 0;
  694. ultraGridColumn6.RowLayoutColumnInfo.SpanX = 1;
  695. ultraGridColumn6.RowLayoutColumnInfo.SpanY = 1;
  696. ultraGridColumn6.Width = 53;
  697. ultraGridColumn7.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  698. ultraGridColumn7.Header.VisiblePosition = 2;
  699. ultraGridColumn7.RowLayoutColumnInfo.OriginX = 1;
  700. ultraGridColumn7.RowLayoutColumnInfo.OriginY = 0;
  701. ultraGridColumn7.RowLayoutColumnInfo.SpanX = 1;
  702. ultraGridColumn7.RowLayoutColumnInfo.SpanY = 1;
  703. ultraGridColumn7.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown;
  704. ultraGridColumn7.Width = 66;
  705. ultraGridColumn8.Header.VisiblePosition = 3;
  706. ultraGridColumn8.RowLayoutColumnInfo.OriginX = 2;
  707. ultraGridColumn8.RowLayoutColumnInfo.OriginY = 0;
  708. ultraGridColumn8.RowLayoutColumnInfo.SpanX = 1;
  709. ultraGridColumn8.RowLayoutColumnInfo.SpanY = 1;
  710. ultraGridColumn8.Width = 40;
  711. ultraGridColumn9.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  712. ultraGridColumn9.Header.VisiblePosition = 8;
  713. ultraGridColumn9.RowLayoutColumnInfo.OriginX = 8;
  714. ultraGridColumn9.RowLayoutColumnInfo.OriginY = 0;
  715. ultraGridColumn9.RowLayoutColumnInfo.SpanX = 1;
  716. ultraGridColumn9.RowLayoutColumnInfo.SpanY = 1;
  717. ultraGridColumn10.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  718. ultraGridColumn10.Header.VisiblePosition = 9;
  719. ultraGridColumn10.RowLayoutColumnInfo.OriginX = 9;
  720. ultraGridColumn10.RowLayoutColumnInfo.OriginY = 0;
  721. ultraGridColumn10.RowLayoutColumnInfo.SpanX = 1;
  722. ultraGridColumn10.RowLayoutColumnInfo.SpanY = 1;
  723. ultraGridColumn11.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  724. ultraGridColumn11.Header.VisiblePosition = 10;
  725. ultraGridColumn11.RowLayoutColumnInfo.OriginX = 10;
  726. ultraGridColumn11.RowLayoutColumnInfo.OriginY = 0;
  727. ultraGridColumn11.RowLayoutColumnInfo.SpanX = 1;
  728. ultraGridColumn11.RowLayoutColumnInfo.SpanY = 1;
  729. ultraGridColumn12.Header.VisiblePosition = 11;
  730. ultraGridColumn12.Hidden = true;
  731. ultraGridColumn13.Header.VisiblePosition = 12;
  732. ultraGridColumn13.RowLayoutColumnInfo.OriginX = 11;
  733. ultraGridColumn13.RowLayoutColumnInfo.OriginY = 0;
  734. ultraGridColumn13.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(70, 0);
  735. ultraGridColumn13.RowLayoutColumnInfo.SpanX = 1;
  736. ultraGridColumn13.RowLayoutColumnInfo.SpanY = 1;
  737. ultraGridColumn14.Header.VisiblePosition = 13;
  738. ultraGridColumn14.RowLayoutColumnInfo.OriginX = 6;
  739. ultraGridColumn14.RowLayoutColumnInfo.OriginY = 0;
  740. ultraGridColumn14.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(70, 0);
  741. ultraGridColumn14.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(30, 0);
  742. ultraGridColumn14.RowLayoutColumnInfo.SpanX = 1;
  743. ultraGridColumn14.RowLayoutColumnInfo.SpanY = 1;
  744. ultraGridColumn15.Header.VisiblePosition = 14;
  745. ultraGridColumn15.RowLayoutColumnInfo.OriginX = 7;
  746. ultraGridColumn15.RowLayoutColumnInfo.OriginY = 0;
  747. ultraGridColumn15.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(160, 0);
  748. ultraGridColumn15.RowLayoutColumnInfo.SpanX = 1;
  749. ultraGridColumn15.RowLayoutColumnInfo.SpanY = 1;
  750. ultraGridBand1.Columns.AddRange(new object[] {
  751. ultraGridColumn1,
  752. ultraGridColumn2,
  753. ultraGridColumn3,
  754. ultraGridColumn4,
  755. ultraGridColumn5,
  756. ultraGridColumn6,
  757. ultraGridColumn7,
  758. ultraGridColumn8,
  759. ultraGridColumn9,
  760. ultraGridColumn10,
  761. ultraGridColumn11,
  762. ultraGridColumn12,
  763. ultraGridColumn13,
  764. ultraGridColumn14,
  765. ultraGridColumn15});
  766. ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
  767. this.EMGrid.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
  768. this.EMGrid.DisplayLayout.GroupByBox.Hidden = true;
  769. appearance6.FontData.BoldAsString = "True";
  770. appearance6.FontData.SizeInPoints = 10F;
  771. this.EMGrid.DisplayLayout.Override.CellAppearance = appearance6;
  772. appearance7.FontData.BoldAsString = "True";
  773. this.EMGrid.DisplayLayout.Override.HeaderAppearance = appearance7;
  774. this.EMGrid.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  775. this.EMGrid.DisplayLayout.Override.WrapHeaderText = Infragistics.Win.DefaultableBoolean.True;
  776. valueListItem16.DataValue = "11";
  777. valueListItem16.DisplayText = "白-甲";
  778. valueListItem17.DataValue = "12";
  779. valueListItem17.DisplayText = "白-乙";
  780. valueListItem18.DataValue = "13";
  781. valueListItem18.DisplayText = "白-丙";
  782. valueListItem19.DataValue = "14";
  783. valueListItem19.DisplayText = "白-丁";
  784. valueListItem20.DataValue = "21";
  785. valueListItem20.DisplayText = "中-甲";
  786. valueListItem21.DataValue = "22";
  787. valueListItem21.DisplayText = "中-乙";
  788. valueListItem22.DataValue = "23";
  789. valueListItem22.DisplayText = "中-丙";
  790. valueListItem23.DataValue = "24";
  791. valueListItem23.DisplayText = "中-丁";
  792. valueListItem24.DataValue = "31";
  793. valueListItem24.DisplayText = "夜-甲";
  794. valueListItem25.DataValue = "32";
  795. valueListItem25.DisplayText = "夜-乙";
  796. valueListItem26.DataValue = "33";
  797. valueListItem26.DisplayText = "夜-丙";
  798. valueListItem27.DataValue = "34";
  799. valueListItem27.DisplayText = "夜-丁";
  800. valueList1.ValueListItems.AddRange(new Infragistics.Win.ValueListItem[] {
  801. valueListItem16,
  802. valueListItem17,
  803. valueListItem18,
  804. valueListItem19,
  805. valueListItem20,
  806. valueListItem21,
  807. valueListItem22,
  808. valueListItem23,
  809. valueListItem24,
  810. valueListItem25,
  811. valueListItem26,
  812. valueListItem27});
  813. this.EMGrid.DisplayLayout.ValueLists.AddRange(new Infragistics.Win.ValueList[] {
  814. valueList1});
  815. this.EMGrid.Dock = System.Windows.Forms.DockStyle.Fill;
  816. this.EMGrid.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  817. this.EMGrid.Location = new System.Drawing.Point(0, 99);
  818. this.EMGrid.Name = "EMGrid";
  819. this.EMGrid.Size = new System.Drawing.Size(1008, 554);
  820. this.EMGrid.TabIndex = 6;
  821. this.EMGrid.DoubleClickRow += new Infragistics.Win.UltraWinGrid.DoubleClickRowEventHandler(this.EMGrid_DoubleClickRow);
  822. this.EMGrid.Click += new System.EventHandler(this.EMGrid_Click);
  823. //
  824. // dataSet1
  825. //
  826. this.dataSet1.DataSetName = "NewDataSet";
  827. this.dataSet1.Locale = new System.Globalization.CultureInfo("zh-CN");
  828. this.dataSet1.Tables.AddRange(new System.Data.DataTable[] {
  829. this.dataTable1});
  830. //
  831. // dataTable1
  832. //
  833. this.dataTable1.Columns.AddRange(new System.Data.DataColumn[] {
  834. this.dataColumn7,
  835. this.dataColumn8,
  836. this.dataColumn9,
  837. this.dataColumn84,
  838. this.dataColumn85,
  839. this.dataColumn1,
  840. this.dataColumn2,
  841. this.dataColumn3,
  842. this.dataColumn4,
  843. this.dataColumn5,
  844. this.dataColumn6,
  845. this.dataColumn10,
  846. this.dataColumn11,
  847. this.dataColumn12,
  848. this.dataColumn13});
  849. this.dataTable1.TableName = "Table1";
  850. //
  851. // dataColumn7
  852. //
  853. this.dataColumn7.ColumnName = "序号";
  854. //
  855. // dataColumn8
  856. //
  857. this.dataColumn8.ColumnName = "熔炼号";
  858. //
  859. // dataColumn9
  860. //
  861. this.dataColumn9.ColumnName = "计划牌号";
  862. //
  863. // dataColumn84
  864. //
  865. this.dataColumn84.ColumnName = "化验时间";
  866. //
  867. // dataColumn85
  868. //
  869. this.dataColumn85.Caption = "牌号编码";
  870. this.dataColumn85.ColumnName = "JHGZ";
  871. //
  872. // dataColumn1
  873. //
  874. this.dataColumn1.Caption = "班别";
  875. this.dataColumn1.ColumnName = "shiftcode";
  876. //
  877. // dataColumn2
  878. //
  879. this.dataColumn2.Caption = "工序";
  880. this.dataColumn2.ColumnName = "Station";
  881. //
  882. // dataColumn3
  883. //
  884. this.dataColumn3.Caption = "次数";
  885. this.dataColumn3.ColumnName = "SumTime";
  886. //
  887. // dataColumn4
  888. //
  889. this.dataColumn4.Caption = "判定牌号";
  890. this.dataColumn4.ColumnName = "JUDGE_STL_GRD";
  891. //
  892. // dataColumn5
  893. //
  894. this.dataColumn5.Caption = "判定结果";
  895. this.dataColumn5.ColumnName = "JUDGE_RESULT";
  896. //
  897. // dataColumn6
  898. //
  899. this.dataColumn6.Caption = "判定人";
  900. this.dataColumn6.ColumnName = "REG_ID";
  901. //
  902. // dataColumn10
  903. //
  904. this.dataColumn10.Caption = "次数";
  905. this.dataColumn10.ColumnName = "JUDGE_SEQ";
  906. //
  907. // dataColumn11
  908. //
  909. this.dataColumn11.Caption = "MN/S";
  910. this.dataColumn11.ColumnName = "SIMN";
  911. //
  912. // dataColumn12
  913. //
  914. this.dataColumn12.Caption = "时间差(分钟)";
  915. this.dataColumn12.ColumnName = "CM";
  916. //
  917. // dataColumn13
  918. //
  919. this.dataColumn13.Caption = "送样时间";
  920. this.dataColumn13.ColumnName = "SAMPLE_DATE1";
  921. //
  922. // ultraPictureBox1
  923. //
  924. this.ultraPictureBox1.BorderShadowColor = System.Drawing.Color.Empty;
  925. this.ultraPictureBox1.Location = new System.Drawing.Point(339, 286);
  926. this.ultraPictureBox1.Name = "ultraPictureBox1";
  927. this.ultraPictureBox1.Size = new System.Drawing.Size(100, 50);
  928. this.ultraPictureBox1.TabIndex = 16;
  929. //
  930. // label3
  931. //
  932. this.label3.BackColor = System.Drawing.Color.Blue;
  933. this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
  934. this.label3.Location = new System.Drawing.Point(564, 271);
  935. this.label3.Name = "label3";
  936. this.label3.Size = new System.Drawing.Size(100, 23);
  937. this.label3.TabIndex = 11;
  938. this.label3.Text = "label3";
  939. this.label3.Visible = false;
  940. //
  941. // label2
  942. //
  943. this.label2.BackColor = System.Drawing.Color.Red;
  944. this.label2.Location = new System.Drawing.Point(458, 230);
  945. this.label2.Name = "label2";
  946. this.label2.Size = new System.Drawing.Size(100, 23);
  947. this.label2.TabIndex = 6;
  948. this.label2.Text = "label2";
  949. this.label2.Visible = false;
  950. //
  951. // _panel1_Toolbars_Dock_Area_Left
  952. //
  953. this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  954. this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  955. this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  956. this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  957. this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 28);
  958. this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
  959. this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 625);
  960. this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
  961. //
  962. // ultraToolbarsManager1
  963. //
  964. this.ultraToolbarsManager1.DesignerFlags = 1;
  965. this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
  966. this.ultraToolbarsManager1.LockToolbars = true;
  967. this.ultraToolbarsManager1.ShowFullMenusDelay = 500;
  968. this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
  969. this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
  970. ultraToolbar1.DockedColumn = 0;
  971. ultraToolbar1.DockedRow = 0;
  972. buttonTool1.InstanceProps.IsFirstInGroup = true;
  973. buttonTool2.InstanceProps.IsFirstInGroup = true;
  974. buttonTool4.InstanceProps.IsFirstInGroup = true;
  975. buttonTool5.InstanceProps.IsFirstInGroup = true;
  976. ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  977. buttonTool1,
  978. buttonTool2,
  979. buttonTool3,
  980. buttonTool4,
  981. buttonTool5});
  982. ultraToolbar1.Text = "UltraToolbar1";
  983. this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  984. ultraToolbar1});
  985. buttonTool6.SharedPropsInternal.Caption = "查询(&Q)";
  986. buttonTool6.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  987. buttonTool7.SharedPropsInternal.Caption = "设置样点(&S)";
  988. buttonTool7.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  989. buttonTool8.SharedPropsInternal.Caption = "导出(&P)";
  990. buttonTool8.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  991. buttonTool9.SharedPropsInternal.Caption = "设置列(&R)";
  992. buttonTool9.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  993. buttonTool10.SharedPropsInternal.Caption = "关闭(&C)";
  994. buttonTool10.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  995. buttonTool12.SharedPropsInternal.Caption = "刷新复合元素";
  996. buttonTool12.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  997. this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  998. buttonTool6,
  999. buttonTool7,
  1000. buttonTool8,
  1001. buttonTool9,
  1002. buttonTool10,
  1003. buttonTool12});
  1004. this.ultraToolbarsManager1.Visible = false;
  1005. this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
  1006. //
  1007. // _panel1_Toolbars_Dock_Area_Right
  1008. //
  1009. this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  1010. this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  1011. this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  1012. this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  1013. this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1008, 28);
  1014. this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
  1015. this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 625);
  1016. this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
  1017. //
  1018. // _panel1_Toolbars_Dock_Area_Top
  1019. //
  1020. this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  1021. this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  1022. this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  1023. this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  1024. this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  1025. this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
  1026. this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1008, 28);
  1027. this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
  1028. //
  1029. // _panel1_Toolbars_Dock_Area_Bottom
  1030. //
  1031. this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  1032. this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
  1033. this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  1034. this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  1035. this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 653);
  1036. this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
  1037. this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1008, 0);
  1038. this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
  1039. //
  1040. // frmLgElements
  1041. //
  1042. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  1043. this.ClientSize = new System.Drawing.Size(1008, 653);
  1044. this.Controls.Add(this.panel1);
  1045. this.Name = "frmLgElements";
  1046. this.Text = "化学成分查询";
  1047. this.Load += new System.EventHandler(this.ELEMENTS_Load);
  1048. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
  1049. this.ultraGroupBox1.ResumeLayout(false);
  1050. this.ultraGroupBox1.PerformLayout();
  1051. ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).EndInit();
  1052. ((System.ComponentModel.ISupportInitialize)(this.cboGW)).EndInit();
  1053. ((System.ComponentModel.ISupportInitialize)(this.cmb_BZ)).EndInit();
  1054. ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).EndInit();
  1055. ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).EndInit();
  1056. this.panel1.ResumeLayout(false);
  1057. ((System.ComponentModel.ISupportInitialize)(this.EMGrid)).EndInit();
  1058. ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit();
  1059. ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).EndInit();
  1060. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
  1061. this.ResumeLayout(false);
  1062. }
  1063. #endregion
  1064. #endregion
  1065. public int sValue(string Svalue, string SCHvalue)
  1066. {
  1067. if (SCHvalue.Length < 1)
  1068. {
  1069. return 0;
  1070. }
  1071. if (Svalue.Length > 0)
  1072. {
  1073. string BValue = "-1";
  1074. string EValue = "-1";
  1075. if (Svalue.IndexOf("~") > 0)
  1076. {
  1077. BValue = Svalue.Substring(0, Svalue.IndexOf("~"));
  1078. EValue = Svalue.Substring(Svalue.IndexOf("~") + 1, Svalue.Length - Svalue.IndexOf("~") - 1);
  1079. if (double.Parse(SCHvalue) >= double.Parse(BValue) && double.Parse(SCHvalue) <= double.Parse(EValue))
  1080. {
  1081. return 0; //正确
  1082. }
  1083. else
  1084. {
  1085. return -1;
  1086. }
  1087. }
  1088. else
  1089. {
  1090. if (Svalue.IndexOf("<=") > -1)
  1091. {
  1092. EValue = Svalue.Substring(Svalue.IndexOf("<=") + 2, Svalue.Length - Svalue.IndexOf("<=") - 2);
  1093. if (double.Parse(SCHvalue) <= double.Parse(EValue))
  1094. {
  1095. return 0; //正确
  1096. }
  1097. else
  1098. {
  1099. return -1;
  1100. }
  1101. }
  1102. else
  1103. {
  1104. if (Svalue.IndexOf("<") > -1 && Svalue.IndexOf("=") == -1)
  1105. {
  1106. EValue = Svalue.Substring(Svalue.IndexOf("<") + 1, Svalue.Length - Svalue.IndexOf("<") - 1);
  1107. if (double.Parse(SCHvalue) < double.Parse(EValue))
  1108. {
  1109. return 0; //正确
  1110. }
  1111. else
  1112. {
  1113. return -1;
  1114. }
  1115. }
  1116. else
  1117. {
  1118. if (Svalue.IndexOf(">=") > -1)
  1119. {
  1120. EValue = Svalue.Substring(Svalue.IndexOf(">=") + 1, Svalue.Length - Svalue.IndexOf(">=") - 1);
  1121. if (double.Parse(SCHvalue) >= double.Parse(EValue))
  1122. {
  1123. return 0; //正确
  1124. }
  1125. else
  1126. {
  1127. return -1;
  1128. }
  1129. }
  1130. else
  1131. {
  1132. if (Svalue.IndexOf(">") > -1 && Svalue.IndexOf("=") == -1)
  1133. {
  1134. EValue = Svalue.Substring(Svalue.IndexOf(">") + 1, Svalue.Length - Svalue.IndexOf(">") - 1);
  1135. if (double.Parse(SCHvalue) > double.Parse(EValue))
  1136. {
  1137. return 0; //正确
  1138. }
  1139. else
  1140. {
  1141. return -1;
  1142. }
  1143. }
  1144. else
  1145. {
  1146. EValue = Svalue;
  1147. try
  1148. {
  1149. if (double.Parse(SCHvalue) == double.Parse(EValue))
  1150. {
  1151. return 0; //正确
  1152. }
  1153. }
  1154. catch { }
  1155. return -1;
  1156. }
  1157. }
  1158. }
  1159. }
  1160. }
  1161. }
  1162. return 0;
  1163. }
  1164. public void GetTAM_StandardElement()/// 查询判定牌号成分
  1165. {
  1166. int intSelectedIndex = cboGW.SelectedIndex; //选择的岗位
  1167. try
  1168. {
  1169. //
  1170. string strForeSmeltingId = "", strSme = "";
  1171. Color tmpC = c1;
  1172. string szJHGZ = "", strErr = "", szWhere = "", szQJ = "", szJYH = "";
  1173. object obj = null;
  1174. DataSet ds = new DataSet();
  1175. for (int j = 0; j < EMGrid.Rows.Count; j++)
  1176. {
  1177. for (int i = 0; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
  1178. {
  1179. EMGrid.Rows[j].Cells[i].Appearance.ForeColor = Color.Black;
  1180. }
  1181. if (j == 0)
  1182. {
  1183. EMGrid.Rows[j].Appearance.BackColor = tmpC;
  1184. if (intSelectedIndex == 0)
  1185. strForeSmeltingId = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, EMGrid.Rows[j].Cells[1].Value.ToString().IndexOf("-"));
  1186. else
  1187. {
  1188. if (EMGrid.Rows[j].Cells[1].Value.ToString().Length >= 10)
  1189. strForeSmeltingId = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, 10);
  1190. }
  1191. }
  1192. else
  1193. {
  1194. if (intSelectedIndex == 0)
  1195. strSme = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, EMGrid.Rows[j].Cells[1].Value.ToString().IndexOf("-"));
  1196. else
  1197. {
  1198. if (EMGrid.Rows[j].Cells[1].Value.ToString().Length >= 10)
  1199. strSme = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, 10);
  1200. }
  1201. if (strForeSmeltingId == strSme)
  1202. {
  1203. tmpC = SetRowBackColor(EMGrid.Rows[j], tmpC, true);
  1204. }
  1205. else
  1206. {
  1207. tmpC = SetRowBackColor(EMGrid.Rows[j], tmpC, false);
  1208. strForeSmeltingId = strSme;
  1209. }
  1210. }
  1211. if (intSelectedIndex == 0)
  1212. continue;
  1213. szJHGZ = EMGrid.Rows[j].Cells["JHGZ"].Value.ToString();
  1214. szJYH = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, 10);
  1215. strErr = "";
  1216. string[] ArrayId = new string[strERow.Length + 100]; // 后面加复合元素后,原有的会报错,加100
  1217. szWhere = szJYH; //条件
  1218. string szEleStd = "";
  1219. string szCrfStd = "('L02001','L02005') ";
  1220. int id = 0;
  1221. for (int i = 6; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
  1222. {
  1223. if (EMGrid.Rows[j].Cells[i].Appearance.ForeColor == Color.Red || EMGrid.Rows[j].Cells[i].Appearance.ForeColor == Color.FromArgb(204, 153, 0))
  1224. EMGrid.Rows[j].Cells[i].Appearance.ForeColor = Color.Black;
  1225. }
  1226. //铁样与转炉样不判定
  1227. if (EMGrid.Rows[j].Cells["Station"].Value.ToString().Contains("转炉") == false)
  1228. {
  1229. //设置要获取的化学成分标准,此处i的值必须与(SetGridRowHidden)要显示的列数一样,否则将无法实现相同炉号显示不同颜色
  1230. for (int i = 11; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
  1231. {
  1232. if (EMGrid.DisplayLayout.Bands[0].Columns[i].Hidden == false)
  1233. {
  1234. szEleStd = szEleStd + "','" + EMGrid.DisplayLayout.Bands[0].Columns[i].Header.Caption;
  1235. ArrayId[id] = EMGrid.DisplayLayout.Bands[0].Columns[i].Header.Caption;
  1236. id++;
  1237. }
  1238. }
  1239. if (!string.IsNullOrEmpty(szEleStd))
  1240. {
  1241. szEleStd = "('" + szEleStd.Substring(3, szEleStd.Length - 3) + "')";
  1242. ArrayList arry = new ArrayList();
  1243. arry.Add("ChemStandardInfo.select");
  1244. arry.Add(EMGrid.Rows[j].Cells["熔炼号"].Value.ToString());
  1245. CommonClientToServer cctos = new CommonClientToServer();
  1246. cctos.ob = this.ob;
  1247. ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  1248. "doSimpleQuery", arry, out strErr);
  1249. }
  1250. else
  1251. continue;
  1252. if (strErr != "")
  1253. {
  1254. continue;
  1255. }
  1256. else if (ds.Tables[0].Rows.Count > 0)
  1257. {
  1258. //ArrayList ar = ds as ArrayList;
  1259. //DataSet dsStandard = (ar[0] as DataSet);
  1260. if (ds.Tables[0].Rows.Count == 0)
  1261. {
  1262. for (int i = 3; i < 18; i++)
  1263. {
  1264. if (EMGrid.Rows[j].Cells[i].Appearance.ForeColor == Color.Red)
  1265. EMGrid.Rows[j].Cells[i].Appearance.ForeColor = Color.Black;
  1266. }
  1267. continue;
  1268. }
  1269. foreach (DataRow Drow in ds.Tables[0].Rows)
  1270. {
  1271. for (int i = 0; i < ArrayId.Length; i++)
  1272. {
  1273. if (dataSet1.Tables[0].Columns.Contains(Drow["ITEMCODE"].ToString()))
  1274. {
  1275. if (EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Value.ToString().Length > 0)
  1276. {
  1277. if (Drow["ITEMCODE"].ToString() == ArrayId[i])
  1278. {
  1279. int reP = 0;
  1280. try
  1281. {
  1282. if (reP == 0)
  1283. {
  1284. if (Drow["STDMIN"].ToString() != "" && Drow["STDMAX"].ToString() != "")
  1285. szQJ = Drow["STDMIN"].ToString() + "~" + Drow["STDMAX"].ToString();
  1286. else if (Drow["STDMIN"].ToString() != "" && Drow["STDMAX"].ToString() == "")
  1287. szQJ = "> " + Drow["STDMIN"].ToString();
  1288. else if (Drow["STDMIN"].ToString() == "" && Drow["STDMAX"].ToString() != "")
  1289. szQJ = "<= " + Drow["STDMAX"].ToString();
  1290. reP = sValue(szQJ, EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Value.ToString());
  1291. }
  1292. }
  1293. catch (Exception ex)
  1294. {
  1295. Console.WriteLine(ex.Message);
  1296. }
  1297. if (reP == -1 && Drow["STDSTYLE"].ToString() == "1")
  1298. {
  1299. EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.FromArgb(204, 153, 0);// Color.Yellow;
  1300. }
  1301. else if (reP == -1 && Drow["STDSTYLE"].ToString() == "2" && EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor == Color.FromArgb(204, 153, 0))
  1302. {
  1303. EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.Violet;
  1304. }
  1305. else if (reP == -1 && Drow["STDSTYLE"].ToString() == "3" && EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor == Color.Violet)
  1306. {
  1307. EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.Red;
  1308. }
  1309. else if (EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor != Color.FromArgb(204, 153, 0))
  1310. {
  1311. EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.Black;
  1312. }
  1313. break;
  1314. }
  1315. }
  1316. }
  1317. }
  1318. }
  1319. }
  1320. }
  1321. }
  1322. }
  1323. catch(Exception ex)
  1324. {
  1325. }
  1326. }
  1327. public void GetId(int RowId, Infragistics.Win.UltraWinGrid.UltraGrid GRID)
  1328. {
  1329. int i = RowId;
  1330. if (GRID.Rows[i].Cells[1].Value.ToString().Length > 0)
  1331. {
  1332. if (GRID.Rows[i].Cells[0].Value.ToString().IndexOf("√") < 0)
  1333. {
  1334. GRID.Rows[i].Cells[0].Value = GRID.Rows[i].Cells[0].Value + "√";
  1335. }
  1336. else
  1337. {
  1338. GRID.Rows[i].Cells[0].Value = GRID.Rows[i].Cells[0].Value.ToString().Substring(0, GRID.Rows[i].Cells[0].Value.ToString().IndexOf("√"));
  1339. }
  1340. }
  1341. }
  1342. private string ReturnSteelCodeByHeatNoFromUltraGrid(string heatNo)
  1343. {
  1344. string strSteelCode = "";
  1345. foreach (UltraGridRow ugr in this.EMGrid.Rows)
  1346. {
  1347. if (ugr.Cells["熔炼号"].Value.ToString() == heatNo)
  1348. {
  1349. if (ugr.Cells["JUDGE_STL_GRD"].Value.ToString().Length > 0 && ugr.Cells["熔炼号"].Value.ToString() != ugr.Cells["JUDGE_STL_GRD"].Value.ToString())
  1350. return ugr.Cells["JUDGE_STL_GRD"].Value.ToString();
  1351. }
  1352. }
  1353. return strSteelCode;
  1354. }
  1355. private void EMGrid_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
  1356. {
  1357. GetId(e.Row.Index, EMGrid);
  1358. if (EMGrid.Rows[e.Row.Index].Cells[0].Value.ToString().IndexOf("√") > 0)
  1359. {
  1360. frmLgEleDetail.StrT = "02";
  1361. frmLgEleDetail.StrHic = EMGrid.Rows[e.Row.Index].Cells[1].Text.Trim().ToString();
  1362. string szLH = EMGrid.Rows[e.Row.Index].Cells["熔炼号"].Value.ToString();
  1363. string strJudjeCode = ReturnSteelCodeByHeatNoFromUltraGrid(szLH);
  1364. //string[] szAr = szLH.Split('-');
  1365. //szLH = szAr[0];// + szAr[1];
  1366. if (szLH.Length < 8)
  1367. return;
  1368. // 如果判定牌号有变化,弹出框中显示判定牌号信息
  1369. frmLgEleDetail.strSteelCode = EMGrid.Rows[e.Row.Index].Cells["计划牌号"].Text.Trim();
  1370. frmLgEleDetail.strSteelCodeGrd = strJudjeCode;
  1371. string szJYH = EMGrid.ActiveRow.Cells[1].Value.ToString();
  1372. string szEleStd = "";
  1373. //设置要获取的化学成分标准
  1374. for (int i = 5; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
  1375. {
  1376. if (EMGrid.DisplayLayout.Bands[0].Columns[i].Hidden == false)
  1377. {
  1378. szEleStd = szEleStd + "','" + EMGrid.DisplayLayout.Bands[0].Columns[i].Header.Caption;
  1379. }
  1380. }
  1381. frmLgEleDetail.szEleStd = szEleStd;
  1382. frmLgEleDetail Azhupi = new frmLgEleDetail(frmLgEleDetail.StrHic, frmLgEleDetail.strSteelCode, szJYH.Substring(9, 1), ob);
  1383. Azhupi.ultrgridRow = EMGrid.ActiveRow;
  1384. Azhupi.ShowDialog(this);
  1385. }
  1386. }
  1387. private void EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1388. {
  1389. UltraMaskedEdit ume = (UltraMaskedEdit)sender;
  1390. switch (e.Button.Key)
  1391. {
  1392. case "edit":
  1393. frmNumberWriter frm = new frmNumberWriter();
  1394. frm._strText = ume.Text.Trim();
  1395. frm.Location = GetChildWindowLocation(frm.Size);
  1396. frm.ShowDialog();
  1397. ume.Text = frm._strText;
  1398. break;
  1399. case "clear":
  1400. if (ume.Text.Trim().Length > 0)
  1401. {
  1402. ume.Tag = ume.Text.Trim();
  1403. ume.Text = "";
  1404. }
  1405. else
  1406. {
  1407. if (ume.Tag != null)
  1408. ume.Text = ume.Tag.ToString();
  1409. }
  1410. break;
  1411. }
  1412. }
  1413. /// <summary>
  1414. /// 获取子窗体弹出的位置坐标
  1415. /// </summary>
  1416. /// <param name="ChildWindowSize"></param>
  1417. /// <returns></returns>
  1418. private Point GetChildWindowLocation(Size ChildWindowSize)
  1419. {
  1420. int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
  1421. int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
  1422. if (width > 0)
  1423. width = Cursor.Position.X - width;
  1424. else
  1425. width = Cursor.Position.X;
  1426. if (height > 0)
  1427. height = Cursor.Position.Y - height + 10;
  1428. else
  1429. height = Cursor.Position.Y + 10;
  1430. return new Point(width, height);
  1431. }
  1432. #region " Main Code "
  1433. //增加分页显示功能
  1434. private DataSet _dsAll = new DataSet();
  1435. private DataSet _dsSet;
  1436. private int _intBegin = 0;
  1437. private int _intEnd = 40;
  1438. private string _strDuty = "0";
  1439. private string _dvRowFilter = "";
  1440. private string _strWhere1 = "";
  1441. private string _strWhere2 = "";
  1442. private string _szTableName = "";
  1443. public string _devPos = "";
  1444. private Color c1 = Color.PaleGreen;
  1445. private Color c2 = Color.White;
  1446. private void btn_Up_Click(object sender, System.EventArgs e)
  1447. {
  1448. int step = 40;
  1449. try
  1450. {
  1451. step = Convert.ToInt32(this.txtPage.Text.Trim());
  1452. if (step < 1)
  1453. throw new Exception();
  1454. }
  1455. catch
  1456. {
  1457. MessageBox.Show("请输入正确的显示行数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1458. return;
  1459. }
  1460. this.Cursor = Cursors.WaitCursor;
  1461. dataTable1.Clear();
  1462. if (_dsAll.Tables.Count <= 0)
  1463. return;
  1464. int count = _dsAll.Tables[0].DefaultView.Count;
  1465. if (_intBegin < step)
  1466. {
  1467. _intEnd = _intBegin;
  1468. _intBegin = 0;
  1469. }
  1470. else
  1471. {
  1472. _intEnd = _intBegin;
  1473. _intBegin -= step;
  1474. }
  1475. if (_intBegin > 0) this.btn_Up.Enabled = true;
  1476. else btn_Up.Enabled = false;
  1477. if (_intEnd < count) this.btn_Down.Enabled = true;
  1478. else btn_Down.Enabled = false;
  1479. this.label6.Text = String.Format("第 {0} 行到第 {1} 行, 共 {2} 行", _intBegin + 1, _intEnd, count);
  1480. SetEachRowData();
  1481. //数据获取启动线程。执行完后关闭
  1482. Thread t = new Thread(new ThreadStart(DoStandFetchReady));
  1483. t.IsBackground = true;
  1484. t.Start();
  1485. }
  1486. private void DoStandFetchReady()
  1487. {
  1488. GetTAM_StandardElement();
  1489. try
  1490. {
  1491. this.Cursor = Cursors.Default;
  1492. }
  1493. catch { }
  1494. //关闭正在取数据的对话框
  1495. // Invoke(new UpdateUIDelegate(UpdateUI), new object[] { true });
  1496. }
  1497. private void btn_Down_Click(object sender, System.EventArgs e)
  1498. {
  1499. int step = 40;
  1500. try
  1501. {
  1502. step = Convert.ToInt32(this.txtPage.Text.Trim());
  1503. if (step < 1)
  1504. throw new Exception();
  1505. }
  1506. catch
  1507. {
  1508. MessageBox.Show("请输入正确的显示行数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1509. return;
  1510. }
  1511. this.Cursor = Cursors.WaitCursor;
  1512. dataTable1.Clear();
  1513. if (_dsAll.Tables.Count <= 0)
  1514. return;
  1515. int count = _dsAll.Tables[0].DefaultView.Count;
  1516. this._intBegin = this._intEnd;
  1517. this._intEnd += step;
  1518. if (_intEnd > count) _intEnd = count;
  1519. if (_intBegin > 0) this.btn_Up.Enabled = true;
  1520. else btn_Up.Enabled = false;
  1521. if (_intEnd < count) this.btn_Down.Enabled = true;
  1522. else btn_Down.Enabled = false;
  1523. this.label6.Text = String.Format("第 {0} 行到第 {1} 行, 共 {2} 行", _intBegin + 1, _intEnd, count);
  1524. SetEachRowData();
  1525. //数据获取启动线程。执行完后关闭
  1526. Thread t = new Thread(new ThreadStart(DoStandFetchReady));
  1527. t.IsBackground = true;
  1528. t.Start();
  1529. this.Cursor = Cursors.Default;
  1530. }
  1531. private void button3_Click(object sender, System.EventArgs e)
  1532. {
  1533. try
  1534. {
  1535. if (_dsAll == null || _dsAll.Tables.Count <= 0)
  1536. return;
  1537. int count = _dsAll.Tables[0].DefaultView.Count;
  1538. if (this.button3.Text == "全部显示")
  1539. {
  1540. this._intBegin = 0;
  1541. this.button3.Text = "分页显示";
  1542. this.btn_Up.Enabled = false;
  1543. this.btn_Down.Enabled = false;
  1544. if (_intEnd == count)
  1545. return;
  1546. else
  1547. this._intEnd = count;
  1548. }
  1549. else
  1550. {
  1551. int step = 40;
  1552. try
  1553. {
  1554. step = Convert.ToInt32(this.txtPage.Text.Trim());
  1555. if (step < 1)
  1556. throw new Exception();
  1557. }
  1558. catch
  1559. {
  1560. MessageBox.Show("请输入正确的显示行数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1561. return;
  1562. }
  1563. this._intBegin = 0;
  1564. if (step < count)
  1565. {
  1566. this._intEnd = step;
  1567. this.btn_Up.Enabled = false;
  1568. this.btn_Down.Enabled = true;
  1569. }
  1570. else
  1571. {
  1572. this._intEnd = count;
  1573. this.btn_Up.Enabled = false;
  1574. this.btn_Down.Enabled = false;
  1575. this.button3.Text = "全部显示";
  1576. return;
  1577. }
  1578. this.button3.Text = "全部显示";
  1579. }
  1580. this.Cursor = Cursors.WaitCursor;
  1581. if (count == 0)
  1582. {
  1583. this.label6.Text = "无数据";
  1584. this.Cursor = Cursors.Default;
  1585. return;
  1586. }
  1587. else
  1588. this.label6.Text = String.Format("第 {0} 行到第 {1} 行, 共 {2} 行", _intBegin, _intEnd, count);
  1589. button3.Enabled = false;
  1590. SetEachRowData();
  1591. button3.Enabled = true;
  1592. //数据获取启动线程。执行完后关闭
  1593. Thread t = new Thread(new ThreadStart(DoStandFetchReady));
  1594. t.IsBackground = true;
  1595. t.Start();
  1596. }
  1597. catch
  1598. {
  1599. button3.Enabled = true;
  1600. }
  1601. }
  1602. #region " Init "
  1603. // 获取所有复合成分元素列表,并大写
  1604. ArrayList ceqChemList = null;
  1605. private void ELEMENTS_Load(object sender, System.EventArgs e)
  1606. {
  1607. try
  1608. {
  1609. ceqChemList = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.GetAllCeqChemByUpperChar(new ClientParamWithSqlConditionAndOpenBase("", this.ob));
  1610. }
  1611. catch
  1612. {
  1613. }
  1614. this.EMGrid.DisplayLayout.Bands[0].Columns[1].Width = 95;
  1615. this.EMGrid.DisplayLayout.Bands[0].Columns[2].Width = 90;
  1616. this.EMGrid.DisplayLayout.Bands[0].Columns[8].Width = 90;
  1617. this.EMGrid.DisplayLayout.Bands[0].Columns[9].Width = 65;
  1618. this.EMGrid.DisplayLayout.Bands[0].Columns[10].Width = 65;
  1619. label6.Visible = false;
  1620. EMGrid.Font = new System.Drawing.Font("Tahoma", 9F);
  1621. string strErr = "";
  1622. //获取所有化学成份列名
  1623. ArrayList arry = new ArrayList();
  1624. arry.Add("FrmLgElements.select");//此ID为XML文件ID
  1625. CommonClientToServer cctos = new CommonClientToServer();
  1626. cctos.ob = this.ob;
  1627. DataSet dsElements = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  1628. "doSimpleQuery", arry, out strErr);
  1629. if (strErr == "" && dsElements != null)
  1630. {
  1631. foreach (DataRow dr in dsElements.Tables[0].Rows)
  1632. {
  1633. dataTable1.Columns.Add(dr["BaseName"].ToString(), typeof(System.Decimal)); //添加列
  1634. }
  1635. }
  1636. string strElementsRow = ElementsConfig.GetElementsRow(); //调用函数获取要显示的列名
  1637. strERow = strElementsRow.Split('*');
  1638. _strDuty = Core.LgMes.Client.LgJobMgt.CStaticMethod.GetCurrentClass(this.ob).Substring(1, 1);
  1639. GetCurrDuty();
  1640. uldtBeginTime.Value = DateTime.Today.ToString("yyyy-MM-dd") + " 00:00";
  1641. uldtEndTime.Value = DateTime.Today.ToString("yyyy-MM-dd") + " 23:59";
  1642. if (_devPos == "0")
  1643. {
  1644. this.cboGW.SelectedIndex = 1;
  1645. }
  1646. else
  1647. {
  1648. int intIndex = 1;
  1649. switch (_devPos.Substring(0, 3))
  1650. {
  1651. case "HMP":
  1652. intIndex = 0;
  1653. break;
  1654. case "BOF":
  1655. intIndex = 1;
  1656. break;
  1657. case "CAS":
  1658. intIndex = 2;
  1659. break;
  1660. case "LFS":
  1661. intIndex = 3;
  1662. break;
  1663. case "RHS":
  1664. intIndex = 4;
  1665. break;
  1666. case "VDS":
  1667. intIndex = 5;
  1668. break;
  1669. case "CCM":
  1670. intIndex = 6;
  1671. break;
  1672. default:
  1673. break;
  1674. }
  1675. cboGW.SelectedIndex = intIndex;
  1676. }
  1677. this.SetDuty();
  1678. GetDataFromAll();
  1679. StartGetDataThread();
  1680. }
  1681. public delegate void UpdateUIDelegate(bool IsDataLoaded);
  1682. public void GetQualityInfo(string szLH)
  1683. {
  1684. try
  1685. {
  1686. this.ultraMaskedEdit1.Text = szLH;
  1687. _strWhere1 = String.Format(" where lh like '%{0}%' ", this.ultraMaskedEdit1.Text.Trim());
  1688. object obj = null;
  1689. _dsAll = obj as DataSet;
  1690. _dsAll.Tables[0].DefaultView.RowFilter = _dvRowFilter;
  1691. SetDataToGrid();
  1692. }
  1693. catch (Exception ex)
  1694. {
  1695. string Msg = ex.Message;
  1696. }
  1697. }
  1698. /// <summary>
  1699. /// 将数据装载到DATASET
  1700. /// </summary>
  1701. private void SetEachRowData()
  1702. {
  1703. int XH = 0;
  1704. try
  1705. {
  1706. ArrayList deleteCol = new ArrayList();
  1707. foreach (DataColumn dc in dataTable1.Columns)
  1708. {
  1709. if (!_dsAll.Tables[0].Columns.Contains(dc.ColumnName.ToUpper()) && ceqChemList.Contains(dc.ColumnName.ToUpper()))
  1710. {
  1711. deleteCol.Add(dc.ColumnName.ToUpper());
  1712. }
  1713. }
  1714. // 没有的元素需要删除
  1715. foreach (string s in deleteCol)
  1716. {
  1717. dataTable1.Columns.Remove(s);
  1718. }
  1719. DataRow newRow = dataTable1.NewRow();
  1720. DataRow Drow = null;
  1721. dataTable1.Clear();
  1722. int RowId = this._intBegin + 1;
  1723. for (int i = this._intBegin; i < this._intEnd; i++)
  1724. {
  1725. newRow = dataTable1.NewRow();
  1726. Drow = _dsAll.Tables[0].DefaultView[i].Row;
  1727. newRow[0] = RowId++;
  1728. newRow[1] = Drow["HEATNO"].ToString();
  1729. newRow[6] = CStaticMethod.ChemelementPath(Drow["ASSAYTYPECODE"].ToString());
  1730. string strAs = Drow["ASSAYTYPECODE"].ToString();
  1731. newRow[7] = strAs.Substring(strAs.Length - 1, 1); //次数
  1732. newRow[2] = Drow["gzbm"].ToString();
  1733. if (Drow["ASSAYDATE"].ToString() != "")
  1734. newRow[3] = Convert.ToDateTime(Drow["ASSAYDATE"]).ToString("yyyy-MM-dd HH:mm:ss");
  1735. newRow[5] = Drow["shiftcode"].ToString();
  1736. newRow[11] = Drow["SIMN"].ToString();//20120109 新增
  1737. foreach (DataRow dr in dtSamplesignal.Tables[0].Rows)//20150401新增
  1738. {
  1739. string Strpos =analysChineseName((dr["STRPOS"].ToString().Substring(0,3)));
  1740. if (dr["HEATNO"].ToString().Contains(Drow["HEATNO"].ToString()) && Strpos.Equals(newRow[6]))
  1741. {
  1742. if (Math.Abs(Convert.ToDouble((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["UPDATE_TIME"])).TotalMinutes)) < 2)
  1743. {
  1744. double aaa=(Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes;
  1745. if ((Math.Round((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes,0)) > 0)
  1746. //(Math.Round((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes, 0)) < 20)
  1747. {
  1748. newRow[13] = Math.Round((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes,2).ToString();//Math.Round(
  1749. newRow[14] = Convert.ToDateTime(dr["SAMPLE_DATE1"]).ToString("yyyy-MM-dd HH:mm:ss");
  1750. }
  1751. }
  1752. }
  1753. }
  1754. try
  1755. {
  1756. foreach (DataColumn dc in _dsAll.Tables[0].Columns)
  1757. {
  1758. foreach (DataColumn dc1 in dataTable1.Columns)
  1759. {
  1760. if (dc1.ColumnName.ToUpper() == dc.ColumnName.ToUpper())
  1761. {
  1762. if (Drow[dc].ToString() != "")
  1763. newRow[dc1] = Drow[dc].ToString();
  1764. if (!Isbool)
  1765. if (newRow[7] != "" && Drow["JUDGE_SEQ"].ToString() != "")
  1766. {
  1767. if (strAs.Substring(0, 1) == "G" && Convert.ToInt32(newRow[7]) == Convert.ToInt32(Drow["JUDGE_SEQ"].ToString()))
  1768. {
  1769. newRow[8] = Drow["JUDGE_STL_GRD"].ToString();
  1770. newRow[9] = Drow["JUDGE_RESULT"].ToString() == "1" ? "合格" : "不合格";
  1771. newRow[10] = Drow["REG_ID"].ToString();
  1772. }
  1773. else
  1774. {
  1775. newRow[8] = null;
  1776. newRow[9] = null;
  1777. newRow[10] = null;
  1778. }
  1779. }
  1780. break;
  1781. }
  1782. }
  1783. }
  1784. }
  1785. catch(Exception ex)
  1786. {
  1787. // MessageBox.Show(ex.Message);
  1788. }
  1789. dataTable1.Rows.Add(newRow);
  1790. SetGridRowHidden();
  1791. }
  1792. /*
  1793. * 修改描述:计算连铸和前工序的成份偏差
  1794. * 作者:在datatable 数据填充后再计算
  1795. * 修改日期:20131203
  1796. */
  1797. try
  1798. {
  1799. calculateChemelentDifference();
  1800. }
  1801. catch (Exception ex)
  1802. {
  1803. throw ex;
  1804. }
  1805. }
  1806. catch (Exception ex)
  1807. {
  1808. throw ex;
  1809. }
  1810. }
  1811. /// <summary>
  1812. /// 根据设置隐藏不要显示的列
  1813. /// </summary>
  1814. private void SetGridRowHidden()
  1815. {
  1816. try
  1817. {
  1818. //新增列时,相继修改J的值(新增n列时,j=j+n),否则将不会在界面显示
  1819. for (int j = 15; j < EMGrid.DisplayLayout.Bands[0].Columns.Count; j++)
  1820. {
  1821. if (ceqChemList.Contains(EMGrid.DisplayLayout.Bands[0].Columns[j].Header.Caption.ToUpper()))
  1822. {
  1823. EMGrid.DisplayLayout.Bands[0].Columns[j].Width = 60;
  1824. EMGrid.DisplayLayout.Bands[0].Columns[j].CellActivation = Activation.NoEdit;
  1825. continue;
  1826. }
  1827. EMGrid.DisplayLayout.Bands[0].Columns[j].Hidden = true;
  1828. EMGrid.DisplayLayout.Bands[0].Columns[j].Width = 60;
  1829. EMGrid.DisplayLayout.Bands[0].Columns[j].CellActivation = Activation.NoEdit;
  1830. EMGrid.DisplayLayout.Bands[0].Columns[0].CellActivation = Activation.AllowEdit;
  1831. EMGrid.DisplayLayout.Bands[0].Columns[1].CellActivation = Activation.AllowEdit;
  1832. EMGrid.DisplayLayout.Bands[0].Columns[2].CellActivation = Activation.NoEdit;
  1833. EMGrid.DisplayLayout.Bands[0].Columns[3].CellActivation = Activation.NoEdit;
  1834. EMGrid.DisplayLayout.Bands[0].Columns[4].CellActivation = Activation.NoEdit;
  1835. EMGrid.DisplayLayout.Bands[0].Columns[5].CellActivation = Activation.NoEdit;
  1836. EMGrid.DisplayLayout.Bands[0].Columns[6].CellActivation = Activation.NoEdit;
  1837. EMGrid.DisplayLayout.Bands[0].Columns[7].CellActivation = Activation.NoEdit;
  1838. }
  1839. for (int i = 0; i < strERow.Length; i++)
  1840. {
  1841. if (!string.IsNullOrEmpty(strERow[i]))
  1842. EMGrid.DisplayLayout.Bands[0].Columns[strERow[i]].Hidden = false;
  1843. }
  1844. for (int j = 0; j < strRowName.Length; j++)
  1845. {
  1846. EMGrid.DisplayLayout.Bands[0].Columns[strRowName[j]].Header.VisiblePosition = j + 8;
  1847. }
  1848. EMGrid.DisplayLayout.Bands[0].Columns[5].Header.VisiblePosition = EMGrid.DisplayLayout.Bands[0].Columns.Count;
  1849. EMGrid.DisplayLayout.Bands[0].Columns[3].Header.VisiblePosition = EMGrid.DisplayLayout.Bands[0].Columns.Count;
  1850. EMGrid.DisplayLayout.Bands[0].Columns[6].Header.VisiblePosition = 2;
  1851. EMGrid.DisplayLayout.Bands[0].Columns[7].Header.VisiblePosition = 3;
  1852. EMGrid.DisplayLayout.Bands[0].Columns[2].Header.VisiblePosition = 4;
  1853. EMGrid.DisplayLayout.Bands[0].Columns[8].Header.VisiblePosition = 5;
  1854. EMGrid.DisplayLayout.Bands[0].Columns[9].Header.VisiblePosition = 6;
  1855. EMGrid.DisplayLayout.Bands[0].Columns[10].Header.VisiblePosition = 7;
  1856. EMGrid.DisplayLayout.Bands[0].Columns[12].Header.VisiblePosition = 8;
  1857. EMGrid.DisplayLayout.Bands[0].Columns[1].Header.Fixed = true;
  1858. EMGrid.DisplayLayout.Bands[0].Columns[2].Header.Fixed = true;
  1859. EMGrid.DisplayLayout.Bands[0].Columns[6].Header.Fixed = true;
  1860. EMGrid.DisplayLayout.Bands[0].Columns[7].Header.Fixed = true;
  1861. }
  1862. catch
  1863. {
  1864. }
  1865. }
  1866. private void TestDs()
  1867. {
  1868. ClientParamWithSqlConditionAndOpenBase param = new ClientParamWithSqlConditionAndOpenBase();
  1869. param.sqlCondition = "J41-04504A_C102_S";
  1870. param.ob = this.ob;
  1871. //DataSet ds = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.ReturnCeqChemByCheckNo(param);
  1872. }
  1873. private void SetDataToGrid()
  1874. {
  1875. this._intBegin = 0;
  1876. //this._intEnd = Convert.ToInt32(this.txtPage.Text);
  1877. if (_dsAll != null)
  1878. {
  1879. int count = _dsAll.Tables[0].Rows.Count;
  1880. if (count <= _intEnd)
  1881. {
  1882. //_intEnd = count;
  1883. this.btn_Up.Enabled = false;
  1884. this.btn_Down.Enabled = false;
  1885. this.button3.Enabled = false;
  1886. }
  1887. else
  1888. {
  1889. this.btn_Up.Enabled = false;
  1890. this.btn_Down.Enabled = true;
  1891. this.button3.Enabled = true;
  1892. }
  1893. if (count == 0)
  1894. {
  1895. this.label6.Text = "无数据";
  1896. this.EMGrid.Cursor = System.Windows.Forms.Cursors.Arrow;
  1897. }
  1898. else
  1899. this.label6.Text = String.Format("第 1 行到第 {0} 行, 共 {1} 行", _intEnd, count);
  1900. try
  1901. {
  1902. SetEachRowData();
  1903. }
  1904. catch
  1905. {
  1906. }
  1907. GetTAM_StandardElement(); // 取成分割标准对比
  1908. }
  1909. else
  1910. {
  1911. this.label6.Text = "无数据";
  1912. }
  1913. this.EMGrid.Cursor = System.Windows.Forms.Cursors.Arrow;
  1914. }
  1915. #endregion
  1916. #region " ToolBar Event "
  1917. public override void ToolBar_Click(object sender, string ToolbarKey)
  1918. {
  1919. switch (ToolbarKey)
  1920. {
  1921. case "Query":
  1922. this.GetDataFromAll();
  1923. break;
  1924. case "SetSampling": //设置样点
  1925. SetSampling();
  1926. break;
  1927. case "SetRowName": //设置化学成份字段显示
  1928. SetRowName();
  1929. break;
  1930. case "Export":
  1931. if (EMGrid.Rows.Count > 0)
  1932. {
  1933. ExportExcel();
  1934. }
  1935. else
  1936. MessageBox.Show("没有化学成分信息。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1937. break;
  1938. case "Exit":
  1939. this.Close();
  1940. break;
  1941. default:
  1942. break;
  1943. }
  1944. base.ToolBar_Click(sender, ToolbarKey);
  1945. }
  1946. /// <summary>
  1947. /// 设置化学成份列名
  1948. /// </summary>
  1949. private void SetRowName()
  1950. {
  1951. DataSet dsElements = new DataSet();
  1952. //定义一个ArrayList集合存储变量[参数]值
  1953. ArrayList arry = new ArrayList();
  1954. arry.Add("FrmSetRowName.select");
  1955. //调用服务端方法
  1956. CoreClientParam CCP_Sampling = new CoreClientParam();
  1957. DataTable dt = new DataTable();
  1958. CCP_Sampling.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
  1959. CCP_Sampling.MethodName = "doSimpleQuery";
  1960. CCP_Sampling.ServerParams = new object[] { arry };
  1961. CCP_Sampling.SourceDataTable = dt;
  1962. this.ExecuteQueryToDataTable(CCP_Sampling, CoreInvokeType.Internal);
  1963. if (dt != null)
  1964. {
  1965. if (dt.Rows.Count > 0)
  1966. {
  1967. dt.Rows[0].Table.Columns.Add(new DataColumn("选择", typeof(System.Boolean)));
  1968. foreach (DataRow dr in dt.Rows)
  1969. {
  1970. dr["选择"] = false;
  1971. }
  1972. frmConfigElementsRow frm = new frmConfigElementsRow();
  1973. frm.StartPosition = FormStartPosition.CenterScreen;
  1974. frm.WindowState = FormWindowState.Normal;
  1975. dsElements.Tables.Add(dt);
  1976. frm._dsSet = dsElements;
  1977. frm.ShowDialog();
  1978. // 判断是否有设置
  1979. if (frm._setFlag)
  1980. {
  1981. string strElementsRow = ElementsConfig.GetElementsRow(); //调用函数获取要显示的列名
  1982. strERow = strElementsRow.Split('*');
  1983. GetDataFromAll();
  1984. }
  1985. }
  1986. else
  1987. MessageBox.Show("查询失败!!!", "提示");
  1988. }
  1989. }
  1990. /// <summary>
  1991. /// 显示样点
  1992. /// </summary>
  1993. private void SetSampling()
  1994. {
  1995. DataTable dt = new DataTable();
  1996. if (dataSet1 != null)
  1997. {
  1998. _dsSet = new DataSet();
  1999. //定义一个ArrayList集合存储变量[参数]值
  2000. ArrayList arry = new ArrayList();
  2001. arry.Add("FrmSetSamplin.select");//此ID为XML文件ID
  2002. //调用服务端方法
  2003. CoreClientParam CCP_Sampling = new CoreClientParam();
  2004. CCP_Sampling.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
  2005. CCP_Sampling.MethodName = "doSimpleQuery";
  2006. CCP_Sampling.ServerParams = new object[] { arry };
  2007. CCP_Sampling.SourceDataTable = dt;
  2008. this.ExecuteQueryToDataTable(CCP_Sampling, CoreInvokeType.Internal);
  2009. dt.Rows[0].Table.Columns.Add(new DataColumn("工序名", typeof(System.String)));
  2010. dt.Rows[0].Table.Columns.Add(new DataColumn("选择", typeof(System.Boolean)));
  2011. foreach (DataRow dr in dt.Rows)
  2012. {
  2013. string SetColumn = dr["ASSAYTYPECODE"].ToString().Substring(0, 2);
  2014. dr["ASSAYTYPECODE"] = dr["ASSAYTYPECODE"].ToString();
  2015. dr["工序名"] = analysPath(SetColumn, dr["ASSAYTYPECODE"].ToString());
  2016. dr["选择"] = true;
  2017. }
  2018. }
  2019. _dsSet.Tables.Add(dt);
  2020. frmSetSampling frm = new frmSetSampling();
  2021. frm._dsSet = _dsSet;
  2022. frm.ShowDialog();
  2023. if (frm._setFlag)
  2024. {
  2025. _dsSet = frm._dsSet;
  2026. _dsSet.AcceptChanges();
  2027. _dvRowFilter = "";
  2028. foreach (DataRow dr in _dsSet.Tables[0].Rows)
  2029. {
  2030. if (Convert.ToBoolean(dr["选择"]) == true)
  2031. {
  2032. _dvRowFilter += string.Format("or assaytypecode = '{0}' ", dr[0].ToString());
  2033. }
  2034. }
  2035. if (_dvRowFilter.Length > 0)
  2036. {
  2037. _dvRowFilter = _dvRowFilter.Substring(2, _dvRowFilter.Length - 2);
  2038. }
  2039. GetDataFromAll();
  2040. }
  2041. }
  2042. private void ExportExcel()
  2043. {
  2044. try
  2045. {
  2046. string StrfileName = System.Windows.Forms.Application.StartupPath + "\\Report\\成分明细.xls";
  2047. this.GridExcelExporter.Export(this.EMGrid, StrfileName);
  2048. ProcessStartInfo p = new ProcessStartInfo(StrfileName);
  2049. p.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
  2050. p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
  2051. Process.Start(p);
  2052. }
  2053. catch (Exception ex)
  2054. {
  2055. MessageBox.Show(ex.Message + "\n处理方法:查看(" + System.Windows.Forms.Application.StartupPath + ")目录下是否有[ Report文件夹 ],如果没有请手动创建!");
  2056. }
  2057. }
  2058. #endregion
  2059. private void HiddCeqColumn()
  2060. {
  2061. bool flag = false;
  2062. try
  2063. {
  2064. foreach (UltraGridColumn col in this.EMGrid.DisplayLayout.Bands[0].Columns)
  2065. {
  2066. flag = false;
  2067. if (!this.ceqChemList.Contains(col.Header.Caption.ToUpper()))
  2068. {
  2069. continue;
  2070. }
  2071. foreach (UltraGridRow ugr in this.EMGrid.Rows)
  2072. {
  2073. if (ugr.Cells[col.Header.Caption].Value.ToString().Length > 0)
  2074. {
  2075. flag = true;
  2076. break;
  2077. }
  2078. }
  2079. this.EMGrid.DisplayLayout.Bands[0].Columns[col.Header.Caption].Hidden = (flag) ? false : true;
  2080. }
  2081. }
  2082. catch
  2083. {
  2084. }
  2085. }
  2086. private void AddCeqToDataTable(ref DataTable dt)
  2087. {
  2088. Hashtable hsCeq = null;
  2089. Hashtable tb = null;
  2090. ClientParamWithSqlConditionAndOpenBase param = new ClientParamWithSqlConditionAndOpenBase();
  2091. param.ob = this.ob;
  2092. if (dt == null || dt.Rows.Count == 0)
  2093. return;
  2094. // 先获取所有的复合成分,减少后续扫描数据库的循环
  2095. DataSet dsChemCeqByHeatno =
  2096. Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.GetCeqChem(new ClientParamWithSqlConditionAndOpenBase(string.Format(" and ASSAYDATE >= '{0}' ", this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")), this.ob));
  2097. if (dsChemCeqByHeatno == null || dsChemCeqByHeatno.Tables[0].Rows.Count == 0)
  2098. return;
  2099. foreach (DataRow dr in dt.Rows)
  2100. {
  2101. // g根据炉号和化验时间过滤复合元素,唯一的
  2102. DataView dv = dsChemCeqByHeatno.Tables[0].DefaultView;
  2103. dv.RowFilter = string.Format("HEATNO = '{0}' and ASSAYDATE = '{1}'", dr["HEATNO"].ToString(), dr["ASSAYDATE"].ToString());
  2104. if (dv.Count == 0)
  2105. continue;
  2106. param.param = null;
  2107. param.param = new Object[] { dr["HEATNO"].ToString(), dr["ASSAYDATE"].ToString(),dv.ToTable() };
  2108. tb = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.ReturnCeqChemByHeatNoAndAssDate(param);
  2109. if (tb == null || tb.Count == 0)
  2110. continue;
  2111. // 获取该记录的复合成分列表
  2112. hsCeq = tb[dr["HEATNO"].ToString() + dr["ASSAYDATE"].ToString()] as Hashtable;
  2113. if (hsCeq != null && hsCeq.Count > 0)
  2114. {
  2115. foreach (string s in hsCeq.Keys)
  2116. {
  2117. // 表没有复合成分名称,新增
  2118. if (!dt.Columns.Contains(s))
  2119. {
  2120. dt.Columns.Add(new DataColumn(s, System.Type.GetType("System.String")));
  2121. }
  2122. try
  2123. {
  2124. // 同步新增显示数据的表结构
  2125. if (!this.dataTable1.Columns.Contains(s))
  2126. {
  2127. this.dataTable1.Columns.Add(new DataColumn(s, System.Type.GetType("System.String")));
  2128. }
  2129. }
  2130. catch
  2131. {
  2132. }
  2133. // 赋值
  2134. dr[s] = hsCeq[s].ToString();
  2135. }
  2136. }
  2137. }
  2138. }
  2139. #region " 直接打开界面 或 查询 "
  2140. public void GetDataFromAll()
  2141. {
  2142. List<TBB01_SEQ_INGR> listIngr = null;
  2143. try
  2144. {
  2145. listIngr = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.GetTbb01SeqIngrAll(new ClientParamWithSqlConditionAndOpenBase("",this.ob));
  2146. }
  2147. catch
  2148. {
  2149. }
  2150. string strFindName = "";
  2151. for (int i = 0; i < strERow.Length; i++)
  2152. {
  2153. if (!string.IsNullOrEmpty(strERow[i]))
  2154. strFindName = strFindName + "," + strERow[i];
  2155. }
  2156. try
  2157. {
  2158. if (Convert.ToDateTime(uldtEndTime.Value) < Convert.ToDateTime(uldtBeginTime.Value))
  2159. {
  2160. MessageBox.Show("结束时间必须大于等于开始时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2161. return;
  2162. }
  2163. GetPost();
  2164. GetDuty();
  2165. if (this.ultraMaskedEdit1.Text.Trim().Length > 0 || this.ultraMaskedEdit2.Text.Trim().Length > 0)
  2166. BuildSQLWithID();
  2167. else
  2168. BuildSQLWithOutID();
  2169. _dsAll = new DataSet();
  2170. //定义一个ArrayList集合存储变量[参数]值
  2171. ArrayList arry = new ArrayList();
  2172. ArrayList sqlList = new ArrayList();
  2173. if (Isbool)
  2174. {
  2175. arry.Add("FrmHMPElements_Query.select");
  2176. }
  2177. else
  2178. {
  2179. arry.Add("FrmLgElements_Query.select");
  2180. }
  2181. sqlList.Add(strFindName);
  2182. //sqlList.Add(_strWhere1);
  2183. //sqlList.Add(_strWhere1);
  2184. sqlList.Add(_szTableName);//表名
  2185. sqlList.Add("J#" + _szTableName);//表名
  2186. sqlList.Add("and ASSAYDATE between to_date('" + this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
  2187. + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
  2188. + "','yyyy-mm-dd hh24:mi:ss')");//时间
  2189. sqlList.Add("and ASSAYDATE between to_date('" + this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
  2190. + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
  2191. + "','yyyy-mm-dd hh24:mi:ss')");
  2192. sqlList.Add(_strWhere2);
  2193. //调用服务端方法
  2194. CoreClientParam CCP_LgEts = new CoreClientParam();
  2195. DataTable dt = new DataTable();
  2196. CCP_LgEts.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
  2197. CCP_LgEts.MethodName = "doQuery";
  2198. CCP_LgEts.ServerParams = new object[] { arry, sqlList };
  2199. CCP_LgEts.SourceDataTable = dt;
  2200. this.ExecuteQueryToDataTable(CCP_LgEts, CoreInvokeType.Internal);
  2201. DataTable dtTemp = dt.Copy();
  2202. //获取炉号
  2203. dtSamplesignal = this.ObtainSamplesignal(dtTemp);
  2204. // 增加复合元素
  2205. try
  2206. {
  2207. AddCeqToDataTable(ref dt);
  2208. }
  2209. catch
  2210. {
  2211. dt = dtTemp;
  2212. }
  2213. _dsAll.Tables.Add(dt);
  2214. _dsAll.Tables[0].DefaultView.RowFilter = _dvRowFilter;
  2215. DataRow[] row = _dsAll.Tables[0].Select(_dvRowFilter);
  2216. int currrow = row.Length;
  2217. if (currrow < 40)
  2218. {
  2219. this._intEnd = currrow;
  2220. }
  2221. else
  2222. { _intEnd = Convert.ToInt32(this.txtPage.Text.Trim()); }
  2223. // _intEnd = 4000;
  2224. SetDataToGrid();
  2225. }
  2226. catch (Exception ex)
  2227. {
  2228. Debug.WriteLine(ex.Message);
  2229. }
  2230. }
  2231. #endregion
  2232. #region " 从作业管理打开界面 "
  2233. public void GetDataFromCurr()
  2234. {
  2235. try
  2236. {
  2237. GetCurrDuty();
  2238. _dsAll = null;
  2239. //定义一个ArrayList集合存储变量[参数]值
  2240. ArrayList arry = new ArrayList();
  2241. arry.Add("frmSysteLog.select");
  2242. //调用服务端方法
  2243. CoreClientParam CCP_SysLog = new CoreClientParam();
  2244. DataTable dt = new DataTable();
  2245. CCP_SysLog.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
  2246. CCP_SysLog.MethodName = "doSimpleQuery";
  2247. CCP_SysLog.ServerParams = new object[] { arry };
  2248. CCP_SysLog.SourceDataTable = dt;
  2249. this.ExecuteQueryToDataTable(CCP_SysLog, CoreInvokeType.Internal);
  2250. _dsAll.Tables[0].DefaultView.RowFilter = _dvRowFilter;
  2251. SetPost();
  2252. SetDuty();
  2253. SetDataToGrid();
  2254. }
  2255. catch { }
  2256. }
  2257. private void GetCurrDuty()
  2258. {
  2259. try
  2260. {
  2261. string strErr = "";
  2262. string strDuty = "";
  2263. ArrayList arry = new ArrayList();
  2264. arry.Add("GetClassCode.query");
  2265. CommonClientToServer cctos = new CommonClientToServer();
  2266. cctos.ob = this.ob;
  2267. DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  2268. "doSimpleQuery", arry, out strErr);
  2269. strDuty = ds.Tables[0].Rows[0]["mes"].ToString();
  2270. _strDuty = strDuty.Substring(1, 1);
  2271. return;
  2272. }
  2273. catch { }
  2274. _strDuty = "0";
  2275. }
  2276. #endregion
  2277. #region " SQL "
  2278. private void BuildSQLWithOutID()
  2279. {
  2280. string begTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2281. string endTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2282. string strStartTime = "";
  2283. string strEndTime = "";
  2284. if (Convert.ToDateTime(uldtBeginTime.Text.Trim()) > Convert.ToDateTime(uldtEndTime.Text.Trim()))
  2285. {
  2286. MessageBox.Show("选择的开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2287. return;
  2288. }
  2289. else
  2290. {
  2291. strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2292. strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2293. }
  2294. if (_devPos.Substring(0, 3) == "HMP" || _devPos.Substring(0, 4) == "SYGW")// 铁水 或者 所有岗位
  2295. {
  2296. _strWhere2 = " where a.hudwid = b.heatno and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH:mm:ss') between '" + strStartTime + "' and '" + strEndTime + "' ";
  2297. Isbool = true;
  2298. }
  2299. else
  2300. {
  2301. _strWhere2 = " where b.HEATNO = a.HEATNO and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH:mm:ss') between '" + strStartTime + "' and '" + strEndTime + "' ";
  2302. Isbool = false;
  2303. }
  2304. string str = this._devPos.Substring(0, 3), szWZ = this._devPos.Substring(3, 2);
  2305. if (this._strDuty != "0" && str != "HMP")
  2306. _strWhere2 += string.Format(" and substr(a.SHIFTCODE,2,1) = '{0}' ", this._strDuty);
  2307. if (str != "HMP" && szWZ != "00" && str != "SYG")
  2308. _strWhere2 += string.Format(" and a.stationcode = '{0}'", szWZ);
  2309. if (txtSteel.Text.Trim() != "")
  2310. str = txtSteel.Text.ToString();
  2311. else
  2312. str = "";
  2313. if (str != "")
  2314. {
  2315. string strSteeAll = "";
  2316. string[] strSteel = str.Split(',');
  2317. for (int i = 0; i < strSteel.Length; i++)
  2318. {
  2319. if (!string.IsNullOrEmpty(strSteel[i]))
  2320. strSteeAll = strSteeAll + "'" + strSteel[i] + "',";
  2321. }
  2322. str = strSteeAll.Substring(0, strSteeAll.Length - 1);
  2323. _strWhere2 += string.Format(" and a.plansteel in ({0})", str);
  2324. }
  2325. //气体样
  2326. if (chkGasSample.Checked)
  2327. {
  2328. _strWhere2 += " and (N>0 or H>0 or O>0) ";
  2329. }
  2330. }
  2331. private void BuildSQLWithID()
  2332. {
  2333. string begTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2334. string endTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2335. string strStartTime = "";
  2336. string strEndTime = "";
  2337. if (Convert.ToDateTime(uldtBeginTime.Text.Trim()) > Convert.ToDateTime(uldtEndTime.Text.Trim()))
  2338. {
  2339. MessageBox.Show("选择的开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2340. return;
  2341. }
  2342. else
  2343. {
  2344. strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2345. strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
  2346. }
  2347. //熔炼号从
  2348. if (this.ultraMaskedEdit1.Text.Length == 0)
  2349. {
  2350. _strWhere2 = String.Format(" where a.HEATNO like '%{0}%' ", this.ultraMaskedEdit2.Text.Trim());
  2351. }
  2352. else
  2353. {
  2354. if (this.ultraMaskedEdit2.Text.Length == 0)
  2355. {
  2356. _strWhere2 = String.Format(" where a.HEATNO like '%{0}%' ", this.ultraMaskedEdit1.Text.Trim());
  2357. }
  2358. else
  2359. {
  2360. _strWhere2 = String.Format(" where a.HEATNO between '{0}' and '{1}' ", this.ultraMaskedEdit1.Text.Trim(), this.ultraMaskedEdit2.Text.Trim());
  2361. }
  2362. }
  2363. if (_devPos.Substring(0, 3) == "HMP" || _devPos.Substring(0, 4) == "SYGW")
  2364. {
  2365. _strWhere2 += " ";
  2366. Isbool = true;
  2367. }
  2368. else
  2369. {
  2370. Isbool = false;
  2371. _strWhere2 += " and b.HEATNO = a.HEATNO and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH:mm:ss') between '" + strStartTime + "' and '" + strEndTime + "'";
  2372. }
  2373. string str = this._devPos.Substring(0, 3), szWZ = this._devPos.Substring(4, 1);
  2374. if (this._strDuty != "0" && str != "HMP")
  2375. _strWhere2 += string.Format(" and substr(a.SHIFTCODE,2,1) = '{0}' ", this._strDuty);
  2376. if (txtSteel.Text.Trim() != "")
  2377. str = txtSteel.Text.ToString();
  2378. else
  2379. str = "";
  2380. if (str != "")
  2381. {
  2382. string strSteeAll = "";
  2383. string[] strSteel = str.Split(',');
  2384. for (int i = 0; i < strSteel.Length; i++)
  2385. {
  2386. if (!string.IsNullOrEmpty(strSteel[i]))
  2387. strSteeAll = strSteeAll + "'" + strSteel[i] + "',";
  2388. }
  2389. str = strSteeAll.Substring(0, strSteeAll.Length - 1);
  2390. _strWhere2 += string.Format(" and a.plansteel in ({0})", str);
  2391. }
  2392. //气体样
  2393. if (chkGasSample.Checked)
  2394. {
  2395. _strWhere2 += " and (N>0 or H>0 or O>0) ";
  2396. }
  2397. }
  2398. #endregion
  2399. #region " ComboBox Event "
  2400. private object[] GetComboBox2Items(int index)
  2401. {
  2402. switch (index)
  2403. {
  2404. case 1:
  2405. return new object[] { "所有", "1#转炉", "2#转炉", "3#转炉" };
  2406. case 2:
  2407. return new object[] { "所有", "1#吹氩站", "2#吹氩站", "3#吹氩站" };
  2408. case 3:
  2409. return new object[] { "所有", "1#精炼炉", "2#精炼炉" };
  2410. case 4:
  2411. return new object[] { "所有", "1#RH炉" };
  2412. case 5:
  2413. return new object[] { "所有", "1#连铸", "2#连铸", "3#连铸", "4#连铸" };
  2414. default:
  2415. return new object[] { "所有铁水" };
  2416. }
  2417. }
  2418. #endregion
  2419. #region " Common Event "
  2420. private Color SetRowBackColor(UltraGridRow ugr, Color frc, bool ifSame)
  2421. {
  2422. Color c;
  2423. if (ifSame)
  2424. {
  2425. c = frc;
  2426. }
  2427. else
  2428. {
  2429. if (frc == c1)
  2430. c = c2;
  2431. else
  2432. c = c1;
  2433. }
  2434. ugr.Appearance.BackColor = c;
  2435. return c;
  2436. }
  2437. private void SetMaskText()
  2438. {
  2439. try
  2440. {
  2441. this.ultraMaskedEdit1.Text = "";
  2442. this.ultraMaskedEdit2.Text = "";
  2443. if (this._devPos.Substring(0, 3) == "BOF" || this._devPos.Substring(0, 3) == "CAS")
  2444. {
  2445. int count = _dsAll.Tables[0].Rows.Count;
  2446. if (count > 1)
  2447. {
  2448. this.ultraMaskedEdit1.Text = _dsAll.Tables[0].Rows[count - 1]["LH"].ToString();
  2449. this.ultraMaskedEdit2.Text = _dsAll.Tables[0].Rows[0]["LH"].ToString();
  2450. }
  2451. else if (count == 1)
  2452. {
  2453. this.ultraMaskedEdit1.Text = _dsAll.Tables[0].Rows[count - 1]["LH"].ToString();
  2454. }
  2455. }
  2456. }
  2457. catch { }
  2458. }
  2459. private void GetPost()
  2460. {
  2461. this._devPos = "";
  2462. switch (this.cboGW.SelectedIndex)
  2463. {
  2464. case 0:
  2465. this._devPos = "HMP0";
  2466. this._szTableName = "STL_HMP_OPTINFO";
  2467. break;
  2468. case 1:
  2469. this._devPos = "BOF0";
  2470. this._szTableName = "STL_BOF_OPTINFO";
  2471. break;
  2472. case 2:
  2473. this._devPos = "CAS0";
  2474. this._szTableName = "STL_CAS_OPTINFO";
  2475. break;
  2476. case 3:
  2477. this._devPos = "LFS0";
  2478. this._szTableName = "STL_LFS_OPTINFO";
  2479. break;
  2480. case 4:
  2481. this._devPos = "RHS0";
  2482. this._szTableName = "STL_RHS_OPTINFO";
  2483. break;
  2484. case 5:
  2485. this._devPos = "VDS0";
  2486. this._szTableName = "STL_VDS_OPTINFO";
  2487. break;
  2488. case 6:
  2489. this._devPos = "CCM0";
  2490. this._szTableName = "STL_CCM_OPTINFO";
  2491. break;
  2492. default:
  2493. this._devPos = "SYGW"; // 所有岗位
  2494. this._szTableName = "";
  2495. break;
  2496. }
  2497. this._devPos += this.comboBox2.Value.ToString();
  2498. }
  2499. private string GetTableName()
  2500. {
  2501. string szTableName = "";
  2502. switch (_devPos.Substring(0, 3))
  2503. {
  2504. case "HMP":
  2505. szTableName = "STL_HMP_OPTINFO";
  2506. break;
  2507. case "BOF":
  2508. szTableName = "STL_BOF_OPTINFO";
  2509. break;
  2510. case "CAS":
  2511. szTableName = "STL_CAS_OPTINFO";
  2512. break;
  2513. case "LFS":
  2514. szTableName = "STL_LFS_OPTINFO";
  2515. break;
  2516. case "CCM":
  2517. szTableName = "STL_CCM_OPTINFO";
  2518. break;
  2519. default:
  2520. break;
  2521. }
  2522. return szTableName;
  2523. }
  2524. /// <summary>
  2525. /// 设置设备选择框
  2526. /// </summary>
  2527. private void SetPost()
  2528. {
  2529. this._devPos = CurrectDevPos(this._devPos);
  2530. if (_devPos.Length < 5) return;
  2531. switch (_devPos.Substring(0, 3))
  2532. {
  2533. case "HMP":
  2534. this.cboGW.SelectedIndex = 0;
  2535. break;
  2536. case "BOF":
  2537. this.cboGW.SelectedIndex = 1;
  2538. break;
  2539. case "CAS":
  2540. this.cboGW.SelectedIndex = 2;
  2541. break;
  2542. case "LFS":
  2543. this.cboGW.SelectedIndex = 3;
  2544. break;
  2545. case "RHS":
  2546. this.cboGW.SelectedIndex = 4;
  2547. break;
  2548. case "CCM":
  2549. this.cboGW.SelectedIndex = 5;
  2550. break;
  2551. }
  2552. this.comboBox2.SelectedIndex = Convert.ToInt32(_devPos.Substring(4, 1));
  2553. }
  2554. private void GetDuty()
  2555. {
  2556. this._strDuty = this.cmb_BZ.SelectedIndex.ToString();
  2557. }
  2558. /// <summary>
  2559. /// 设置班组下拉框
  2560. /// </summary>
  2561. private void SetDuty()
  2562. {
  2563. try
  2564. {
  2565. this.cmb_BZ.SelectedIndex = Convert.ToInt32(this._strDuty);
  2566. }
  2567. catch { }
  2568. }
  2569. private string CurrectDevPos(string devPos)
  2570. {
  2571. if (devPos.Length < 5) return "";
  2572. if (devPos.Substring(0, 3) == "BOF")
  2573. {
  2574. switch (devPos.Substring(4, 1))
  2575. {
  2576. case "7":
  2577. devPos = devPos.Replace("7", "1");
  2578. break;
  2579. case "8":
  2580. devPos = devPos.Replace("8", "2");
  2581. break;
  2582. case "9":
  2583. devPos = devPos.Replace("9", "3");
  2584. break;
  2585. }
  2586. }
  2587. return devPos;
  2588. }
  2589. #endregion
  2590. #region " Auto Refresh "
  2591. private Thread _getDataThread;
  2592. private bool On_Off_GetDataThread = false;
  2593. private delegate void getDataFromAllDelegate();
  2594. private void StartGetDataThread()
  2595. {
  2596. try
  2597. {
  2598. ThreadStart ts = new ThreadStart(GetDataThread);
  2599. _getDataThread = new Thread(ts);
  2600. _getDataThread.Name = "GetDataThread ";
  2601. _getDataThread.Start();
  2602. }
  2603. catch { }
  2604. }
  2605. private void GetDataThread()
  2606. {
  2607. ReStartGetDataThread:
  2608. while (true)
  2609. {
  2610. if (!this.On_Off_Thread || !On_Off_GetDataThread)
  2611. {
  2612. System.Threading.Thread.Sleep(500);
  2613. continue;
  2614. }
  2615. try
  2616. {
  2617. this.Invoke(new getDataFromAllDelegate(GetDataFromAll));
  2618. System.Threading.Thread.Sleep(3000);
  2619. }
  2620. catch
  2621. { }
  2622. }
  2623. goto ReStartGetDataThread;
  2624. }
  2625. private void chkRefresh_CheckedChanged(object sender, EventArgs e)
  2626. {
  2627. On_Off_GetDataThread = this.chkRefresh.Checked;
  2628. }
  2629. #endregion
  2630. private int nRow = -1;
  2631. private Color c3 = Color.White;
  2632. private bool bColor = false;
  2633. private void EMGrid_Click(object sender, System.EventArgs e)
  2634. {
  2635. if (this.EMGrid.ActiveRow != null)
  2636. {
  2637. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow rw in this.EMGrid.Rows)
  2638. {
  2639. if (rw.Appearance.BackColor == Color.LightBlue)
  2640. rw.Appearance.BackColor = Color.White;
  2641. }
  2642. if (bColor)
  2643. {
  2644. if (nRow < EMGrid.Rows.Count)
  2645. this.EMGrid.Rows[nRow].Appearance.BackColor = c3;
  2646. }
  2647. else
  2648. {
  2649. bColor = true;
  2650. }
  2651. c3 = this.EMGrid.ActiveRow.Appearance.BackColor;
  2652. nRow = this.EMGrid.ActiveRow.Index;
  2653. this.EMGrid.ActiveRow.Appearance.BackColor = Color.LightBlue;
  2654. }
  2655. }
  2656. #endregion
  2657. private void cboGW_SelectionChanged(object sender, EventArgs e)
  2658. {
  2659. comboBox2.Items.Clear();
  2660. int index;
  2661. index = cboGW.SelectedIndex;
  2662. switch (index)
  2663. {
  2664. case 1:
  2665. comboBox2.Items.Add(0, "所有");
  2666. comboBox2.Items.Add(1, "1#转炉");
  2667. comboBox2.Items.Add(2, "2#转炉");
  2668. break;
  2669. case 2:
  2670. comboBox2.Items.Add(0, "所有");
  2671. comboBox2.Items.Add(1, "1#吹氩站");
  2672. comboBox2.Items.Add(2, "2#吹氩站");
  2673. break;
  2674. case 3:
  2675. comboBox2.Items.Add(0, "所有");
  2676. comboBox2.Items.Add(1, "1#精炼炉");
  2677. comboBox2.Items.Add(2, "2#精炼炉");
  2678. break;
  2679. case 4:
  2680. comboBox2.Items.Add(0, "所有");
  2681. comboBox2.Items.Add(1, "RH炉");
  2682. break;
  2683. case 5:
  2684. comboBox2.Items.Add(0, "所有");
  2685. comboBox2.Items.Add(1, "VD炉");
  2686. break;
  2687. case 6:
  2688. comboBox2.Items.Add(0, "所有");
  2689. comboBox2.Items.Add(1, "1#连铸");
  2690. comboBox2.Items.Add(2, "2#连铸");
  2691. comboBox2.Items.Add(3, "3#连铸");
  2692. break;
  2693. default:
  2694. comboBox2.Items.Add(0, "所有铁水");
  2695. break;
  2696. }
  2697. comboBox2.SelectedIndex = 0;
  2698. }
  2699. /// <summary>
  2700. /// 解析作业路线
  2701. /// </summary>
  2702. /// <param name="craftPath">路线代码</param>
  2703. /// <returns></returns>
  2704. public string analysPath(string craftPath, string strPath)
  2705. {
  2706. string path = "", strcPath = "";
  2707. strcPath = strPath;
  2708. try
  2709. {
  2710. string StationCode = craftPath.Substring(0, 2);
  2711. string strCS = "";
  2712. if (strPath.Length < 5)
  2713. {
  2714. strCS = strcPath.Substring(2, 2);
  2715. }
  2716. else if (strPath.Length > 5 && strcPath.Length < 7)
  2717. {
  2718. strCS = strcPath.Substring(2, 4);
  2719. }
  2720. else
  2721. strCS = strcPath.Substring(2, 3);
  2722. switch (StationCode)
  2723. {
  2724. case "B0":
  2725. path = "脱硫" + Convert.ToInt32(strCS) + "次样";
  2726. break;
  2727. case "B1":
  2728. path = "1#脱硫" + Convert.ToInt32(strCS) + "次样";
  2729. break;
  2730. case "B2":
  2731. path = "2#脱硫" + Convert.ToInt32(strCS) + "次样";
  2732. break;
  2733. case "C0":
  2734. path = "转炉" + Convert.ToInt32(strCS) + "次样";
  2735. break;
  2736. case "C1":
  2737. path = "1#转炉" + Convert.ToInt32(strCS) + "次样";
  2738. break;
  2739. case "C2":
  2740. path = "2#转炉" + Convert.ToInt32(strCS) + "次样";
  2741. break;
  2742. case "D0":
  2743. path = "吹氩" + Convert.ToInt32(strCS) + "次样";
  2744. break;
  2745. case "D1":
  2746. path = "1#吹氩" + Convert.ToInt32(strCS) + "次样";
  2747. break;
  2748. case "D2":
  2749. path = "2#吹氩" + Convert.ToInt32(strCS) + "次样";
  2750. break;
  2751. case "DQ":
  2752. path = "CAS前" + Convert.ToInt32(strCS) + "次样";
  2753. break;
  2754. case "DH":
  2755. path = "CAS后" + Convert.ToInt32(strCS) + "次样";
  2756. break;
  2757. case "E0":
  2758. path = "LF炉" + Convert.ToInt32(strCS) + "次样";
  2759. break;
  2760. case "E1":
  2761. path = "1#LF炉" + Convert.ToInt32(strCS) + "次样";
  2762. break;
  2763. case "E2":
  2764. path = "2#LF炉" + Convert.ToInt32(strCS) + "次样";
  2765. break;
  2766. case "F0":
  2767. path = "RH炉" + Convert.ToInt32(strCS) + "次样";
  2768. break;
  2769. case "F1":
  2770. path = "RH炉" + Convert.ToInt32(strCS) + "次样";
  2771. break;
  2772. case "I0":
  2773. path = "VD炉" + Convert.ToInt32(strCS) + "次样";
  2774. break;
  2775. case "I1":
  2776. path = "VD炉" + Convert.ToInt32(strCS) + "次样";
  2777. break;
  2778. case "GP":
  2779. path = "连铸" + Convert.ToInt32(strCS) + "次样"; ;
  2780. break;
  2781. }
  2782. }
  2783. catch
  2784. {
  2785. }
  2786. return path;
  2787. }
  2788. private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  2789. {
  2790. }
  2791. /// <summary>
  2792. /// </summary>
  2793. /// <param> </param>
  2794. /// <seealso cref="String">
  2795. /// 计算成份偏差主体</seealso>
  2796. ///
  2797. private void doInitChemelentDifference( string vHeatNo)
  2798. {
  2799. try
  2800. {
  2801. DataTable dt = this.dataTable1;
  2802. DataView dv = new DataView(dt);
  2803. dv.RowFilter = string.Format(" 熔炼号 = '{0}'", vHeatNo);
  2804. DataRow drTemp = null;
  2805. DataRow drSource = null;
  2806. DataRow dr = dt.NewRow();
  2807. if (dv != null && dv.Table.Rows.Count > 0)
  2808. {
  2809. dv.Sort = "化验时间 desc";
  2810. }
  2811. if (dv.ToTable().Rows[0]["Station"].ToString().Contains("连铸") && dv.ToTable().Rows.Count >= 2)
  2812. {
  2813. drSource = dv.ToTable().Rows[0];
  2814. drTemp = dv.ToTable().Rows[1];
  2815. if (drTemp["Station"].ToString().Contains("连铸") && dv.ToTable().Rows.Count >= 3)
  2816. {
  2817. drTemp = dv.ToTable().Rows[2];
  2818. }
  2819. }
  2820. else
  2821. return;
  2822. for (int i = 0; i < drSource.Table.Columns.Count; i++)
  2823. {
  2824. try
  2825. {
  2826. if (Convert.ToDouble(drSource[i].ToString()) > 0)
  2827. {
  2828. dr[i] = Math.Round(Convert.ToDouble(drSource[i].ToString()) - Convert.ToDouble(drTemp[i].ToString()), 4);
  2829. }
  2830. }
  2831. catch
  2832. {
  2833. dr[i] = drSource[i];
  2834. }
  2835. }
  2836. dr["Station"] = "成分偏差";
  2837. dr["SumTime"] = 1;
  2838. dr["shiftcode"] = drSource["shiftcode"];
  2839. //20150401
  2840. dr["CM"] = "";
  2841. dr["SAMPLE_DATE1"] = "";
  2842. System.DateTime dtime = Convert.ToDateTime(dr["化验时间"].ToString());
  2843. dtime.AddMinutes(1);
  2844. dr["化验时间"] = dtime.ToString();
  2845. dt.Rows.Add(dr);
  2846. dt.AcceptChanges();
  2847. }
  2848. catch(Exception ex)
  2849. {
  2850. }
  2851. }
  2852. /// <summary>
  2853. /// </summary>
  2854. /// <param> </param>
  2855. /// <seealso cref="String">
  2856. /// 获取带有连铸信息的所有炉号</seealso>
  2857. /// 返回list
  2858. private ArrayList getHeatNo()
  2859. {
  2860. ArrayList list = new ArrayList();
  2861. foreach (DataRow dr in dataTable1.Rows)
  2862. {
  2863. if (!list.Contains(dr["熔炼号"].ToString()) && dr["Station"].ToString().Contains("连铸"))
  2864. {
  2865. list.Add(dr["熔炼号"].ToString());
  2866. }
  2867. }
  2868. return list;
  2869. }
  2870. /// <summary>
  2871. /// </summary>
  2872. /// <param> </param>
  2873. /// <seealso cref="String">
  2874. /// 计算连铸工序和前道工序的成份偏差</seealso>
  2875. private void calculateChemelentDifference()
  2876. {
  2877. ArrayList list = this.getHeatNo();
  2878. foreach (string s in list)
  2879. {
  2880. this.doInitChemelentDifference(s);
  2881. }
  2882. DataTable tbTemp = new DataTable();
  2883. tbTemp.Merge(this.dataTable1);
  2884. DataView dv = new DataView(tbTemp);
  2885. dv.Sort = "熔炼号 desc,化验时间 asc";
  2886. this.dataTable1.Clear();
  2887. this.dataTable1.Merge(dv.ToTable());
  2888. }
  2889. private void button1_Click(object sender, EventArgs e)
  2890. {
  2891. }
  2892. private void button1_Click_1(object sender, EventArgs e)
  2893. {
  2894. try
  2895. {
  2896. ClientParamWithSqlConditionAndOpenBase param = new ClientParamWithSqlConditionAndOpenBase();
  2897. param.param = new object[] { this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss") , this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")};
  2898. param.ob = this.ob;
  2899. Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.Insert_StlChemelementCeq(param);
  2900. }
  2901. catch
  2902. { }
  2903. }
  2904. #region 20150401 新增送样时间,化验时间差
  2905. private DataSet ObtainSamplesignal(DataTable dtTemp)
  2906. {
  2907. List<string> heatNoList =removeDuplicate( GetColumnStringValueFromDataSourceByColumnName(dtTemp,"HEATNO"));
  2908. string sqlCondition = GetSqlConditionFromHeatNoList(heatNoList);
  2909. DataSet dt= MethodCallService(sqlCondition);
  2910. return dt;
  2911. }
  2912. public DataSet MethodCallService(string sqlCondition)
  2913. {
  2914. DataSet ds = new DataSet();
  2915. string strErr="";
  2916. string strSql = string.Format(@"select * from (select * from stl_air_samplesignal where {0} union all select * from J#stl_Air_Samplesignal where {0}) order by SAMPLE_DATE1", sqlCondition);
  2917. CommonClientToServer cctos = new CommonClientToServer();
  2918. cctos.ob = this.ob;
  2919. ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBExecute",
  2920. "doSimpleQuery", strSql, out strErr);
  2921. return ds;
  2922. }
  2923. public List<String> GetColumnStringValueFromDataSourceByColumnName(DataTable dsSource, string columnName)
  2924. {
  2925. List<String> list = new List<string>();
  2926. if (dsSource == null || dsSource.Rows.Count == 0 || columnName.Length == 0)
  2927. return list;
  2928. if (!dsSource.Columns.Contains(columnName.ToUpper()))
  2929. return list;
  2930. try
  2931. {
  2932. foreach (DataRow dr in dsSource.Rows)
  2933. {
  2934. try
  2935. {
  2936. list.Add(dr[columnName.ToUpper()].ToString());
  2937. }
  2938. catch
  2939. {
  2940. break;
  2941. }
  2942. }
  2943. }
  2944. catch
  2945. {
  2946. }
  2947. return list;
  2948. }
  2949. private List<string> removeDuplicate(List<string> lists)
  2950. {
  2951. for (int i = 0; i < lists.Count; i++)
  2952. {
  2953. for (int j = lists.Count - 1; j >= 0; j--)
  2954. {
  2955. if (i != j)
  2956. {
  2957. if (lists[i] == lists[j])
  2958. {
  2959. lists.Remove(lists[j]);
  2960. }
  2961. }
  2962. }
  2963. }
  2964. return lists;
  2965. }
  2966. /// <summary>
  2967. /// 拼接查询条件
  2968. /// </summary>
  2969. /// <param name="heatNoList"></param>
  2970. /// <returns></returns>
  2971. private string GetSqlConditionFromHeatNoList(List<string> heatNoList)
  2972. {
  2973. string strSqlHeatno = "";
  2974. string strsqlwhere = "";
  2975. string strsql = "";
  2976. foreach (string heatno in heatNoList)
  2977. {
  2978. strSqlHeatno = "heatno = '" + heatno + "' or ";
  2979. strsqlwhere += strSqlHeatno;
  2980. }
  2981. strsql = strsqlwhere +" 1 = 2";
  2982. return strsql;
  2983. }
  2984. public int Count(DataSet ds)
  2985. {
  2986. try
  2987. {
  2988. return ds.Tables[0].Rows.Count;
  2989. }
  2990. catch
  2991. {
  2992. }
  2993. return 0;
  2994. }
  2995. /// <summary>
  2996. /// 根据岗位号获取工序中文名
  2997. /// </summary>
  2998. /// <param name="_DEVICE_POSITION">岗位编码</param>
  2999. /// <returns>工序中文名</returns>
  3000. public string analysChineseName(string _DEVICE_POSITION)
  3001. {
  3002. string strChineseName = ""; //工序代码
  3003. if (!string.IsNullOrEmpty(_DEVICE_POSITION))
  3004. {
  3005. switch (_DEVICE_POSITION.Substring(0, 3))
  3006. {
  3007. case "HMP":
  3008. strChineseName = "脱硫站";
  3009. break;
  3010. case "BOF":
  3011. strChineseName = "转炉";
  3012. break;
  3013. case "CAS":
  3014. strChineseName = "吹氩站";
  3015. break;
  3016. case "LFS":
  3017. strChineseName = "LF炉";
  3018. break;
  3019. case "RHS":
  3020. strChineseName = "RH炉";
  3021. break;
  3022. case "VDS":
  3023. strChineseName = "VD炉";
  3024. break;
  3025. case "CCM":
  3026. strChineseName = "连铸";
  3027. break;
  3028. default:
  3029. break;
  3030. }
  3031. }
  3032. return strChineseName;
  3033. }
  3034. DataSet dtSamplesignal = null;
  3035. #endregion
  3036. }
  3037. }