frmMixmIron.cs 145 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. //using Core.LgMes.Client.LgResMgt;
  9. using System.Threading;
  10. using Core.LgMes.Client.lgClassModel;
  11. using System.Collections;
  12. using System.Reflection;
  13. using CoreFS.CA06;
  14. namespace Core.LgMes.Client.lgJobMgt
  15. {
  16. public partial class frmMixmIron : CoreFS.CA06.FrmBase
  17. {
  18. private Thread _getDataThread; // 取数据线程
  19. private bool _bIfGetData = true; // 控制取数据线程循环的标志
  20. private string[] ArrayIronRow = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存铁运进铁数据
  21. private string[] ArrayIronRow2 = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存混铁炉进铁数据
  22. private string[] ArrayIronRow3 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存混铁炉出铁数据
  23. private string[] ArrayIronRow4 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存发送到转炉铁水数据
  24. private string _strSendSucceededForBof1 = "";
  25. private string _strSendSucceededForBof2 = "";
  26. private string _strSendSucceededForBof3 = "";
  27. private string _strSendSucceededForHmp1 = "";
  28. private string _strSendSucceededForHmp2 = "";
  29. private string _strHmp1No = "";
  30. private string _strHmp2No = "";
  31. private bool blModify = false;
  32. #region formload
  33. public frmMixmIron()
  34. {
  35. InitializeComponent();
  36. CheckForIllegalCrossThreadCalls = false;
  37. }
  38. private void frmMixmIron_Load(object sender, EventArgs e)
  39. {
  40. try
  41. {
  42. User = this.UserInfo.GetUserName();//操作人;
  43. lblTyjt.Text = "T" + this.Text.Substring(0, 1);
  44. lblHtjt.Text = "J" + this.Text.Substring(0, 1);
  45. lblHtct.Text = "C" + this.Text.Substring(0, 1);
  46. SetUserControlDelegate();
  47. ultraDataSource1.Rows.Add(new object[] { "", "", "", "", "", "", "", "", null });
  48. timer1_Tick(null, new EventArgs());
  49. this.timer1.Start();
  50. GetInIronData();
  51. StartUpThread();
  52. setbutton("1");
  53. setucInIron("1");
  54. SetColumnModeShift(ucInIron1.ultraGrid1);
  55. SetColumnModeGroup(ucInIron1.ultraGrid1);
  56. SetColumnModequxiang();
  57. setucHtInIron("1");
  58. setbutton2("1");
  59. SetColumnModeShift(ucHtInIron1.ultraGrid1);
  60. SetColumnModeGroup(ucHtInIron1.ultraGrid1);
  61. GetHtInIronData();
  62. ultHtInIronGrid_AfterRowActivate(null, null);
  63. setucHtInIron3("1");
  64. setbutton3("1");
  65. SetColumnModeShift(ucHtOutIron1.ultraGrid1);
  66. SetColumnModeGroup(ucHtOutIron1.ultraGrid1);
  67. SetColumnModeOutquxiang();
  68. GetHtOutIronData();
  69. ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Hidden = true;
  70. GetElementData();
  71. }
  72. catch
  73. { }
  74. }
  75. #endregion
  76. #region Thread Handle
  77. /// <summary>
  78. /// 启动线程主程序
  79. /// </summary>
  80. private void StartUpThread()
  81. {
  82. ThreadStart ts = new ThreadStart(GetDataThread);
  83. _getDataThread = new Thread(ts);
  84. _getDataThread.Name = "GetDataThread ";
  85. _getDataThread.Start();
  86. }
  87. private string User ="";
  88. /// <summary>
  89. /// 取数据线程程序
  90. /// </summary>
  91. private void GetDataThread()
  92. {
  93. while (_bIfGetData)
  94. {
  95. if (!this.On_Off_Thread)//this.On_Off_Thread
  96. {
  97. System.Threading.Thread.Sleep(5000);
  98. continue;
  99. }
  100. try
  101. {
  102. //GetInIronData();
  103. GetRealData();
  104. GetCVTHeatno();
  105. Thread.Sleep(10000);
  106. }
  107. catch { }
  108. }
  109. }
  110. #endregion
  111. #region dataevent
  112. private void GetRealData()
  113. {
  114. if (this.Text == "") return;
  115. string Wsid = this.Text.Substring(0, 1);
  116. string strwhere = "where wsid ='" + Wsid + "'";
  117. string err = "";
  118. try
  119. {
  120. //hengxing
  121. //CallingMessage par = new CallingMessage();
  122. //par.ServerName = "lgJobMgt";
  123. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  124. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  125. //par.MethodName = "GetRealData";
  126. //par.args = new object[] { strwhere };
  127. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  128. ultraDataSource1.Rows.Clear();
  129. if (ds.Tables.Count > 0)
  130. {
  131. foreach (DataRow dr in ds.Tables[0].Rows)
  132. {
  133. ultraDataSource1.Rows.Add(new object[] {
  134. dr["IRONWGT"].ToString(),
  135. dr["GASSTRESS"].ToString(),
  136. dr["IMPORTIRONTOTAL"].ToString(),
  137. dr["EXPORTIRONTOTAL"].ToString(),
  138. dr["SKIPIRONTOTAL"].ToString(),
  139. dr["IRONTEMPERATURE"].ToString(),
  140. dr["GASFLUX"].ToString(),
  141. dr["GASCONSUME"].ToString(),
  142. dr["UPDATETIME"].ToString()
  143. });
  144. }
  145. }
  146. }
  147. catch (Exception ex)
  148. {
  149. Console.WriteLine(ex.Message);
  150. }
  151. }
  152. /// <summary>
  153. /// 混铁炉进铁数据 utrHtInIronGrid
  154. ///
  155. /// </summary>
  156. private void GetHtInIronData()
  157. {
  158. string err = "";
  159. string htWhere = "";
  160. string Wsid = this.Text.Substring(0, 1);
  161. htWhere = " where to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') and WSID='" + Wsid + "'";
  162. try
  163. {
  164. //hengxing
  165. //CallingMessage par = new CallingMessage();
  166. //par.ServerName = "lgJobMgt";
  167. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  168. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  169. //par.MethodName = "SelectHtInIronData";
  170. //par.args = new object[] { htWhere };
  171. //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  172. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  173. ultraDataSource3.Rows.Clear();
  174. if (ds.Tables.Count > 0)
  175. {
  176. foreach (DataRow dr in ds.Tables[0].Rows)
  177. {
  178. ultraDataSource3.Rows.Add(new object[] {
  179. dr["MISID"].ToString(),
  180. dr["MOLIRNSOURCE"].ToString(),
  181. dr["STOVEID"].ToString(),
  182. dr["TFPOTID"].ToString(),
  183. dr["TFPOTGROSSWGT"].ToString(),
  184. dr["TFPOTTAREWGT"].ToString(),
  185. dr["TFPOTWGT"].ToString(),
  186. dr["C"].ToString(),
  187. dr["SI"].ToString(),
  188. dr["MN"].ToString(),
  189. dr["P"].ToString(),
  190. dr["S"].ToString(),
  191. dr["ASN"].ToString(),
  192. dr["IRONTEMPERATURE"].ToString(),
  193. dr["ARRIVETIME"].ToString(),
  194. ConvertShift("1",dr["SHIFTCODE"].ToString()),
  195. ConvertShift("2",dr["SHIFTCODE"].ToString()),
  196. dr["Memo"].ToString()
  197. });
  198. }
  199. }
  200. }
  201. catch (Exception ex)
  202. {
  203. Console.WriteLine(ex.Message);
  204. }
  205. }
  206. /// <summary>
  207. /// 铁运进铁数据 ultraGrid2
  208. /// </summary>
  209. private void GetInIronData()
  210. {
  211. string err = "";
  212. string htWhere = "";
  213. htWhere = " where to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS')";
  214. try
  215. {
  216. //hengxing
  217. //CallingMessage par = new CallingMessage();
  218. //par.ServerName = "lgJobMgt";
  219. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  220. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  221. //par.MethodName = "SelectInIronData";
  222. //par.args = new object[] { htWhere };
  223. //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  224. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  225. ultraDataSource2.Rows.Clear();
  226. if (ds.Tables.Count > 0)
  227. {
  228. foreach (DataRow dr in ds.Tables[0].Rows)
  229. {
  230. ultraDataSource2.Rows.Add(new object[] {
  231. dr["MISID"].ToString(),
  232. dr["MOLIRNSOURCE"].ToString(),
  233. dr["STOVEID"].ToString(),
  234. dr["TFPOTID"].ToString(),
  235. dr["TFPOTGROSSWGT"].ToString(),
  236. dr["TFPOTTAREWGT"].ToString(),
  237. dr["TFPOTWGT"].ToString(),
  238. dr["C"].ToString(),
  239. dr["SI"].ToString(),
  240. dr["MN"].ToString(),
  241. dr["P"].ToString(),
  242. dr["S"].ToString(),
  243. dr["ASN"].ToString(),
  244. dr["IRONTEMPERATURE"].ToString(),
  245. dr["ARRIVETIME"].ToString(),
  246. ConvertShift("1",dr["SHIFTCODE"].ToString()),
  247. ConvertShift("2",dr["SHIFTCODE"].ToString())
  248. });
  249. }
  250. }
  251. }
  252. catch
  253. { }
  254. }
  255. /// <summary>
  256. /// 获取出铁详细列表
  257. /// </summary>
  258. private void GetHtOutIronData()
  259. {
  260. string err = "";
  261. string htWhere = "";
  262. string Wsid = this.Text.Substring(0, 1);
  263. htWhere = " where to_char(TAPHOLESTARTTIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') and WSID='" + Wsid + "'";
  264. try
  265. {
  266. //hengxing
  267. //CallingMessage par = new CallingMessage();
  268. //par.ServerName = "lgJobMgt";
  269. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  270. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  271. //par.MethodName = "SelectHtOutIronData";
  272. //par.args = new object[] { htWhere };
  273. //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  274. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  275. ultraDataSource4.Rows.Clear();
  276. if (ds.Tables.Count > 0)
  277. {
  278. foreach (DataRow dr in ds.Tables[0].Rows)
  279. {
  280. ultraDataSource4.Rows.Add(new object[] {
  281. dr["MISID"].ToString(),
  282. dr["MOLIRNLEAVE"].ToString(),
  283. dr["IRONWRAPID"].ToString(),
  284. dr["IRONPOTTAREWGT"].ToString(),
  285. dr["IRONPOTGROSSWGT"].ToString(),
  286. dr["IRONPOTWGT"].ToString(),
  287. dr["C"].ToString(),
  288. dr["SI"].ToString(),
  289. dr["MN"].ToString(),
  290. dr["P"].ToString(),
  291. dr["S"].ToString(),
  292. dr["ASN"].ToString(),
  293. dr["IRONTEMPERATURE"].ToString(),
  294. dr["TAPHOLESTARTTIME"].ToString(),
  295. ConvertShift("1",dr["SHIFTCODE"].ToString()),
  296. ConvertShift("2",dr["SHIFTCODE"].ToString()),
  297. dr["IRONEXPORTTYPE"].ToString(),
  298. dr["SMELTINGIDOFCVT"].ToString(),
  299. dr["WEIGHTOFCVT"].ToString(),
  300. dr["IRONWRAPAGE"].ToString(),
  301. dr["CHECKNO"].ToString()
  302. });
  303. }
  304. }
  305. }
  306. catch (Exception ex)
  307. {
  308. Console.WriteLine(ex.Message);
  309. }
  310. }
  311. private void GetElementData()
  312. {
  313. string err = "";
  314. string htWhere = "";
  315. string Wsid = this.Text.Substring(0, 1);
  316. htWhere = " where STATIONCODE='M0" + Wsid + "'";
  317. try
  318. {
  319. //hengxing
  320. //CallingMessage par = new CallingMessage();
  321. //par.ServerName = "lgJobMgt";
  322. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  323. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  324. //par.MethodName = "SelectHtElementData";
  325. //par.args = new object[] { htWhere };
  326. //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  327. DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  328. ultraDataSource5.Rows.Clear();
  329. if (ds.Tables.Count > 0)
  330. {
  331. foreach (DataRow dr in ds.Tables[0].Rows)
  332. {
  333. ultraDataSource5.Rows.Add(new object[] {
  334. dr["STATIONCODE"].ToString(),
  335. dr["C"].ToString(),
  336. dr["SI"].ToString(),
  337. dr["MN"].ToString(),
  338. dr["P"].ToString(),
  339. dr["S"].ToString(),
  340. dr["ASN"].ToString(),
  341. dr["NI"].ToString(),
  342. dr["CU"].ToString(),
  343. dr["SN"].ToString(),
  344. dr["SB"].ToString(),
  345. dr["CHECKNO"].ToString()
  346. });
  347. }
  348. }
  349. }
  350. catch (Exception ex)
  351. {
  352. Console.WriteLine(ex.Message);
  353. }
  354. }
  355. private void RefreshHighheatNo()
  356. {
  357. string sqlstr = "";
  358. int nFurnaceNo = 0;
  359. try
  360. {
  361. if (this.rdoFNo1.Checked) nFurnaceNo = 1;
  362. if (this.rdoFNo2.Checked) nFurnaceNo = 2;
  363. if (this.rdoFNo3.Checked) nFurnaceNo = 3;
  364. if (this.rdoFNo4.Checked) nFurnaceNo = 4;
  365. if (this.rdoFNo5.Checked) nFurnaceNo = 5;
  366. if (this.rdoFNo6.Checked) nFurnaceNo = 6;
  367. if (this.rdoFNo7.Checked) nFurnaceNo = 7;
  368. if (this.rdoFNo8.Checked) nFurnaceNo = 8;
  369. if (this.rdoFNo9.Checked) nFurnaceNo = 9;
  370. if (this.radioButton1.Checked) nFurnaceNo = 0;
  371. if (nFurnaceNo > 0)
  372. {
  373. sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
  374. + " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
  375. + " from ( select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
  376. + " from job_chemelement "
  377. + " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
  378. + " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
  379. + " to_char(sysdate, 'YYYYMMDDHH24MISS') "
  380. + " and Assaytypecode like '%%A%%' and substr(checkno,1,1)='" + nFurnaceNo + "'"
  381. + " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
  382. + " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
  383. }
  384. else
  385. {
  386. sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
  387. + " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
  388. + " from (select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
  389. + " from job_chemelement "
  390. + " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
  391. + " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
  392. + " to_char(sysdate, 'YYYYMMDDHH24MISS') "
  393. + " and Assaytypecode like '%%A%%' "
  394. + " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
  395. + " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
  396. }
  397. string htOut = "", htWhere = "";
  398. //hengxing
  399. //CallingMessage par = new CallingMessage();
  400. //par.ServerName = "lgJobMgt";
  401. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  402. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
  403. //par.MethodName = "GetHighHeatNo";
  404. //par.args = new object[] { sqlstr, htWhere };
  405. object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod(par, out htOut);
  406. if (htOut == "" && obj != null)
  407. {
  408. DataTable furnaceDs = ((DataSet)obj).Tables[0];
  409. ultraGrid1.DataSource = furnaceDs;
  410. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "高炉号/批次";
  411. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 60;
  412. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  413. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "C";
  414. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 50;
  415. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.Caption = "Si";
  416. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Width = 50;
  417. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Header.Caption = "Mn";
  418. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Width = 50;
  419. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Header.Caption = "P";
  420. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Width = 50;
  421. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Header.Caption = "S";
  422. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Width = 50;
  423. this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Header.Caption = "As";
  424. this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Width = 50;
  425. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Header.Caption = "化验时间";
  426. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Width = 60;
  427. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  428. this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Format = "dd HH:mm";
  429. this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].Hidden = true;
  430. this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Header.Caption = "铁罐号";
  431. this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Width = 60;
  432. this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Header.Caption = "铁水总重";
  433. this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Width = 60;
  434. this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Header.Caption = "铁罐皮重";
  435. this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Width = 60;
  436. this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Header.Caption = "铁水净重";
  437. this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Width = 60;
  438. this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Header.Caption = "出铁时间";
  439. this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Width = 60;
  440. }
  441. }
  442. catch { return; }
  443. }
  444. private void SaveIronData()
  445. {
  446. GetGridData();
  447. string strError = "";
  448. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpTest", new object[] { ArrayIronRow }, out strError);
  449. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateIronData", new object[] { ArrayIronRow }, out strError);
  450. if (strError == "")
  451. MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  452. else
  453. MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  454. }
  455. private void InsertData()
  456. {
  457. GetGridData();
  458. if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动")
  459. {
  460. string strError = "";
  461. string[] strGLGH = ArrayIronRow[5].Split(',');
  462. bool blErr = false;
  463. for (int i = 0; i < strGLGH.Length; i++)
  464. {
  465. ArrayIronRow[5] = strGLGH[i];
  466. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertIronData", new object[] { ArrayIronRow }, out strError);
  467. if (strError == "") blErr = true;
  468. }
  469. if (blErr == false)
  470. MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  471. }
  472. else
  473. {
  474. string strError = "";
  475. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateIronData", new object[] { ArrayIronRow }, out strError);
  476. if (strError == "")
  477. {
  478. //MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  479. }
  480. else
  481. MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  482. }
  483. }
  484. private void InsertData2()
  485. {
  486. GetGridData2();
  487. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动")
  488. {
  489. string strError = "";
  490. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertHtIronData", new object[] { ArrayIronRow2 }, out strError);
  491. if (strError != "")
  492. MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  493. }
  494. else
  495. {
  496. string strError = "";
  497. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateHtInIronData", new object[] { ArrayIronRow2 }, out strError);
  498. if (strError != "")
  499. MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  500. }
  501. }
  502. /// <summary>
  503. /// 插入出铁记录
  504. /// </summary>
  505. /// <param name="sender"></param>
  506. /// <param name="e"></param>
  507. private void InsertData3()
  508. {
  509. GetGridData3();
  510. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动")
  511. {
  512. string strError = "";
  513. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertHtOutIronData", new object[] { ArrayIronRow3 }, out strError);
  514. if (strError == "")
  515. {
  516. //MessageBox.Show("插入记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  517. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
  518. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
  519. }
  520. else
  521. MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  522. }
  523. else
  524. {
  525. string strError = "";
  526. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateHtOutIronData", new object[] { ArrayIronRow3 }, out strError);
  527. if (strError == "")
  528. {
  529. //MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  530. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
  531. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
  532. }
  533. else
  534. MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  535. }
  536. }
  537. /// <summary>
  538. /// 获取冶炼炉号
  539. /// </summary>
  540. /// <param name="sender"></param>
  541. /// <param name="e"></param>
  542. ///
  543. private void GetCVTHeatno()
  544. {
  545. try
  546. {
  547. this.txtCVT1.Text = "";
  548. this.txtCVT1.Appearance.BackColor = Color.LightGray;
  549. this.txtCVT2.Text = "";
  550. this.txtCVT2.Appearance.BackColor = Color.LightGray;
  551. this.txtCVT3.Text = "";
  552. this.txtCVT3.Appearance.BackColor = Color.LightGray;
  553. this.txtHMP1.Text = "";
  554. this.txtHMP1.Appearance.BackColor = Color.LightGray;
  555. this.txtHMP2.Text = "";
  556. this.txtHMP2.Appearance.BackColor = Color.LightGray;
  557. string strError = "";
  558. DataSet ds = null;// (DataSet)Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "getCVTHMPCurrentLH", new object[] { }, out strError);
  559. if (strError == "")
  560. {
  561. if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
  562. {
  563. for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
  564. {
  565. string v_LH = "";
  566. string v_POS = ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1);
  567. string v_POSID = ds.Tables[0].Rows[i]["objectpos"].ToString().Substring(3, 2);
  568. // if (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1) == "V") v_LH = "V" + v_LH;
  569. if (v_POS == "C")
  570. {
  571. v_LH = (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(5, 8));
  572. if (v_POSID == "01")
  573. {
  574. if (_strSendSucceededForBof1 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
  575. if (_strSendSucceededForBof1 == "Y") txtCVT1.Appearance.BackColor = Color.LightBlue;
  576. this.txtCVT1.Text = v_LH;
  577. }
  578. if (v_POSID == "02")
  579. {
  580. if (_strSendSucceededForBof2 == "" || _strSendSucceededForBof2 == "N") HeatNo_HudwId_Exist(v_LH);
  581. if (_strSendSucceededForBof2 == "Y") txtCVT2.Appearance.BackColor = Color.LightBlue;
  582. this.txtCVT2.Text = v_LH;
  583. }
  584. if (v_POSID == "03")
  585. {
  586. if (_strSendSucceededForBof3 == "" || _strSendSucceededForBof3 == "N") HeatNo_HudwId_Exist(v_LH);
  587. if (_strSendSucceededForBof3 == "Y") txtCVT3.Appearance.BackColor = Color.LightBlue;
  588. this.txtCVT3.Text = v_LH;
  589. }
  590. }
  591. if (v_POS == "H")
  592. {
  593. v_LH = ds.Tables[0].Rows[i]["objectid"].ToString();
  594. if (v_POSID == "01")
  595. {
  596. _strHmp1No = ds.Tables[0].Rows[i]["objectid"].ToString();
  597. if (_strSendSucceededForHmp1 == "" || _strSendSucceededForHmp1 == "N") HeatNo_HudwId_Exist(v_LH);
  598. if (_strSendSucceededForHmp1 == "Y") txtHMP1.Appearance.BackColor = Color.LightBlue;
  599. this.txtHMP1.Text = v_LH;
  600. }
  601. if (v_POSID == "02")
  602. {
  603. if (_strSendSucceededForHmp2 == "" || _strSendSucceededForHmp2 == "N") HeatNo_HudwId_Exist(v_LH);
  604. _strHmp2No = ds.Tables[0].Rows[i]["objectid"].ToString();
  605. if (_strSendSucceededForHmp2 == "Y") txtHMP2.Appearance.BackColor = Color.LightBlue;
  606. this.txtHMP2.Text = v_LH;
  607. }
  608. }
  609. }
  610. }
  611. if (txtCVT1.Text.Trim().Length == 0) _strSendSucceededForBof1 = "N";
  612. if (txtCVT2.Text.Trim().Length == 0) _strSendSucceededForBof2 = "N";
  613. if (txtCVT3.Text.Trim().Length == 0) _strSendSucceededForBof3 = "N";
  614. if (txtHMP1.Text.Trim().Length == 0) _strSendSucceededForHmp1 = "N";
  615. if (txtHMP2.Text.Trim().Length == 0) _strSendSucceededForHmp2 = "N";
  616. }
  617. }
  618. catch (Exception EE)
  619. {
  620. }
  621. }
  622. private void SendIronToCvt()
  623. {
  624. string strError = "";
  625. string strWz = "";
  626. //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "SendIronToCVT", new object[] { ArrayIronRow4 }, out strError);
  627. if (strError == "")
  628. {
  629. if (ArrayIronRow4[4].Substring(0, 1) == "H")
  630. strWz = ArrayIronRow4[4].Substring(0, 2);
  631. else
  632. strWz = ArrayIronRow4[4].Substring(2, 1);
  633. switch (strWz)
  634. {
  635. case "H1":
  636. _strSendSucceededForHmp1 = "Y";
  637. break;
  638. case "H2":
  639. _strSendSucceededForHmp2 = "Y";
  640. break;
  641. case "1":
  642. _strSendSucceededForBof1 = "Y";
  643. break;
  644. case "2":
  645. _strSendSucceededForBof2 = "Y";
  646. break;
  647. case "3":
  648. _strSendSucceededForBof3 = "Y";
  649. break;
  650. default:
  651. break;
  652. }
  653. MessageBox.Show("成功发送铁水!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  654. }
  655. else
  656. MessageBox.Show("发送失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  657. }
  658. #endregion
  659. #region gridevent
  660. private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
  661. {
  662. if (blModify == false)
  663. {
  664. setbutton("2");
  665. setucInIron("2");
  666. string shiftgroup = getshift();
  667. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
  668. try
  669. {
  670. SetMisnoNoEdite();
  671. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
  672. ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
  673. ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", shiftgroup);
  674. ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", shiftgroup);
  675. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0,1);
  676. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
  677. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
  678. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
  679. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
  680. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
  681. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
  682. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
  683. ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
  684. ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
  685. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
  686. }
  687. catch
  688. { }
  689. }
  690. else
  691. {
  692. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0, 1);
  693. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
  694. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
  695. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
  696. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
  697. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
  698. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
  699. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
  700. ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
  701. ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
  702. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
  703. }
  704. }
  705. /// <summary>
  706. /// 取相关数据到编辑区 铁运进铁数据
  707. /// </summary>
  708. /// <param name="sender"></param>
  709. /// <param name="e"></param>
  710. private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
  711. {
  712. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultraGrid2.ActiveRow;
  713. if (aRow == null) return;
  714. if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
  715. try
  716. {
  717. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = aRow.Cells["InIronNo"].Text;
  718. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = aRow.Cells["HighNo"].Text;
  719. ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  720. ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
  721. ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  722. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  723. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  724. ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = aRow.Cells["InTime"].Text;
  725. ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
  726. ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
  727. ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
  728. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  729. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  730. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  731. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  732. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  733. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  734. }
  735. catch { }
  736. }
  737. private void ultHtInIronGrid_AfterRowActivate(object sender, EventArgs e)
  738. {
  739. }
  740. private void ultHtOutIronGrid_AfterRowActivate(object sender, EventArgs e)
  741. {
  742. //Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
  743. //// Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
  744. //if (aRow == null) return;
  745. //if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
  746. //try
  747. //{
  748. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
  749. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
  750. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
  751. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
  752. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
  753. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
  754. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
  755. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
  756. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  757. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  758. // // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  759. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
  760. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  761. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  762. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
  763. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  764. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  765. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  766. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  767. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  768. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  769. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
  770. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
  771. //}
  772. //catch { }
  773. }
  774. private void ultHtOutIronGrid_Click(object sender, EventArgs e)
  775. {
  776. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
  777. // Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
  778. if (aRow == null) return;
  779. ultSelectIron.Text = aRow.Cells["InIronNo"].Text;
  780. ArrayIronRow4[0] = aRow.Cells["InIronNo"].Text;
  781. ArrayIronRow4[1] = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  782. ArrayIronRow4[2] = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  783. ArrayIronRow4[3] = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  784. ArrayIronRow4[6] = aRow.Cells["ReturnHeatNo"].Text;
  785. ArrayIronRow4[7] = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
  786. ArrayIronRow4[8] = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  787. ArrayIronRow4[9] = aRow.Cells["LDWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDWeight"].Text : "0";
  788. ArrayIronRow4[10] = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
  789. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
  790. try
  791. {
  792. ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
  793. ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
  794. ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
  795. ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
  796. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
  797. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
  798. ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
  799. ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
  800. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  801. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  802. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  803. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
  804. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  805. ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  806. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
  807. ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  808. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  809. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  810. ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  811. ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  812. ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  813. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
  814. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
  815. ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["CHECKNO"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
  816. }
  817. catch { }
  818. //Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
  819. //if (aRow == null) return;
  820. //ultSelectIron.Text = aRow.Cells["InIronNo"].Text;
  821. //ArrayIronRow4[0] = aRow.Cells["InIronNo"].Text;
  822. //ArrayIronRow4[1] = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
  823. //ArrayIronRow4[2] = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  824. //ArrayIronRow4[3] = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  825. //ArrayIronRow4[6] = aRow.Cells["ReturnHeatNo"].Text;
  826. //ArrayIronRow4[7] = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
  827. //ArrayIronRow4[8] = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  828. //ArrayIronRow4[9] = aRow.Cells["LDWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDWeight"].Text : "0";
  829. }
  830. private void ultHtElementIron_AfterRowActivate(object sender, EventArgs e)
  831. {
  832. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtElementIron.ActiveRow;
  833. if (aRow == null) return;
  834. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text != "自动") return;
  835. try
  836. {
  837. ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  838. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  839. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  840. ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  841. ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  842. ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  843. ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
  844. }
  845. catch
  846. {
  847. }
  848. }
  849. /// <summary>
  850. /// 铁运进铁设置初始数据
  851. /// </summary>
  852. private void SetGridNewIronData()
  853. {
  854. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
  855. ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = "";
  856. ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
  857. ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
  858. ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
  859. ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = "";
  860. ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
  861. ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
  862. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  863. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
  864. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
  865. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
  866. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
  867. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
  868. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
  869. ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = this.Text.Substring(0, 1);
  870. }
  871. /// <summary>
  872. /// 混铁炉进铁设置初始数据
  873. /// </summary>
  874. private void SetGridNewIronData2()
  875. {
  876. ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
  877. ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = "";
  878. ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = "";
  879. ucHtInIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
  880. ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
  881. ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
  882. ucHtInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
  883. ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
  884. ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
  885. ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
  886. ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
  887. ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
  888. ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
  889. ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
  890. ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = "";
  891. ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
  892. ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
  893. ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  894. ucHtInIron1.ultraGrid1.Rows[0].Cells["Memo"].Value = "";
  895. }
  896. /// <summary>
  897. /// 设置出铁初始数据
  898. /// </summary>
  899. private void SetGridNewIronData3()
  900. {
  901. ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "自动";
  902. ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = "1#转炉";
  903. ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
  904. ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
  905. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
  906. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
  907. ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = DateTime.Now;
  908. ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = "正常出铁";
  909. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "0";
  910. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "0";
  911. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "0";
  912. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
  913. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
  914. ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  915. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
  916. ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
  917. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
  918. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
  919. ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
  920. ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
  921. ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
  922. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
  923. }
  924. /// <summary>
  925. /// EDITBUTTON事件
  926. /// </summary>
  927. /// <param name="flag"></param>
  928. /// <param name="shift"></param>
  929. /// <returns></returns>
  930. private void ucHtInIron1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  931. {
  932. switch (e.Cell.Column.Key)
  933. {
  934. case "IronLaiyuan":
  935. {
  936. 弹出窗体.frmMixInIronNo frmMixInSource_1 = new 弹出窗体.frmMixInIronNo();
  937. frmMixInSource_1.strMisNo = this.Text.Substring(0, 1);
  938. using (frmMixInSource_1)
  939. {
  940. if (frmMixInSource_1.ShowDialog(this) == DialogResult.OK)
  941. {
  942. ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = frmMixInSource_1.C;
  943. ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = frmMixInSource_1.Si;
  944. ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = frmMixInSource_1.Mn;
  945. ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = frmMixInSource_1.P;
  946. ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = frmMixInSource_1.S;
  947. ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = frmMixInSource_1.V;
  948. ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = frmMixInSource_1.SourceID;
  949. ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = frmMixInSource_1.BlastStoveNo;
  950. ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = frmMixInSource_1.Temperature;
  951. ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = frmMixInSource_1.CanWeight;
  952. ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = frmMixInSource_1.GrossWeight;
  953. ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = frmMixInSource_1.NetWeight;
  954. ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = frmMixInSource_1.PotNo;
  955. }
  956. }
  957. break;
  958. }
  959. default:
  960. break;
  961. }
  962. }
  963. private void ucInIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  964. {
  965. float flPZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
  966. float flMZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
  967. float flJZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
  968. switch (e.Cell.Column.Key)
  969. {
  970. case "LdMaoWeight":
  971. {
  972. try
  973. {
  974. if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  975. else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  976. else if (flPZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  977. }
  978. catch { }
  979. break;
  980. }
  981. case "LdKongWeight":
  982. {
  983. try
  984. {
  985. if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  986. else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
  987. else if (flMZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  988. }
  989. catch { }
  990. break;
  991. }
  992. case "IronWeight":
  993. {
  994. try
  995. {
  996. if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  997. else if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  998. else if (flMZ > 0 && flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  999. }
  1000. catch { }
  1001. break;
  1002. }
  1003. }
  1004. }
  1005. private void ucHtOutIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  1006. {
  1007. float flPZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
  1008. float flMZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
  1009. float flJZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
  1010. switch (e.Cell.Column.Key)
  1011. {
  1012. case "LdMaoWeight":
  1013. {
  1014. try
  1015. {
  1016. if (flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1017. else if (flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  1018. else if (flPZ > 0 && flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1019. }
  1020. catch { }
  1021. break;
  1022. }
  1023. case "LdKongWeight":
  1024. {
  1025. try
  1026. {
  1027. if (flMZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1028. else if (flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
  1029. else if (flMZ > 0 && flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1030. }
  1031. catch { }
  1032. break;
  1033. }
  1034. case "IronWeight":
  1035. {
  1036. try
  1037. {
  1038. if (flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  1039. else if (flMZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  1040. else if (flMZ > 0 && flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  1041. }
  1042. catch { }
  1043. break;
  1044. }
  1045. case "ZhuanluLdNo":
  1046. {
  1047. try
  1048. {
  1049. string strStatus = "";
  1050. int intAge = 0;
  1051. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.ToString().Length > 0)
  1052. {
  1053. intAge= GetIronwrapAge(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text, out strStatus);
  1054. if (strStatus == "备用")
  1055. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = intAge + 1;
  1056. else
  1057. {
  1058. //MessageBox.Show("当前铁包状态【" + strStatus + "】不能使用!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1059. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "";
  1060. //ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
  1061. }
  1062. }
  1063. else
  1064. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
  1065. }
  1066. catch
  1067. { }
  1068. break;
  1069. }
  1070. }
  1071. }
  1072. private void ucHtInIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  1073. {
  1074. float flPZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
  1075. float flMZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
  1076. float flJZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
  1077. switch (e.Cell.Column.Key)
  1078. {
  1079. case "LdMaoWeight":
  1080. {
  1081. try
  1082. {
  1083. if (flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1084. else if (flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  1085. else if (flPZ > 0 && flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1086. }
  1087. catch { }
  1088. break;
  1089. }
  1090. case "LdKongWeight":
  1091. {
  1092. try
  1093. {
  1094. if (flMZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1095. else if (flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
  1096. else if (flMZ > 0 && flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
  1097. }
  1098. catch { }
  1099. break;
  1100. }
  1101. case "IronWeight":
  1102. {
  1103. try
  1104. {
  1105. if (flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  1106. else if (flMZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
  1107. else if (flMZ > 0 && flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
  1108. }
  1109. catch { }
  1110. break;
  1111. }
  1112. }
  1113. //switch (e.Cell.Column.Key)
  1114. //{
  1115. // case "LdKongWeight":
  1116. // {
  1117. // try
  1118. // {
  1119. // float a = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
  1120. // float b = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
  1121. // ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(b - a);
  1122. // }
  1123. // catch { }
  1124. // break;
  1125. // }
  1126. // case "LdMaoWeight":
  1127. // {
  1128. // try
  1129. // {
  1130. // float a = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
  1131. // float b = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
  1132. // ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(b - a);
  1133. // }
  1134. // catch { }
  1135. // break;
  1136. // }
  1137. //}
  1138. }
  1139. /// <summary>
  1140. /// editbutton事件的委托
  1141. /// </summary>
  1142. private void SetUserControlDelegate()
  1143. {
  1144. ucHtInIron1.ultraGrid1.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtInIron1_ClickCellButton);
  1145. ucHtInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtInIron1_CellChange);
  1146. ucInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucInIron1_CellChange);
  1147. ucHtOutIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtOutIron1_CellChange);
  1148. }
  1149. #endregion
  1150. #region function
  1151. private string ConvertShift(string flag, string shift)
  1152. {
  1153. string StrReturn = "";
  1154. if (flag == "1" & shift != "" & shift != null)
  1155. {
  1156. switch (shift.Substring(0, 1))
  1157. {
  1158. case "1":
  1159. StrReturn = "白";
  1160. break;
  1161. case "2":
  1162. StrReturn = "中";
  1163. break;
  1164. case "3":
  1165. StrReturn = "夜";
  1166. break;
  1167. }
  1168. }
  1169. else if (flag == "2" & shift.Length > 1)
  1170. {
  1171. switch (shift.Substring(1, 1))
  1172. {
  1173. case "1":
  1174. StrReturn = "甲";
  1175. break;
  1176. case "2":
  1177. StrReturn = "乙";
  1178. break;
  1179. case "3":
  1180. StrReturn = "丙";
  1181. break;
  1182. case "4":
  1183. StrReturn = "丁";
  1184. break;
  1185. }
  1186. }
  1187. else if (flag == "3" & shift != "")
  1188. {
  1189. switch (shift.Trim())
  1190. {
  1191. case "白":
  1192. StrReturn = "1";
  1193. break;
  1194. case "中":
  1195. StrReturn = "2";
  1196. break;
  1197. case "夜":
  1198. StrReturn = "3";
  1199. break;
  1200. }
  1201. }
  1202. else if (flag == "4" & shift != "")
  1203. {
  1204. switch (shift.Trim())
  1205. {
  1206. case "甲":
  1207. StrReturn = "1";
  1208. break;
  1209. case "乙":
  1210. StrReturn = "2";
  1211. break;
  1212. case "丙":
  1213. StrReturn = "3";
  1214. break;
  1215. case "丁":
  1216. StrReturn = "4";
  1217. break;
  1218. }
  1219. }
  1220. return StrReturn;
  1221. }
  1222. private string getshift()
  1223. {
  1224. string err = "";
  1225. //CallingMessage par = new CallingMessage();
  1226. //par.ServerName = "lgJobMgt";
  1227. //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
  1228. //par.ClassName = "Core.LgMes.Server.lgJobMgt.classCommonModule";
  1229. //par.MethodName = "GetCurrDuty";
  1230. //par.args = new object[] { };
  1231. string ds = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
  1232. if (ds != "")
  1233. {
  1234. return ds;
  1235. }
  1236. else
  1237. {
  1238. return "";
  1239. }
  1240. }
  1241. /// <summary>
  1242. /// 设置班组下拉框
  1243. /// </summary>
  1244. /// <param name="Grid"></param>
  1245. private void SetColumnModeGroup(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
  1246. {
  1247. DataTable dt = new DataTable();
  1248. dt.TableName = "JIALIAO";
  1249. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  1250. dt.Columns.Add(dc);
  1251. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  1252. dt.Columns.Add(dc);
  1253. DataRow dr = dt.NewRow();
  1254. dr["BCBM"] = "1";
  1255. dr["BCNA"] = "白";
  1256. dt.Rows.Add(dr);
  1257. dr = dt.NewRow();
  1258. dr["BCBM"] = "2";
  1259. dr["BCNA"] = "中";
  1260. dt.Rows.Add(dr);
  1261. dr = dt.NewRow();
  1262. dr["BCBM"] = "3";
  1263. dr["BCNA"] = "夜";
  1264. dt.Rows.Add(dr);
  1265. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Group", 0, "班 组", 60, Grid, dt, "BCBM", "BCNA");
  1266. }
  1267. /// <summary>
  1268. /// 设置班组下拉框
  1269. /// </summary>
  1270. /// <param name="Grid"></param>
  1271. private void SetColumnModeShift(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
  1272. {
  1273. DataTable dt = new DataTable();
  1274. dt.TableName = "JIALIAO";
  1275. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  1276. dt.Columns.Add(dc);
  1277. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  1278. dt.Columns.Add(dc);
  1279. DataRow dr = dt.NewRow();
  1280. dr["BCBM"] = "1";
  1281. dr["BCNA"] = "甲";
  1282. dt.Rows.Add(dr);
  1283. dr = dt.NewRow();
  1284. dr["BCBM"] = "2";
  1285. dr["BCNA"] = "乙";
  1286. dt.Rows.Add(dr);
  1287. dr = dt.NewRow();
  1288. dr["BCBM"] = "3";
  1289. dr["BCNA"] = "丙";
  1290. dt.Rows.Add(dr);
  1291. dr = dt.NewRow();
  1292. dr["BCBM"] = "4";
  1293. dr["BCNA"] = "丁";
  1294. dt.Rows.Add(dr);
  1295. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Shift", 0, "班组", 60, Grid, dt, "BCBM", "BCNA");
  1296. }
  1297. /// <summary>
  1298. /// 设置去向
  1299. /// </summary>
  1300. private void SetColumnModequxiang()
  1301. {
  1302. DataTable dt = new DataTable();
  1303. dt.TableName = "JIALIAO";
  1304. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  1305. dt.Columns.Add(dc);
  1306. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  1307. dt.Columns.Add(dc);
  1308. DataRow dr = dt.NewRow();
  1309. dr["BCBM"] = "1";
  1310. dr["BCNA"] = "1#混铁炉";
  1311. dt.Rows.Add(dr);
  1312. //dr = dt.NewRow();
  1313. //dr["BCBM"] = "2";
  1314. //dr["BCNA"] = "2#混铁炉";
  1315. //dt.Rows.Add(dr);
  1316. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("IronQuxiang", 0, "铁水去向", 135, ucInIron1.ultraGrid1, dt, "BCBM", "BCNA");
  1317. }
  1318. /// <summary>
  1319. /// 设置去向
  1320. /// </summary>
  1321. private void SetColumnModeOutquxiang()
  1322. {
  1323. DataTable dt = new DataTable();
  1324. dt.TableName = "JIALIAO";
  1325. DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
  1326. dt.Columns.Add(dc);
  1327. dc = new DataColumn("BCNA", Type.GetType("System.String"));
  1328. dt.Columns.Add(dc);
  1329. DataRow dr = dt.NewRow();
  1330. dr["BCBM"] = "1";
  1331. dr["BCNA"] = "1#转炉";
  1332. dt.Rows.Add(dr);
  1333. dr = dt.NewRow();
  1334. dr["BCBM"] = "2";
  1335. dr["BCNA"] = "2#转炉";
  1336. dt.Rows.Add(dr);
  1337. dr = dt.NewRow();
  1338. dr["BCBM"] = "3";
  1339. dr["BCNA"] = "3#转炉";
  1340. dt.Rows.Add(dr);
  1341. dr = dt.NewRow();
  1342. dr["BCBM"] = "4";
  1343. dr["BCNA"] = "1#预处理";
  1344. dt.Rows.Add(dr);
  1345. //dr = dt.NewRow();
  1346. //dr["BCBM"] = "5";
  1347. // dr["BCNA"] = "2#预处理";
  1348. // dt.Rows.Add(dr);
  1349. //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCellEdit("IronQuxiang", 0, "铁水去向", 100, ucHtOutIron1.ultraGrid1, dt, "BCBM", "BCNA");
  1350. }
  1351. /// <summary>
  1352. /// 序号栏锁定
  1353. /// </summary>
  1354. private void SetMisnoNoEdite()
  1355. {
  1356. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1357. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1358. }
  1359. /// <summary>
  1360. /// 序号栏锁定
  1361. /// </summary>
  1362. private void SetMisnoNoEdite2()
  1363. {
  1364. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1365. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1366. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1367. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1368. }
  1369. /// <summary>
  1370. /// 序号栏锁定
  1371. /// </summary>
  1372. private void SetMisnoNoEdite3()
  1373. {
  1374. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1375. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1376. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1377. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1378. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1379. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1380. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1381. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1382. }
  1383. private void timer1_Tick(object sender, EventArgs e)
  1384. {
  1385. RefreshHighheatNo();
  1386. // GetCVTHeatno();
  1387. }
  1388. /// <summary>
  1389. /// 设置铁运进铁 按钮状态
  1390. ///
  1391. /// </summary>
  1392. /// <param name="flag"></param>
  1393. private void setbutton(string flag)
  1394. {
  1395. switch (flag)
  1396. {
  1397. case "1":
  1398. ulbtnAdd.Enabled = true;
  1399. ulbtnEdit.Enabled = true;
  1400. ulbtnDelete.Enabled = true;
  1401. ulbtnSave.Enabled = false;
  1402. ulbtnCancel.Enabled = false;
  1403. ulbtnRef.Enabled = true;
  1404. ulbtnHisRequir.Enabled = true;
  1405. break;
  1406. case "2":
  1407. ulbtnAdd.Enabled = false;
  1408. ulbtnEdit.Enabled = false;
  1409. ulbtnDelete.Enabled = false;
  1410. ulbtnSave.Enabled = true;
  1411. ulbtnCancel.Enabled = true;
  1412. ulbtnRef.Enabled = true;
  1413. ulbtnHisRequir.Enabled = true;
  1414. break;
  1415. }
  1416. }
  1417. /// <summary>
  1418. /// 设置混铁炉进铁按钮状态
  1419. /// </summary>
  1420. /// <param name="flag"></param>
  1421. private void setbutton2(string flag)
  1422. {
  1423. switch (flag)
  1424. {
  1425. case "1":
  1426. ulbtnAdd2.Enabled = true;
  1427. ulbtnEdit2.Enabled = true;
  1428. ulbtnDelete2.Enabled = true;
  1429. ulbtnSave2.Enabled = false;
  1430. ulbtnCancel2.Enabled = false;
  1431. ulbtnRef2.Enabled = true;
  1432. ulbtnHisRequir2.Enabled = true;
  1433. break;
  1434. case "2":
  1435. ulbtnAdd2.Enabled = false;
  1436. ulbtnEdit2.Enabled = false;
  1437. ulbtnDelete2.Enabled = false;
  1438. ulbtnSave2.Enabled = true;
  1439. ulbtnCancel2.Enabled = true;
  1440. ulbtnRef2.Enabled = true;
  1441. ulbtnHisRequir2.Enabled = true;
  1442. break;
  1443. }
  1444. }
  1445. /// <summary>
  1446. /// 设置出铁界面BUTTON
  1447. /// </summary>
  1448. /// <param name="flag"></param>
  1449. private void setbutton3(string flag)
  1450. {
  1451. switch (flag)
  1452. {
  1453. case "1":
  1454. ulbtnAdd3.Enabled = true;
  1455. ulbtnEdit3.Enabled = true;
  1456. ulbtnDelete3.Enabled = true;
  1457. ulbtnSave3.Enabled = false;
  1458. ulbtnCancel3.Enabled = false;
  1459. ulbtnRef3.Enabled = true;
  1460. ulbtnHisRequir3.Enabled = true;
  1461. break;
  1462. case "2":
  1463. ulbtnAdd3.Enabled = false;
  1464. ulbtnEdit3.Enabled = false;
  1465. ulbtnDelete3.Enabled = false;
  1466. ulbtnSave3.Enabled = true;
  1467. ulbtnCancel3.Enabled = true;
  1468. ulbtnRef3.Enabled = true;
  1469. ulbtnHisRequir3.Enabled = true;
  1470. break;
  1471. }
  1472. }
  1473. /// <summary>
  1474. /// 设置 ucInIron Grid的读写状态
  1475. /// 1:NoEDIT 2:ALLOWEDIT
  1476. /// </summary>
  1477. /// <param name="flag"></param>
  1478. private void setucInIron(string flag)
  1479. {
  1480. switch (flag)
  1481. {
  1482. case "1":
  1483. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1484. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1485. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1486. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1487. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1488. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1489. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1490. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1491. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1492. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1493. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1494. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1495. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1496. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1497. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1498. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1499. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1500. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1501. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1502. ucInIron1.ultraGrid1.DisplayLayout.Override.CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1503. break;
  1504. case "2":
  1505. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1506. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1507. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1508. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1509. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1510. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1511. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1512. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1513. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1514. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1515. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1516. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1517. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1518. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1519. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1520. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1521. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1522. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1523. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1524. ucInIron1.ultraGrid1.DisplayLayout.Override.CellAppearance.BackColor = Color.LightBlue;
  1525. break;
  1526. }
  1527. }
  1528. /// <summary>
  1529. /// 设置 ucHtInIron Grid的读写状态
  1530. /// 1:NoEDIT 2:ALLOWEDIT
  1531. /// </summary>
  1532. /// <param name="flag"></param>
  1533. private void setucHtInIron(string flag)
  1534. {
  1535. switch (flag)
  1536. {
  1537. case "1":
  1538. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1539. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1540. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1541. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1542. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1543. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1544. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1545. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1546. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1547. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1548. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1549. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1550. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1551. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1552. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1553. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1554. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1555. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1556. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1557. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1558. ucHtInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1559. break;
  1560. case "2":
  1561. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1562. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1563. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1564. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1565. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1566. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1567. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1568. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1569. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1570. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1571. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1572. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1573. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1574. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1575. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1576. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1577. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1578. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1579. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1580. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1581. ucHtInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
  1582. break;
  1583. }
  1584. }
  1585. /// <summary>
  1586. /// 设置出铁GRID
  1587. /// </summary>
  1588. /// <param name="AValue"></param>
  1589. /// <returns></returns>
  1590. private void setucHtInIron3(string flag)
  1591. {
  1592. switch (flag)
  1593. {
  1594. case "1":
  1595. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1596. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1597. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1598. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1599. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1600. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1601. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1602. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1603. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1604. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1605. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1606. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1607. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1608. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1609. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1610. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1611. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1612. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1613. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1614. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1615. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1616. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1617. ucHtOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1618. break;
  1619. case "2":
  1620. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1621. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1622. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1623. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1624. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1625. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1626. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1627. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1628. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1629. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1630. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1631. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1632. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1633. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1634. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1635. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1636. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1637. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1638. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1639. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1640. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1641. ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  1642. ucHtOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
  1643. break;
  1644. }
  1645. }
  1646. private static bool IsDouble(string AValue)
  1647. {
  1648. try
  1649. {
  1650. Convert.ToDouble(AValue);
  1651. return true;
  1652. }
  1653. catch
  1654. {
  1655. return false;
  1656. }
  1657. }
  1658. /// <summary>
  1659. /// 数据CHECK
  1660. /// </summary>
  1661. /// <returns></returns>
  1662. private bool CheckData()
  1663. {
  1664. if (ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
  1665. ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
  1666. if (ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
  1667. ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
  1668. if (ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
  1669. ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  1670. if (ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
  1671. ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
  1672. if (ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
  1673. ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
  1674. if (ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
  1675. ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
  1676. if (ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
  1677. ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
  1678. if (ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
  1679. ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
  1680. if (ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
  1681. ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
  1682. if (ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
  1683. ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
  1684. //if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
  1685. //{
  1686. // return false;
  1687. //}
  1688. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text))
  1689. {
  1690. return false;
  1691. }
  1692. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
  1693. {
  1694. return false;
  1695. }
  1696. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
  1697. {
  1698. return false;
  1699. }
  1700. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text))
  1701. {
  1702. return false;
  1703. }
  1704. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text))
  1705. {
  1706. return false;
  1707. }
  1708. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text))
  1709. {
  1710. return false;
  1711. }
  1712. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
  1713. {
  1714. return false;
  1715. }
  1716. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
  1717. {
  1718. return false;
  1719. }
  1720. if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
  1721. {
  1722. return false;
  1723. }
  1724. return true;
  1725. }
  1726. private bool CheckData2()
  1727. {
  1728. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
  1729. ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
  1730. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
  1731. ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
  1732. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
  1733. ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  1734. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
  1735. ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
  1736. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
  1737. ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
  1738. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
  1739. ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
  1740. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
  1741. ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
  1742. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
  1743. ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
  1744. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
  1745. ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
  1746. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
  1747. ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
  1748. //if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
  1749. //{
  1750. // return false;
  1751. //}
  1752. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text))
  1753. {
  1754. return false;
  1755. }
  1756. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
  1757. {
  1758. return false;
  1759. }
  1760. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
  1761. {
  1762. return false;
  1763. }
  1764. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text))
  1765. {
  1766. return false;
  1767. }
  1768. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text))
  1769. {
  1770. return false;
  1771. }
  1772. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text))
  1773. {
  1774. return false;
  1775. }
  1776. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
  1777. {
  1778. return false;
  1779. }
  1780. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
  1781. {
  1782. return false;
  1783. }
  1784. if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
  1785. {
  1786. return false;
  1787. }
  1788. return true;
  1789. }
  1790. private bool CheckData3()
  1791. {
  1792. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
  1793. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
  1794. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
  1795. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
  1796. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
  1797. ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
  1798. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
  1799. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
  1800. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text.Trim().Length == 0)
  1801. ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "";
  1802. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.Trim().Length == 0)
  1803. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
  1804. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text.Trim().Length == 0)
  1805. ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "";
  1806. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
  1807. ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
  1808. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
  1809. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
  1810. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
  1811. ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
  1812. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
  1813. ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
  1814. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
  1815. ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
  1816. if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
  1817. ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
  1818. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
  1819. {
  1820. return false;
  1821. }
  1822. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text))
  1823. {
  1824. return false;
  1825. }
  1826. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
  1827. {
  1828. return false;
  1829. }
  1830. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
  1831. {
  1832. return false;
  1833. }
  1834. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text))
  1835. {
  1836. return false;
  1837. }
  1838. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text))
  1839. {
  1840. return false;
  1841. }
  1842. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text))
  1843. {
  1844. return false;
  1845. }
  1846. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
  1847. {
  1848. return false;
  1849. }
  1850. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
  1851. {
  1852. return false;
  1853. }
  1854. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
  1855. {
  1856. return false;
  1857. }
  1858. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
  1859. {
  1860. return false;
  1861. }
  1862. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text))
  1863. {
  1864. return false;
  1865. }
  1866. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text))
  1867. {
  1868. return false;
  1869. }
  1870. if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text))
  1871. {
  1872. return false;
  1873. }
  1874. return true;
  1875. }
  1876. /// <summary>
  1877. /// 取铁运进铁的数据 到数组
  1878. /// </summary>
  1879. private void GetGridData()
  1880. {
  1881. try
  1882. {
  1883. ArrayIronRow[0] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text;
  1884. ArrayIronRow[1] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
  1885. ArrayIronRow[2] = ConvertShift("3", ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucInIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
  1886. ArrayIronRow[3] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Text;
  1887. ArrayIronRow[4] = ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
  1888. ArrayIronRow[5] = ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Text;
  1889. ArrayIronRow[6] = ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
  1890. ArrayIronRow[7] = ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
  1891. ArrayIronRow[8] = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
  1892. ArrayIronRow[9] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
  1893. ArrayIronRow[10] = ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text;
  1894. ArrayIronRow[11] = ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
  1895. ArrayIronRow[12] = ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
  1896. ArrayIronRow[13] = ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text;
  1897. ArrayIronRow[14] = ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text;
  1898. ArrayIronRow[15] = ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text;
  1899. ArrayIronRow[16] = ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
  1900. ArrayIronRow[17] = User;
  1901. }
  1902. catch { }
  1903. }
  1904. /// <summary>
  1905. /// 取混铁炉进铁的数据 到数组
  1906. /// </summary>
  1907. private void GetGridData2()
  1908. {
  1909. try
  1910. {
  1911. ArrayIronRow2[0] = ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text;
  1912. ArrayIronRow2[1] = ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
  1913. ArrayIronRow2[2] = ConvertShift("3", ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucHtInIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
  1914. ArrayIronRow2[3] = ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Text;
  1915. ArrayIronRow2[4] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
  1916. ArrayIronRow2[5] = ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Text;
  1917. ArrayIronRow2[6] = ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
  1918. ArrayIronRow2[7] = ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
  1919. ArrayIronRow2[8] = ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
  1920. ArrayIronRow2[9] = ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text;
  1921. ArrayIronRow2[10] = ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text;
  1922. ArrayIronRow2[11] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
  1923. ArrayIronRow2[12] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
  1924. ArrayIronRow2[13] = ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text;
  1925. ArrayIronRow2[14] = ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text;
  1926. ArrayIronRow2[15] = ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text;
  1927. ArrayIronRow2[16] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Ironlaiyuan"].Text;
  1928. ArrayIronRow2[17] = ucHtInIron1.ultraGrid1.Rows[0].Cells["memo"].Text;
  1929. ArrayIronRow2[18] = User;
  1930. }
  1931. catch { }
  1932. }
  1933. /// <summary>
  1934. /// 取得出铁GRID数据
  1935. /// </summary>
  1936. /// <param name="sender"></param>
  1937. /// <param name="e"></param>
  1938. private void GetGridData3()
  1939. {
  1940. try
  1941. {
  1942. ArrayIronRow3[0] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text;
  1943. ArrayIronRow3[1] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Text; //混铁炉状态
  1944. ArrayIronRow3[2] = ConvertShift("3", ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucHtOutIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
  1945. ArrayIronRow3[3] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Text;
  1946. ArrayIronRow3[4] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
  1947. ArrayIronRow3[5] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLDno"].Text;
  1948. ArrayIronRow3[6] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
  1949. ArrayIronRow3[7] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
  1950. ArrayIronRow3[8] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
  1951. ArrayIronRow3[9] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text;
  1952. ArrayIronRow3[10] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text;
  1953. ArrayIronRow3[11] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
  1954. ArrayIronRow3[12] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
  1955. ArrayIronRow3[13] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text;
  1956. ArrayIronRow3[14] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text;
  1957. ArrayIronRow3[15] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text;
  1958. ArrayIronRow3[16] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
  1959. ArrayIronRow3[17] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Text;
  1960. ArrayIronRow3[18] = User;
  1961. ArrayIronRow3[19] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text;
  1962. ArrayIronRow3[20] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Text;//出铁类型
  1963. ArrayIronRow3[21] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text;
  1964. ArrayIronRow3[22] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Text; //成分检验码
  1965. }
  1966. catch { }
  1967. }
  1968. #endregion
  1969. #region buttonevent
  1970. private void ulbtnAdd_Click(object sender, EventArgs e)
  1971. {
  1972. setbutton("2");
  1973. setucInIron("2");
  1974. SetMisnoNoEdite();
  1975. SetGridNewIronData();
  1976. }
  1977. private void ulbtnEdit_Click(object sender, EventArgs e)
  1978. {
  1979. blModify = true;
  1980. setbutton("2");
  1981. setucInIron("2");
  1982. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  1983. ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  1984. }
  1985. private void ulbtnDelete_Click(object sender, EventArgs e)
  1986. {
  1987. if (ultraGrid2.ActiveRow == null || ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
  1988. if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
  1989. MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
  1990. string strWhere = "where MISID='" + ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text + "'";
  1991. try
  1992. {
  1993. string strError = "";
  1994. // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "DeleteIronData", new object[] { strWhere }, out strError);
  1995. if (strError == "")
  1996. MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1997. else
  1998. MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  1999. }
  2000. catch (Exception ee)
  2001. {
  2002. string s = ee.Message;
  2003. }
  2004. GetInIronData();
  2005. }
  2006. private void ulbtnSave_Click(object sender, EventArgs e)
  2007. {
  2008. if (CheckData() == false)
  2009. {
  2010. MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2011. return;
  2012. }
  2013. if (ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value.ToString().Length > 0 && ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text.Substring(1, 1) != "#")
  2014. {
  2015. MessageBox.Show(this, "请选择铁水去向!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2016. return;
  2017. }
  2018. InsertData();
  2019. GetInIronData();
  2020. }
  2021. private void ulbtnCancel_Click(object sender, EventArgs e)
  2022. {
  2023. setbutton("1");
  2024. setucInIron("1");
  2025. ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "";
  2026. ultraGrid2_AfterRowActivate(null, null);
  2027. blModify = false;
  2028. }
  2029. private void ulbtnRef_Click(object sender, EventArgs e)
  2030. {
  2031. GetInIronData();
  2032. }
  2033. private void ulbtnHisRequir_Click(object sender, EventArgs e)
  2034. {
  2035. frmRequryInIron frm1 = new frmRequryInIron();
  2036. frm1.MdiParent = this.MdiParent;
  2037. // frm3.RemotingHelp = this.RemotingHelp;
  2038. frm1.Show();
  2039. }
  2040. private void ulbtnRef2_Click(object sender, EventArgs e)
  2041. {
  2042. GetHtInIronData();
  2043. }
  2044. private void ulbtnAdd2_Click(object sender, EventArgs e)
  2045. {
  2046. setbutton2("2");
  2047. setucHtInIron("2");
  2048. SetMisnoNoEdite2();
  2049. SetGridNewIronData2();
  2050. }
  2051. private void ulbtnEdit2_Click(object sender, EventArgs e)
  2052. {
  2053. setbutton2("2");
  2054. setucHtInIron("2");
  2055. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  2056. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  2057. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  2058. ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
  2059. }
  2060. private void ulbtnDelete2_Click(object sender, EventArgs e)
  2061. {
  2062. if (ultHtInIronGrid.ActiveRow == null || ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
  2063. GetGridData2(); //初始化进铁记录
  2064. if (string.IsNullOrEmpty(ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text.Trim()))
  2065. {
  2066. MessageBox.Show("进铁序号不能为空,请选择进铁信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2067. return;
  2068. }
  2069. if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
  2070. MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
  2071. string strWhere = "where MISID='" + ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text + "'";
  2072. try
  2073. {
  2074. string strError = "";
  2075. //hengxing
  2076. //ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  2077. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  2078. // "DeleteHtIronData",
  2079. // new object[] { strWhere,
  2080. // ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text,
  2081. // Convert.ToDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text),
  2082. // ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Text,ArrayIronRow2}, out strError);
  2083. if (strError == "")
  2084. MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2085. else
  2086. MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  2087. }
  2088. catch (Exception ee)
  2089. {
  2090. string s = ee.Message;
  2091. }
  2092. GetHtInIronData();
  2093. }
  2094. private void ulbtnSave2_Click(object sender, EventArgs e)
  2095. {
  2096. if (CheckData2() == false)
  2097. {
  2098. MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2099. return;
  2100. }
  2101. InsertData2();
  2102. GetHtInIronData();
  2103. }
  2104. private void ulbtnCancel2_Click(object sender, EventArgs e)
  2105. {
  2106. setbutton2("1");
  2107. setucHtInIron("1");
  2108. ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "";
  2109. ultHtInIronGrid_AfterRowActivate_1(null, null);
  2110. }
  2111. private void ulbtnHisRequir2_Click(object sender, EventArgs e)
  2112. {
  2113. frmRequryhtInIron frm2 = new frmRequryhtInIron();
  2114. frm2.MdiParent = this.MdiParent;
  2115. // frm3.RemotingHelp = this.RemotingHelp;
  2116. frm2.Show();
  2117. }
  2118. private void ulbtnAdd3_Click(object sender, EventArgs e)
  2119. {
  2120. setbutton3("2");
  2121. setucHtInIron3("2");
  2122. SetMisnoNoEdite3();
  2123. SetGridNewIronData3();
  2124. }
  2125. private void ulbtnEdit3_Click(object sender, EventArgs e)
  2126. {
  2127. setbutton3("2");
  2128. setucHtInIron3("2");
  2129. SetMisnoNoEdite3();
  2130. }
  2131. private void ulbtnDelete3_Click(object sender, EventArgs e)
  2132. {
  2133. if (ultHtOutIronGrid.ActiveRow == null || ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
  2134. if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
  2135. MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
  2136. string strWhere = "where MISID='" + ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text + "'";
  2137. try
  2138. {
  2139. string strError = "";
  2140. //hengxing
  2141. //ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  2142. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  2143. // "DeleteHtOutIronData",
  2144. // new object[] { strWhere,
  2145. // ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text,
  2146. // Convert.ToDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text) }, out strError);
  2147. if (strError == "")
  2148. MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2149. else
  2150. MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  2151. }
  2152. catch (Exception ee)
  2153. {
  2154. string s = ee.Message;
  2155. }
  2156. GetHtOutIronData();
  2157. }
  2158. private void ulbtnSave3_Click(object sender, EventArgs e)
  2159. {
  2160. if (CheckData3() == false)
  2161. {
  2162. MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2163. return;
  2164. }
  2165. InsertData3();
  2166. GetHtOutIronData();
  2167. }
  2168. private void ulbtnCancel3_Click(object sender, EventArgs e)
  2169. {
  2170. setbutton3("1");
  2171. setucHtInIron3("1");
  2172. ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "";
  2173. ultHtOutIronGrid_Click(null, null);
  2174. }
  2175. private void ulbtnRef3_Click(object sender, EventArgs e)
  2176. {
  2177. GetHtOutIronData();
  2178. GetElementData();
  2179. }
  2180. private void ulbtnHisRequir3_Click(object sender, EventArgs e)
  2181. {
  2182. frmRequryhtoutIron frm3 = new frmRequryhtoutIron();
  2183. frm3.MdiParent = this.MdiParent;
  2184. frm3.Show();
  2185. }
  2186. private void ulbtnCVT1_Click(object sender, EventArgs e)
  2187. {
  2188. if (txtCVT1.Text.Trim().Length == 0)
  2189. {
  2190. MessageBox.Show("1#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2191. return;
  2192. }
  2193. if (ArrayIronRow4[0].Trim().Length > 0)
  2194. {
  2195. ArrayIronRow4[4] = txtCVT1.Text;
  2196. ArrayIronRow4[5] = "CVT";
  2197. SendIronToCvt();
  2198. ArrayIronRow4[0] = "";
  2199. ArrayIronRow4[1] = "";
  2200. ArrayIronRow4[2] = "";
  2201. ArrayIronRow4[3] = "";
  2202. ArrayIronRow4[4] = "";
  2203. ArrayIronRow4[5] = "";
  2204. ArrayIronRow4[6] = "";
  2205. ArrayIronRow4[7] = "";
  2206. GetHtOutIronData();
  2207. }
  2208. else
  2209. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2210. }
  2211. private void ulbtnCVT2_Click(object sender, EventArgs e)
  2212. {
  2213. if (txtCVT2.Text.Trim().Length == 0)
  2214. {
  2215. MessageBox.Show("2#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2216. return;
  2217. }
  2218. if (ArrayIronRow4[0].Trim().Length > 0)
  2219. {
  2220. ArrayIronRow4[4] = txtCVT2.Text;
  2221. ArrayIronRow4[5] = "CVT";
  2222. SendIronToCvt();
  2223. ArrayIronRow4[0] = "";
  2224. ArrayIronRow4[1] = "";
  2225. ArrayIronRow4[2] = "";
  2226. ArrayIronRow4[3] = "";
  2227. ArrayIronRow4[4] = "";
  2228. ArrayIronRow4[5] = "";
  2229. ArrayIronRow4[6] = "";
  2230. ArrayIronRow4[7] = "";
  2231. GetHtOutIronData();
  2232. }
  2233. else
  2234. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2235. }
  2236. private void ulbtnCVT3_Click(object sender, EventArgs e)
  2237. {
  2238. if (txtCVT3.Text.Trim().Length == 0)
  2239. {
  2240. MessageBox.Show("3#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2241. return;
  2242. }
  2243. if (ArrayIronRow4[0].Trim().Length > 0)
  2244. {
  2245. ArrayIronRow4[4] = txtCVT3.Text;
  2246. ArrayIronRow4[5] = "CVT";
  2247. SendIronToCvt();
  2248. ArrayIronRow4[0] = "";
  2249. ArrayIronRow4[1] = "";
  2250. ArrayIronRow4[2] = "";
  2251. ArrayIronRow4[3] = "";
  2252. ArrayIronRow4[4] = "";
  2253. ArrayIronRow4[5] = "";
  2254. ArrayIronRow4[6] = "";
  2255. ArrayIronRow4[7] = "";
  2256. GetHtOutIronData();
  2257. }
  2258. else
  2259. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2260. }
  2261. private void ulbtnHMP1_Click(object sender, EventArgs e)
  2262. {
  2263. if (txtHMP1.Text.Trim().Length == 0)
  2264. {
  2265. MessageBox.Show("1#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2266. return;
  2267. }
  2268. if (ArrayIronRow4[0].Trim().Length > 0)
  2269. {
  2270. ArrayIronRow4[4] = _strHmp1No; // txtHMP1.Text;
  2271. ArrayIronRow4[5] = "HMP";
  2272. SendIronToCvt();
  2273. ArrayIronRow4[0] = "";
  2274. ArrayIronRow4[1] = "";
  2275. ArrayIronRow4[2] = "";
  2276. ArrayIronRow4[3] = "";
  2277. ArrayIronRow4[4] = "";
  2278. ArrayIronRow4[5] = "";
  2279. ArrayIronRow4[6] = "";
  2280. ArrayIronRow4[7] = "";
  2281. ArrayIronRow4[8] = "";
  2282. ArrayIronRow4[9] = "";
  2283. ArrayIronRow4[10] = "";
  2284. GetHtOutIronData();
  2285. }
  2286. else
  2287. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2288. }
  2289. private void ulbtnHMP2_Click(object sender, EventArgs e)
  2290. {
  2291. if (txtHMP2.Text.Trim().Length == 0)
  2292. {
  2293. MessageBox.Show("2#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2294. return;
  2295. }
  2296. if (ArrayIronRow4[0].Trim().Length > 0)
  2297. {
  2298. ArrayIronRow4[4] = _strHmp2No;// txtHMP2.Text;
  2299. ArrayIronRow4[5] = "HMP";
  2300. SendIronToCvt();
  2301. ArrayIronRow4[0] = "";
  2302. ArrayIronRow4[1] = "";
  2303. ArrayIronRow4[2] = "";
  2304. ArrayIronRow4[3] = "";
  2305. ArrayIronRow4[4] = "";
  2306. ArrayIronRow4[5] = "";
  2307. ArrayIronRow4[6] = "";
  2308. ArrayIronRow4[7] = "";
  2309. ArrayIronRow4[8] = "";
  2310. ArrayIronRow4[9] = "";
  2311. ArrayIronRow4[10] = "";
  2312. GetHtOutIronData();
  2313. }
  2314. else
  2315. MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2316. }
  2317. #endregion
  2318. /// <summary>
  2319. /// 获取铁包包龄
  2320. /// </summary>
  2321. /// <param name="strIronwrapID"></param>
  2322. /// <returns></returns>
  2323. private int GetIronwrapAge(string strIronwrapID,out string strStatus)
  2324. {
  2325. string strErr = "";
  2326. int intIronAge = 0;
  2327. string _strStatus = "";
  2328. object obj =null;// ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  2329. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  2330. // "GetIronwrapAge", new object[] { "res_mis_taphole", strIronwrapID }, out strErr);
  2331. if (strErr == "")
  2332. {
  2333. DataSet ds = (DataSet)obj;
  2334. if (ds.Tables.Count > 0)
  2335. {
  2336. if (ds.Tables[0].Rows.Count > 0)
  2337. {
  2338. intIronAge = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  2339. _strStatus = ds.Tables[0].Rows[0]["STATUS"].ToString();
  2340. }
  2341. }
  2342. }
  2343. strStatus = _strStatus;
  2344. return intIronAge;
  2345. }
  2346. private void ultraGrid4_KeyDown(object sender, KeyEventArgs e)
  2347. {
  2348. if (e.KeyCode != Keys.Enter)
  2349. return;
  2350. ultraGrid4.UpdateData();
  2351. string keyStr = ultraGrid4.ActiveCell.Column.Key;
  2352. double valueStr = 0;
  2353. string strFindName = "";
  2354. string strErr = "";
  2355. if (keyStr == "AllInrion" || keyStr == "OutIronAll" || keyStr == "ZhiDuiAll")
  2356. {
  2357. if (keyStr == "AllInrion") strFindName = "IMPORTIRONTOTAL";
  2358. if (keyStr == "OutIronAll") strFindName = "EXPORTIRONTOTAL";
  2359. if (keyStr == "ZhiDuiAll") strFindName = "SKIPIRONTOTAL";
  2360. try
  2361. {
  2362. if (ultraGrid4.ActiveCell.Value.ToString() != "")
  2363. {
  2364. valueStr = Convert.ToDouble(ultraGrid4.ActiveCell.Value);
  2365. object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  2366. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  2367. // "StatIronWeight", new object[] { this.Text.Substring(0, 1), strFindName, 0, valueStr, 2 }, out strErr);
  2368. if (strErr == "")
  2369. ultraGrid4.ActiveCell.Value = valueStr;
  2370. else
  2371. MessageBox.Show("修改数据失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  2372. }
  2373. }
  2374. catch (Exception ex)
  2375. {
  2376. string Msg = ex.Message;
  2377. MessageBox.Show("输入数据格式错误,请改正!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  2378. }
  2379. }
  2380. }
  2381. private void HeatNo_HudwId_Exist(string strID)
  2382. {
  2383. string strErr = "";
  2384. string strGw = "";
  2385. if (strID.Substring(0, 1) == "H" )
  2386. strGw = strID.Substring(0, 2);
  2387. else
  2388. strGw = strID.Substring(2, 1);
  2389. string obj = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
  2390. // "Core.LgMes.Server.lgJobMgt.classIronJob",
  2391. // "HeatNo_HudwId_Exist", new object[] { strID }, out strErr);
  2392. if (strErr == "")
  2393. {
  2394. switch (strGw)
  2395. {
  2396. case "H1":
  2397. _strSendSucceededForHmp1 = obj;
  2398. break;
  2399. case "H2":
  2400. _strSendSucceededForHmp2 = obj;
  2401. break;
  2402. case "1":
  2403. _strSendSucceededForBof1 = obj;
  2404. break;
  2405. case "2":
  2406. _strSendSucceededForBof2 = obj;
  2407. break;
  2408. case "3":
  2409. _strSendSucceededForBof3 = obj;
  2410. break;
  2411. default:
  2412. break;
  2413. }
  2414. }
  2415. }
  2416. private void ultHtInIronGrid_AfterRowActivate_1(object sender, EventArgs e)
  2417. {
  2418. Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtInIronGrid.ActiveRow;
  2419. // Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
  2420. if (aRow == null) return;
  2421. if (ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
  2422. try
  2423. {
  2424. ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = aRow.Cells["InIronNo"].Text;
  2425. ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = aRow.Cells["HighNo"].Value != System.DBNull.Value ? aRow.Cells["HighNo"].Text : "0";
  2426. ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value != System.DBNull.Value ? aRow.Cells["Tempture"].Text : "0";
  2427. ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
  2428. ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
  2429. ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
  2430. ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
  2431. ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = aRow.Cells["InTime"].Text;
  2432. ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
  2433. ucHtInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
  2434. ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = aRow.Cells["QuXiang"].Text;
  2435. ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
  2436. ucHtInIron1.ultraGrid1.Rows[0].Cells["Memo"].Value = aRow.Cells["Memo"].Text;
  2437. ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
  2438. ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
  2439. ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
  2440. ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
  2441. ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
  2442. ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
  2443. }
  2444. catch { }
  2445. }
  2446. private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  2447. {
  2448. if (e.Tab.Index == 1)
  2449. GetElementData();
  2450. }
  2451. }
  2452. }