FrmCasAffirm.cs 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  1. using System;
  2. using System.Data;
  3. using System.Drawing;
  4. using System.Collections;
  5. using System.ComponentModel;
  6. using System.Windows.Forms;
  7. using Infragistics.Win.UltraWinGrid;
  8. using Infragistics.Win;
  9. using CoreFS.CA06;
  10. //using Core.LgMes.Client.LgIntegrationQuery;
  11. using Core.Mes.Client.Common;
  12. namespace Core.LgMes.Client.LgDeviceManager
  13. {
  14. /// <summary>
  15. /// FrmCasAffirm 的摘要说明。
  16. /// </summary>
  17. public class FrmCasAffirm : FrmLgDevFunctions
  18. {
  19. private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
  20. private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
  21. private System.Windows.Forms.Button button3;
  22. private System.Windows.Forms.Button button2;
  23. private System.Windows.Forms.Button button1;
  24. private System.Windows.Forms.RadioButton radioButton2;
  25. private System.Windows.Forms.RadioButton radioButton1;
  26. private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
  27. private System.Windows.Forms.Label label1;
  28. private System.Windows.Forms.Label label2;
  29. private System.Windows.Forms.Label label3;
  30. private Infragistics.Win.UltraWinDataSource.UltraDataSource ultraDataSource1;
  31. private TextBox txtTemp;
  32. private Label lalTemp;
  33. private Label laltempFH;
  34. private Label lblDSPlaySteel;
  35. private Label lblSteel;
  36. private IContainer components;
  37. public FrmCasAffirm(OpeBase oba)
  38. {
  39. //
  40. // Windows 窗体设计器支持所必需的
  41. //
  42. InitializeComponent();
  43. ob = oba;
  44. //
  45. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  46. //
  47. }
  48. /// <summary>
  49. /// 清理所有正在使用的资源。
  50. /// </summary>
  51. protected override void Dispose(bool disposing)
  52. {
  53. if (disposing)
  54. {
  55. if (components != null)
  56. {
  57. components.Dispose();
  58. }
  59. }
  60. base.Dispose(disposing);
  61. }
  62. #region Windows 窗体设计器生成的代码
  63. /// <summary>
  64. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  65. /// 此方法的内容。
  66. /// </summary>
  67. private void InitializeComponent()
  68. {
  69. this.components = new System.ComponentModel.Container();
  70. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  71. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
  72. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("CVTPOS");
  73. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("LADLEID");
  74. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("LVL");
  75. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("POTSTATUS", -1, null, 0, Infragistics.Win.UltraWinGrid.SortIndicator.Descending, false);
  76. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("USETIMES");
  77. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("sendtime");
  78. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SENDID");
  79. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  80. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  81. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  82. Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
  83. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  84. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  85. Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
  86. Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
  87. Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
  88. Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
  89. Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
  90. Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
  91. Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn1 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("CVTPOS");
  92. Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn2 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("LADLEID");
  93. Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn3 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("LVL");
  94. Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn4 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("POTSTATUS");
  95. Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn5 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("USETIMES");
  96. Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn6 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("sendtime");
  97. Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn7 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("SENDID");
  98. this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
  99. this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
  100. this.lblDSPlaySteel = new System.Windows.Forms.Label();
  101. this.lblSteel = new System.Windows.Forms.Label();
  102. this.laltempFH = new System.Windows.Forms.Label();
  103. this.lalTemp = new System.Windows.Forms.Label();
  104. this.txtTemp = new System.Windows.Forms.TextBox();
  105. this.label3 = new System.Windows.Forms.Label();
  106. this.label2 = new System.Windows.Forms.Label();
  107. this.label1 = new System.Windows.Forms.Label();
  108. this.button3 = new System.Windows.Forms.Button();
  109. this.button2 = new System.Windows.Forms.Button();
  110. this.button1 = new System.Windows.Forms.Button();
  111. this.radioButton2 = new System.Windows.Forms.RadioButton();
  112. this.radioButton1 = new System.Windows.Forms.RadioButton();
  113. this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  114. this.ultraDataSource1 = new Infragistics.Win.UltraWinDataSource.UltraDataSource(this.components);
  115. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
  116. this.ultraExpandableGroupBox1.SuspendLayout();
  117. this.ultraExpandableGroupBoxPanel1.SuspendLayout();
  118. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
  119. ((System.ComponentModel.ISupportInitialize)(this.ultraDataSource1)).BeginInit();
  120. this.SuspendLayout();
  121. //
  122. // ultraExpandableGroupBox1
  123. //
  124. this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
  125. this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
  126. this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(0, 0);
  127. this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 239);
  128. this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
  129. this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(490, 120);
  130. this.ultraExpandableGroupBox1.TabIndex = 0;
  131. this.ultraExpandableGroupBox1.Text = "操作";
  132. //
  133. // ultraExpandableGroupBoxPanel1
  134. //
  135. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.lblDSPlaySteel);
  136. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.lblSteel);
  137. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.laltempFH);
  138. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.lalTemp);
  139. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.txtTemp);
  140. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.label3);
  141. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.label2);
  142. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.label1);
  143. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.button3);
  144. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.button2);
  145. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.button1);
  146. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.radioButton2);
  147. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.radioButton1);
  148. this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
  149. this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(3, 19);
  150. this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
  151. this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(484, 98);
  152. this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
  153. //
  154. // lblDSPlaySteel
  155. //
  156. this.lblDSPlaySteel.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)), true);
  157. this.lblDSPlaySteel.Location = new System.Drawing.Point(94, 67);
  158. this.lblDSPlaySteel.Name = "lblDSPlaySteel";
  159. this.lblDSPlaySteel.Size = new System.Drawing.Size(96, 20);
  160. this.lblDSPlaySteel.TabIndex = 302;
  161. //
  162. // lblSteel
  163. //
  164. this.lblSteel.AutoSize = true;
  165. this.lblSteel.Location = new System.Drawing.Point(23, 71);
  166. this.lblSteel.Name = "lblSteel";
  167. this.lblSteel.Size = new System.Drawing.Size(65, 12);
  168. this.lblSteel.TabIndex = 301;
  169. this.lblSteel.Text = "上一炉钢种";
  170. //
  171. // laltempFH
  172. //
  173. this.laltempFH.AutoSize = true;
  174. this.laltempFH.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  175. this.laltempFH.ForeColor = System.Drawing.Color.Blue;
  176. this.laltempFH.Location = new System.Drawing.Point(378, 12);
  177. this.laltempFH.Name = "laltempFH";
  178. this.laltempFH.Size = new System.Drawing.Size(21, 14);
  179. this.laltempFH.TabIndex = 9;
  180. this.laltempFH.Tag = "";
  181. this.laltempFH.Text = "℃";
  182. //
  183. // lalTemp
  184. //
  185. this.lalTemp.AutoSize = true;
  186. this.lalTemp.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  187. this.lalTemp.ForeColor = System.Drawing.Color.Blue;
  188. this.lalTemp.Location = new System.Drawing.Point(244, 12);
  189. this.lalTemp.Name = "lalTemp";
  190. this.lalTemp.Size = new System.Drawing.Size(70, 14);
  191. this.lalTemp.TabIndex = 8;
  192. this.lalTemp.Text = "钢包温度:";
  193. //
  194. // txtTemp
  195. //
  196. this.txtTemp.BackColor = System.Drawing.SystemColors.Window;
  197. this.txtTemp.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  198. this.txtTemp.Location = new System.Drawing.Point(320, 8);
  199. this.txtTemp.Name = "txtTemp";
  200. this.txtTemp.Size = new System.Drawing.Size(56, 21);
  201. this.txtTemp.TabIndex = 7;
  202. this.txtTemp.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTemp_KeyPress);
  203. //
  204. // label3
  205. //
  206. this.label3.AutoSize = true;
  207. this.label3.Location = new System.Drawing.Point(96, 71);
  208. this.label3.Name = "label3";
  209. this.label3.Size = new System.Drawing.Size(0, 12);
  210. this.label3.TabIndex = 0;
  211. //
  212. // label2
  213. //
  214. this.label2.AutoSize = true;
  215. this.label2.Location = new System.Drawing.Point(96, 42);
  216. this.label2.Name = "label2";
  217. this.label2.Size = new System.Drawing.Size(0, 12);
  218. this.label2.TabIndex = 0;
  219. //
  220. // label1
  221. //
  222. this.label1.AutoSize = true;
  223. this.label1.Location = new System.Drawing.Point(96, 14);
  224. this.label1.Name = "label1";
  225. this.label1.Size = new System.Drawing.Size(0, 12);
  226. this.label1.TabIndex = 0;
  227. //
  228. // button3
  229. //
  230. this.button3.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  231. this.button3.Location = new System.Drawing.Point(400, 38);
  232. this.button3.Name = "button3";
  233. this.button3.Size = new System.Drawing.Size(75, 23);
  234. this.button3.TabIndex = 0;
  235. this.button3.Text = "退出";
  236. this.button3.Click += new System.EventHandler(this.button3_Click);
  237. //
  238. // button2
  239. //
  240. this.button2.Location = new System.Drawing.Point(320, 38);
  241. this.button2.Name = "button2";
  242. this.button2.Size = new System.Drawing.Size(75, 23);
  243. this.button2.TabIndex = 0;
  244. this.button2.Text = "确认";
  245. this.button2.Click += new System.EventHandler(this.button2_Click);
  246. //
  247. // button1
  248. //
  249. this.button1.Location = new System.Drawing.Point(240, 38);
  250. this.button1.Name = "button1";
  251. this.button1.Size = new System.Drawing.Size(75, 23);
  252. this.button1.TabIndex = 0;
  253. this.button1.Text = "查询";
  254. this.button1.Click += new System.EventHandler(this.button1_Click);
  255. //
  256. // radioButton2
  257. //
  258. this.radioButton2.Location = new System.Drawing.Point(32, 37);
  259. this.radioButton2.Name = "radioButton2";
  260. this.radioButton2.Size = new System.Drawing.Size(64, 24);
  261. this.radioButton2.TabIndex = 0;
  262. this.radioButton2.Text = "2#转炉";
  263. //
  264. // radioButton1
  265. //
  266. this.radioButton1.Checked = true;
  267. this.radioButton1.Location = new System.Drawing.Point(32, 8);
  268. this.radioButton1.Name = "radioButton1";
  269. this.radioButton1.Size = new System.Drawing.Size(64, 24);
  270. this.radioButton1.TabIndex = 0;
  271. this.radioButton1.TabStop = true;
  272. this.radioButton1.Text = "1#转炉";
  273. //
  274. // ultraGrid1
  275. //
  276. this.ultraGrid1.DataSource = this.ultraDataSource1;
  277. appearance1.BackColor = System.Drawing.SystemColors.Window;
  278. appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption;
  279. this.ultraGrid1.DisplayLayout.Appearance = appearance1;
  280. ultraGridColumn1.Header.Caption = "转炉号";
  281. ultraGridColumn1.Header.VisiblePosition = 0;
  282. ultraGridColumn1.Width = 71;
  283. ultraGridColumn2.Header.Caption = "钢包号";
  284. ultraGridColumn2.Header.VisiblePosition = 1;
  285. ultraGridColumn2.Width = 74;
  286. ultraGridColumn3.Header.Caption = "等级";
  287. ultraGridColumn3.Header.VisiblePosition = 2;
  288. ultraGridColumn3.Width = 52;
  289. ultraGridColumn4.Header.Caption = "包况";
  290. ultraGridColumn4.Header.VisiblePosition = 3;
  291. ultraGridColumn4.Width = 93;
  292. ultraGridColumn5.Header.Caption = "使用次数";
  293. ultraGridColumn5.Header.VisiblePosition = 4;
  294. ultraGridColumn5.Width = 81;
  295. ultraGridColumn6.Header.Caption = "发送时间";
  296. ultraGridColumn6.Header.VisiblePosition = 5;
  297. ultraGridColumn6.Width = 119;
  298. ultraGridColumn7.Header.Caption = "发送编号";
  299. ultraGridColumn7.Header.VisiblePosition = 6;
  300. ultraGridColumn7.Hidden = true;
  301. ultraGridBand1.Columns.AddRange(new object[] {
  302. ultraGridColumn1,
  303. ultraGridColumn2,
  304. ultraGridColumn3,
  305. ultraGridColumn4,
  306. ultraGridColumn5,
  307. ultraGridColumn6,
  308. ultraGridColumn7});
  309. ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
  310. this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
  311. this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  312. appearance2.TextHAlignAsString = "Left";
  313. this.ultraGrid1.DisplayLayout.CaptionAppearance = appearance2;
  314. appearance3.BackColor = System.Drawing.SystemColors.ActiveBorder;
  315. appearance3.BackColor2 = System.Drawing.SystemColors.ControlDark;
  316. appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  317. appearance3.BorderColor = System.Drawing.SystemColors.Window;
  318. this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance3;
  319. appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
  320. this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance4;
  321. this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  322. this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
  323. appearance5.BackColor = System.Drawing.SystemColors.ControlLightLight;
  324. appearance5.BackColor2 = System.Drawing.SystemColors.Control;
  325. appearance5.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  326. appearance5.ForeColor = System.Drawing.SystemColors.GrayText;
  327. this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance5;
  328. this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
  329. this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
  330. appearance6.BackColor = System.Drawing.SystemColors.Window;
  331. appearance6.ForeColor = System.Drawing.SystemColors.ControlText;
  332. this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance6;
  333. appearance7.BackColor = System.Drawing.SystemColors.Highlight;
  334. appearance7.ForeColor = System.Drawing.SystemColors.HighlightText;
  335. this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance7;
  336. this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted;
  337. this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
  338. appearance8.BackColor = System.Drawing.SystemColors.Window;
  339. this.ultraGrid1.DisplayLayout.Override.CardAreaAppearance = appearance8;
  340. appearance9.BorderColor = System.Drawing.Color.Silver;
  341. appearance9.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
  342. this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance9;
  343. this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
  344. this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
  345. appearance10.BackColor = System.Drawing.SystemColors.Control;
  346. appearance10.BackColor2 = System.Drawing.SystemColors.ControlDark;
  347. appearance10.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
  348. appearance10.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  349. appearance10.BorderColor = System.Drawing.SystemColors.Window;
  350. this.ultraGrid1.DisplayLayout.Override.GroupByRowAppearance = appearance10;
  351. appearance11.TextHAlignAsString = "Left";
  352. this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance11;
  353. this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  354. this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  355. appearance12.BackColor = System.Drawing.SystemColors.Window;
  356. appearance12.BorderColor = System.Drawing.Color.Silver;
  357. this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance12;
  358. this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
  359. appearance13.BackColor = System.Drawing.SystemColors.ControlLight;
  360. this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance13;
  361. this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  362. this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  363. this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
  364. this.ultraGrid1.Location = new System.Drawing.Point(0, 0);
  365. this.ultraGrid1.Name = "ultraGrid1";
  366. this.ultraGrid1.Size = new System.Drawing.Size(490, 239);
  367. this.ultraGrid1.TabIndex = 0;
  368. this.ultraGrid1.Text = "钢包主要信息";
  369. this.ultraGrid1.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.ultraGrid1_InitializeRow);
  370. this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
  371. //
  372. // ultraDataSource1
  373. //
  374. this.ultraDataSource1.Band.Columns.AddRange(new object[] {
  375. ultraDataColumn1,
  376. ultraDataColumn2,
  377. ultraDataColumn3,
  378. ultraDataColumn4,
  379. ultraDataColumn5,
  380. ultraDataColumn6,
  381. ultraDataColumn7});
  382. //
  383. // FrmCasAffirm
  384. //
  385. this.AcceptButton = this.button2;
  386. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  387. this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(228)))), ((int)(((byte)(242)))));
  388. this.CancelButton = this.button3;
  389. this.ClientSize = new System.Drawing.Size(490, 359);
  390. this.Controls.Add(this.ultraGrid1);
  391. this.Controls.Add(this.ultraExpandableGroupBox1);
  392. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  393. this.MaximizeBox = false;
  394. this.MinimizeBox = false;
  395. this.Name = "FrmCasAffirm";
  396. this.ShowInTaskbar = false;
  397. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  398. this.Text = "钢包选择";
  399. this.Load += new System.EventHandler(this.FrmCasAffirm_Load);
  400. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
  401. this.ultraExpandableGroupBox1.ResumeLayout(false);
  402. this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
  403. this.ultraExpandableGroupBoxPanel1.PerformLayout();
  404. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
  405. ((System.ComponentModel.ISupportInitialize)(this.ultraDataSource1)).EndInit();
  406. this.ResumeLayout(false);
  407. }
  408. #endregion
  409. private DataSet _dsBigPot;
  410. //public RemotingHelp RemotingHelp;
  411. public bool _updateFlag = false;
  412. private void FrmCasAffirm_Load(object sender, System.EventArgs e)
  413. {
  414. GetData();
  415. }
  416. private void GetData() //显示待用状态的大包
  417. {
  418. try
  419. {
  420. string strErr = "";
  421. ArrayList arry = new ArrayList();
  422. arry.Add("CasGBComfirmPot_Load");
  423. CommonClientToServer ccs = new CommonClientToServer();
  424. ccs.ob = this.ob;
  425. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  426. if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
  427. {
  428. MessageBox.Show("钢包信息获取失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  429. return;
  430. }
  431. this.ultraDataSource1.Rows.Clear();
  432. if (ds == null) return;
  433. for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
  434. {
  435. try
  436. {
  437. DataRow dr = ds.Tables[0].Rows[i];
  438. this.ultraDataSource1.Rows.Add(new object[]{
  439. dr["CVTPOS"].ToString(),
  440. dr["LADLEID"].ToString(),
  441. dr["LVL"].ToString(),
  442. dr["POTSTATUS"].ToString(),
  443. dr["USETIMES"].ToString(),
  444. dr["sendtime"].ToString(),
  445. dr["SENDID"].ToString()
  446. });
  447. }
  448. catch { }
  449. }
  450. if (ds.Tables[0].Rows.Count > 0)
  451. {
  452. this.ultraGrid1.ActiveRow = this.ultraGrid1.Rows[0];
  453. this.ultraGrid1.Rows[0].Selected = true;
  454. }
  455. //_dsBigPot = null;// this.RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  456. //this.ultraGrid1.DataSource = _dsBigPot.Tables[0];
  457. }
  458. catch { }
  459. try
  460. {
  461. string strErr = "";
  462. ArrayList arry = new ArrayList();
  463. arry.Add("GetCvtCurrHeaNoID");
  464. CommonClientToServer ccs = new CommonClientToServer();
  465. ccs.ob = this.ob;
  466. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  467. if (strErr == "" && ds != null && ds.Tables.Count > 0)
  468. {
  469. for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
  470. {
  471. if (Convert.ToString(ds.Tables[0].Rows[i][1]) == "1" &&
  472. Convert.ToString(ds.Tables[0].Rows[i][1]).Length > 0)
  473. {
  474. this.label1.Text = Convert.ToString(ds.Tables[0].Rows[i][0]);
  475. }
  476. else if (Convert.ToString(ds.Tables[0].Rows[i][1]) == "2" &&
  477. Convert.ToString(ds.Tables[0].Rows[i][1]).Length > 0)
  478. {
  479. this.label2.Text = Convert.ToString(ds.Tables[0].Rows[i][0]);
  480. }
  481. }
  482. }
  483. }
  484. catch { }
  485. }
  486. private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
  487. {
  488. //Color myColor = Color.Silver;
  489. //switch (e.Row.Cells["CVTPOS"].Value.ToString())
  490. //{
  491. // case "1":
  492. // myColor = Color.NavajoWhite;
  493. // break;
  494. // case "2":
  495. // myColor = Color.NavajoWhite;
  496. // break;
  497. //}
  498. //e.Row.Appearance.BackColor = myColor;
  499. }
  500. private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
  501. {
  502. if (this.ultraGrid1.ActiveRow == null) return;
  503. switch (this.ultraGrid1.ActiveRow.Cells["CVTPOS"].Value.ToString())
  504. {
  505. case "1":
  506. this.radioButton1.Checked = true;
  507. break;
  508. case "2":
  509. this.radioButton2.Checked = true;
  510. break;
  511. }
  512. string strErr = "";
  513. string strPot = this.ultraGrid1.DisplayLayout.ActiveRow.Cells["LADLEID"].Value.ToString();
  514. ArrayList arry = new ArrayList();
  515. arry.Add("GetLastPlanSteel.Query");
  516. arry.Add(strPot);
  517. arry.Add(strPot);
  518. CommonClientToServer cctos = new CommonClientToServer();
  519. cctos.ob = this.ob;
  520. DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  521. "doSimpleQuery", arry, out strErr);
  522. if (strErr == "" && ds.Tables[0].Rows.Count > 0)
  523. {
  524. this.lblDSPlaySteel.ForeColor = Color.Red;
  525. this.lblDSPlaySteel.Text = ds.Tables[0].Rows[0][0].ToString();
  526. }
  527. }
  528. private void button1_Click(object sender, System.EventArgs e)
  529. {
  530. GetData();
  531. }
  532. private void button3_Click(object sender, System.EventArgs e)
  533. {
  534. this.Close();
  535. }
  536. private void button2_Click(object sender, System.EventArgs e)
  537. {
  538. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  539. if (ugr == null)
  540. {
  541. MessageBox.Show("请选择钢包!");
  542. return;
  543. }
  544. string strPot = ugr.Cells[1].Value.ToString();
  545. string strCvtPlan = ugr.Cells[0].Value.ToString();
  546. string strPotRank = ugr.Cells[2].Value.ToString();
  547. string strPotStatus = ugr.Cells[3].Value.ToString();
  548. string smeltingid = "";
  549. string strCvtName = "";
  550. string strMsg = "";
  551. string strCvtNum = "1";
  552. if (this.radioButton1.Checked)
  553. {
  554. strCvtNum = "1";
  555. strCvtName = this.radioButton1.Text;
  556. smeltingid = this.label1.Text;
  557. if (string.IsNullOrEmpty(smeltingid))
  558. {
  559. MessageBox.Show("1#转炉当前不在冶炼!");
  560. return;
  561. }
  562. }
  563. else if (this.radioButton2.Checked)
  564. {
  565. strCvtNum = "2";
  566. strCvtName = this.radioButton2.Text;
  567. smeltingid = this.label2.Text;
  568. if (string.IsNullOrEmpty(smeltingid))
  569. {
  570. MessageBox.Show("2#转炉当前不在冶炼!");
  571. return;
  572. }
  573. }
  574. strMsg = string.Format("是否确认将计划发送至{0}#转炉的{1}号钢包发送至{2}", strCvtPlan, strPot, strCvtName);
  575. DialogResult dr = MessageBox.Show(strMsg, "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
  576. if (dr == DialogResult.No) return;
  577. try
  578. {
  579. string sqlstr = "", strErr = "";
  580. object[] sArgs = new object[6];
  581. sArgs[0] = ugr.Cells[1].Value.ToString();//钢包号
  582. sArgs[1] = ugr.Cells[6].Value.ToString();//发送编号
  583. sArgs[2] = ugr.Cells[2].Value.ToString();//等级
  584. sArgs[3] = ugr.Cells[3].Value.ToString();//包况
  585. sArgs[4] = smeltingid.ToString();//炉号
  586. sArgs[5] = strCvtNum.ToString();//炉座
  587. //获取钢包等级
  588. ArrayList arryPlC = new ArrayList();
  589. arryPlC.Add("GBJiangLVL");
  590. arryPlC.Add(sArgs[0]);
  591. CommonClientToServer cctosJJLVL = new CommonClientToServer();
  592. cctosJJLVL.ob = this.ob;
  593. DataSet dsPLC = cctosJJLVL.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  594. "doSimpleQuery", arryPlC, out strErr);
  595. string strPotLvl = "";
  596. if (dsPLC != null && dsPLC.Tables[0].Rows.Count > 0)
  597. {
  598. strPotLvl = Convert.ToString(dsPLC.Tables[0].Rows[0][0]);
  599. }
  600. //根据发送编号修改钢包发送信息
  601. ArrayList arryS = new ArrayList();
  602. arryS.Add("GBSendInfo_Update");
  603. arryS.Add(sArgs[5]);
  604. arryS.Add(strPotLvl);
  605. arryS.Add(sArgs[3]);
  606. arryS.Add(sArgs[4]);
  607. arryS.Add(sArgs[1]);
  608. CommonClientToServer cctos = new CommonClientToServer();
  609. cctos.ob = this.ob;
  610. DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
  611. "doSimpleSave", arryS, out strErr);
  612. string err = "";
  613. string str = sArgs[2].ToString();
  614. //根据钢包号修改钢包基础信息
  615. ArrayList arryB = new ArrayList();
  616. arryB.Add("GBBaseInfo_Update");
  617. arryB.Add(sArgs[4]);
  618. arryB.Add(sArgs[4]);
  619. arryB.Add(sArgs[4]);
  620. arryB.Add(sArgs[0]);
  621. CommonClientToServer cctosB = new CommonClientToServer();
  622. cctosB.ob = this.ob;
  623. DataSet dsB = cctosB.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
  624. "doSimpleSave", arryB, out strErr);
  625. //获取钢包离开铸机时间
  626. ArrayList arryPl = new ArrayList();
  627. arryPl.Add("GetPotLeaveCcmTime");
  628. arryPl.Add(sArgs[0]);
  629. CommonClientToServer cctosPLC = new CommonClientToServer();
  630. cctosPLC.ob = this.ob;
  631. DataSet dsPLtime = cctosPLC.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  632. "doSimpleQuery", arryPl, out strErr);
  633. string flo = "";
  634. if (dsPLtime == null)
  635. flo = "0";
  636. flo = dsPLtime.Tables[0].Rows[0][0].ToString();
  637. //根据钢包号、周期编号修改钢包使用信息
  638. ArrayList arryUD = new ArrayList();
  639. arryUD.Add("GBUserDetail");
  640. arryUD.Add(sArgs[4]);
  641. arryUD.Add(dsPLtime.Tables[0].Rows.Count > 0 ? dsPLtime.Tables[0].Rows[0][0] : 0);//停罐时间
  642. arryUD.Add(strPotLvl);
  643. arryUD.Add(sArgs[0]);
  644. arryUD.Add(sArgs[0]);
  645. CommonClientToServer cctosUD = new CommonClientToServer();
  646. cctosUD.ob = this.ob;
  647. DataSet dsUD = cctosUD.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
  648. "doSimpleSave", arryUD, out strErr);
  649. string strRank = "";
  650. string strStatus = "";
  651. if (sArgs[2] != null) strRank = sArgs[2].ToString();
  652. if (sArgs[3] != null) strStatus = sArgs[3].ToString();
  653. if (strPotLvl != strRank)
  654. {
  655. strMsg = string.Format("{0}号钢包连铸下台时刻到确认时刻间隔{1}分钟,钢包等级变更为{2}", sArgs[0].ToString(), flo, strPotLvl);
  656. //strMsg = string.Format("{0}号钢包连铸下台时刻到确认时刻间隔{1}分钟,钢包等级变更为{2}", sArgs[0].ToString(), flo.ToString(), str);
  657. //根据钢包号更新钢包等级
  658. ArrayList arryPL = new ArrayList();
  659. arryPL.Add("PotLvl_Update");
  660. arryPL.Add(strPotLvl);
  661. arryPL.Add(sArgs[0]);
  662. CommonClientToServer cctosPL = new CommonClientToServer();
  663. cctosPL.ob = this.ob;
  664. DataSet dsPL = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
  665. "doSimpleSave", arryPL, out strErr);
  666. //根据发送编号更新钢包发送记录表等级
  667. ArrayList arrySG = new ArrayList();
  668. arrySG.Add("SendGrade_Update");
  669. arrySG.Add(strPotLvl);
  670. arrySG.Add(strMsg);
  671. arrySG.Add(sArgs[1]);
  672. CommonClientToServer cctosSG = new CommonClientToServer();
  673. cctosSG.ob = this.ob;
  674. DataSet dsSG = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
  675. "doSimpleSave", arrySG, out strErr);
  676. }
  677. // }
  678. try
  679. {
  680. //根据炉号修改转炉钢包信息
  681. ArrayList arryBPI = new ArrayList();
  682. arryBPI.Add("BofPOTInfo_Update");
  683. arryBPI.Add(sArgs[0]);
  684. arryBPI.Add(sArgs[0]);
  685. arryBPI.Add(strPotLvl);
  686. arryBPI.Add(strStatus);
  687. arryBPI.Add(txtTemp.Text);
  688. arryBPI.Add(sArgs[4]);
  689. CommonClientToServer cctosBPI = new CommonClientToServer();
  690. cctosBPI.ob = this.ob;
  691. DataSet dsBPI = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
  692. "doSimpleSave", arryBPI, out strErr);
  693. }
  694. catch { }
  695. //strErr = obj.ToString();
  696. if (strErr.Length > 0)
  697. {
  698. MessageBox.Show(strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  699. strPotRank = strErr.Substring(strErr.Length - 1, 1);
  700. }
  701. GetData();
  702. }
  703. catch { }
  704. }
  705. private void txtTemp_KeyPress(object sender, KeyPressEventArgs e)
  706. {
  707. if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b'))
  708. {
  709. e.Handled = true;
  710. }
  711. }
  712. }
  713. }