frmLgElements2.cs 139 KB

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