frmAdditStatHis.cs 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389
  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 CoreFS.CA06;
  8. using System.Diagnostics;
  9. using Infragistics.Win.UltraWinMaskedEdit;
  10. using Infragistics.Win.UltraWinGrid;
  11. using Infragistics.Win;
  12. using System.IO;
  13. namespace Core.LgMes.Client.LgIntegrationQuery
  14. {
  15. /// <summary>
  16. /// FrmAdditStat 的摘要说明。
  17. /// </summary>
  18. public class frmAdditStatHis : Core.Mes.Client.Common.frmStyleBase
  19. {
  20. #region " Construct "
  21. private System.Windows.Forms.Panel panel1;
  22. private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
  23. private Infragistics.Win.UltraWinTabControl.UltraTabControl ultraTabControl1;
  24. private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage1;
  25. private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl1;
  26. private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl2;
  27. private System.Windows.Forms.Label label2;
  28. private System.Windows.Forms.ComboBox comboBox2;
  29. private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
  30. private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid2;
  31. private System.Windows.Forms.Button button1;
  32. private System.Windows.Forms.DateTimePicker dateTimePicker1;
  33. private System.Windows.Forms.DateTimePicker dateTimePicker2;
  34. private System.Windows.Forms.Label label6;
  35. private System.Windows.Forms.CheckBox checkBox1;
  36. private System.Windows.Forms.CheckBox checkBox2;
  37. private System.Windows.Forms.CheckBox checkBox3;
  38. private System.Windows.Forms.CheckBox checkBox4;
  39. private ComboBox cboGW;
  40. private ComboBox cboGWID;
  41. private UltraMaskedEdit ultraMaskedEdit2;
  42. private UltraMaskedEdit ultraMaskedEdit1;
  43. private Button button2;
  44. private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter GridExcelExporter;
  45. private CheckBox chkSteel;
  46. private TextBox txtSteel;
  47. private System.ComponentModel.IContainer components;
  48. public frmAdditStatHis()
  49. {
  50. //
  51. // Windows 窗体设计器支持所必需的
  52. //
  53. InitializeComponent();
  54. //
  55. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  56. //
  57. }
  58. /// <summary>
  59. /// 清理所有正在使用的资源。
  60. /// </summary>
  61. protected override void Dispose(bool disposing)
  62. {
  63. if (disposing)
  64. {
  65. if (components != null)
  66. {
  67. components.Dispose();
  68. }
  69. }
  70. base.Dispose(disposing);
  71. }
  72. #region Windows 窗体设计器生成的代码
  73. /// <summary>
  74. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  75. /// 此方法的内容。
  76. /// </summary>
  77. private void InitializeComponent()
  78. {
  79. this.components = new System.ComponentModel.Container();
  80. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  81. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  82. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  83. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  84. Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
  85. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  86. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  87. Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
  88. Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
  89. Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
  90. Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
  91. Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
  92. Infragistics.Win.UltraWinTabControl.UltraTab ultraTab1 = new Infragistics.Win.UltraWinTabControl.UltraTab();
  93. Infragistics.Win.UltraWinTabControl.UltraTab ultraTab2 = new Infragistics.Win.UltraWinTabControl.UltraTab();
  94. Infragistics.Win.UltraWinEditors.EditorButton editorButton1 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
  95. Infragistics.Win.UltraWinEditors.EditorButton editorButton2 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
  96. Infragistics.Win.UltraWinEditors.EditorButton editorButton3 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
  97. Infragistics.Win.UltraWinEditors.EditorButton editorButton4 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
  98. this.ultraTabPageControl1 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl();
  99. this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  100. this.ultraTabPageControl2 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl();
  101. this.ultraGrid2 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  102. this.panel1 = new System.Windows.Forms.Panel();
  103. this.ultraTabControl1 = new Infragistics.Win.UltraWinTabControl.UltraTabControl();
  104. this.ultraTabSharedControlsPage1 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage();
  105. this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
  106. this.txtSteel = new System.Windows.Forms.TextBox();
  107. this.chkSteel = new System.Windows.Forms.CheckBox();
  108. this.button2 = new System.Windows.Forms.Button();
  109. this.comboBox2 = new System.Windows.Forms.ComboBox();
  110. this.ultraMaskedEdit2 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
  111. this.ultraMaskedEdit1 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
  112. this.cboGW = new System.Windows.Forms.ComboBox();
  113. this.cboGWID = new System.Windows.Forms.ComboBox();
  114. this.checkBox4 = new System.Windows.Forms.CheckBox();
  115. this.checkBox3 = new System.Windows.Forms.CheckBox();
  116. this.checkBox2 = new System.Windows.Forms.CheckBox();
  117. this.checkBox1 = new System.Windows.Forms.CheckBox();
  118. this.label6 = new System.Windows.Forms.Label();
  119. this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
  120. this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
  121. this.button1 = new System.Windows.Forms.Button();
  122. this.label2 = new System.Windows.Forms.Label();
  123. this.GridExcelExporter = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter(this.components);
  124. this.ultraTabPageControl1.SuspendLayout();
  125. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
  126. this.ultraTabPageControl2.SuspendLayout();
  127. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).BeginInit();
  128. this.panel1.SuspendLayout();
  129. ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl1)).BeginInit();
  130. this.ultraTabControl1.SuspendLayout();
  131. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
  132. this.ultraGroupBox1.SuspendLayout();
  133. this.SuspendLayout();
  134. //
  135. // ultraTabPageControl1
  136. //
  137. this.ultraTabPageControl1.Controls.Add(this.ultraGrid1);
  138. this.ultraTabPageControl1.Location = new System.Drawing.Point(2, 21);
  139. this.ultraTabPageControl1.Name = "ultraTabPageControl1";
  140. this.ultraTabPageControl1.Size = new System.Drawing.Size(900, 329);
  141. //
  142. // ultraGrid1
  143. //
  144. appearance1.TextHAlignAsString = "Left";
  145. this.ultraGrid1.DisplayLayout.CaptionAppearance = appearance1;
  146. appearance2.BackColor = System.Drawing.SystemColors.ActiveBorder;
  147. appearance2.BackColor2 = System.Drawing.SystemColors.ControlDark;
  148. appearance2.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  149. appearance2.BorderColor = System.Drawing.SystemColors.Window;
  150. this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance2;
  151. appearance3.ForeColor = System.Drawing.SystemColors.GrayText;
  152. this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance3;
  153. this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  154. this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
  155. appearance4.BackColor = System.Drawing.SystemColors.ControlLightLight;
  156. appearance4.BackColor2 = System.Drawing.SystemColors.Control;
  157. appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  158. appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
  159. this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance4;
  160. this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
  161. this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
  162. appearance5.FontData.SizeInPoints = 10F;
  163. this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance5;
  164. this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
  165. appearance6.FontData.SizeInPoints = 9F;
  166. appearance6.TextHAlignAsString = "Center";
  167. this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance6;
  168. this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  169. this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  170. this.ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
  171. this.ultraGrid1.DisplayLayout.Override.RowSelectorWidth = 25;
  172. this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  173. this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  174. this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
  175. this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
  176. this.ultraGrid1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  177. this.ultraGrid1.Location = new System.Drawing.Point(0, 0);
  178. this.ultraGrid1.Name = "ultraGrid1";
  179. this.ultraGrid1.Size = new System.Drawing.Size(900, 329);
  180. this.ultraGrid1.TabIndex = 20;
  181. //
  182. // ultraTabPageControl2
  183. //
  184. this.ultraTabPageControl2.Controls.Add(this.ultraGrid2);
  185. this.ultraTabPageControl2.Location = new System.Drawing.Point(-10000, -10000);
  186. this.ultraTabPageControl2.Name = "ultraTabPageControl2";
  187. this.ultraTabPageControl2.Size = new System.Drawing.Size(900, 329);
  188. //
  189. // ultraGrid2
  190. //
  191. appearance7.TextHAlignAsString = "Left";
  192. this.ultraGrid2.DisplayLayout.CaptionAppearance = appearance7;
  193. appearance8.BackColor = System.Drawing.SystemColors.ActiveBorder;
  194. appearance8.BackColor2 = System.Drawing.SystemColors.ControlDark;
  195. appearance8.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  196. appearance8.BorderColor = System.Drawing.SystemColors.Window;
  197. this.ultraGrid2.DisplayLayout.GroupByBox.Appearance = appearance8;
  198. appearance9.ForeColor = System.Drawing.SystemColors.GrayText;
  199. this.ultraGrid2.DisplayLayout.GroupByBox.BandLabelAppearance = appearance9;
  200. this.ultraGrid2.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  201. this.ultraGrid2.DisplayLayout.GroupByBox.Hidden = true;
  202. appearance10.BackColor = System.Drawing.SystemColors.ControlLightLight;
  203. appearance10.BackColor2 = System.Drawing.SystemColors.Control;
  204. appearance10.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  205. appearance10.ForeColor = System.Drawing.SystemColors.GrayText;
  206. this.ultraGrid2.DisplayLayout.GroupByBox.PromptAppearance = appearance10;
  207. this.ultraGrid2.DisplayLayout.MaxColScrollRegions = 1;
  208. this.ultraGrid2.DisplayLayout.MaxRowScrollRegions = 1;
  209. appearance11.FontData.SizeInPoints = 10F;
  210. this.ultraGrid2.DisplayLayout.Override.CellAppearance = appearance11;
  211. this.ultraGrid2.DisplayLayout.Override.CellPadding = 0;
  212. appearance12.FontData.SizeInPoints = 9F;
  213. appearance12.TextHAlignAsString = "Center";
  214. this.ultraGrid2.DisplayLayout.Override.HeaderAppearance = appearance12;
  215. this.ultraGrid2.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  216. this.ultraGrid2.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  217. this.ultraGrid2.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
  218. this.ultraGrid2.DisplayLayout.Override.RowSelectorWidth = 25;
  219. this.ultraGrid2.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  220. this.ultraGrid2.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  221. this.ultraGrid2.Dock = System.Windows.Forms.DockStyle.Fill;
  222. this.ultraGrid2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  223. this.ultraGrid2.Location = new System.Drawing.Point(0, 0);
  224. this.ultraGrid2.Name = "ultraGrid2";
  225. this.ultraGrid2.Size = new System.Drawing.Size(900, 329);
  226. this.ultraGrid2.TabIndex = 21;
  227. this.ultraGrid2.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.ultraGrid2_InitializeLayout);
  228. //
  229. // panel1
  230. //
  231. this.panel1.Controls.Add(this.ultraTabControl1);
  232. this.panel1.Controls.Add(this.ultraGroupBox1);
  233. this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
  234. this.panel1.Location = new System.Drawing.Point(0, 0);
  235. this.panel1.Name = "panel1";
  236. this.panel1.Size = new System.Drawing.Size(904, 437);
  237. this.panel1.TabIndex = 0;
  238. //
  239. // ultraTabControl1
  240. //
  241. this.ultraTabControl1.Controls.Add(this.ultraTabSharedControlsPage1);
  242. this.ultraTabControl1.Controls.Add(this.ultraTabPageControl1);
  243. this.ultraTabControl1.Controls.Add(this.ultraTabPageControl2);
  244. this.ultraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
  245. this.ultraTabControl1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  246. this.ultraTabControl1.Location = new System.Drawing.Point(0, 85);
  247. this.ultraTabControl1.MinTabWidth = 100;
  248. this.ultraTabControl1.Name = "ultraTabControl1";
  249. this.ultraTabControl1.SharedControlsPage = this.ultraTabSharedControlsPage1;
  250. this.ultraTabControl1.Size = new System.Drawing.Size(904, 352);
  251. this.ultraTabControl1.TabIndex = 5;
  252. ultraTab1.TabPage = this.ultraTabPageControl1;
  253. ultraTab1.Text = "金属料";
  254. ultraTab2.TabPage = this.ultraTabPageControl2;
  255. ultraTab2.Text = "辅料";
  256. this.ultraTabControl1.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] {
  257. ultraTab1,
  258. ultraTab2});
  259. this.ultraTabControl1.ViewStyle = Infragistics.Win.UltraWinTabControl.ViewStyle.VisualStudio2005;
  260. this.ultraTabControl1.SelectedTabChanged += new Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventHandler(this.ultraTabControl1_SelectedTabChanged);
  261. //
  262. // ultraTabSharedControlsPage1
  263. //
  264. this.ultraTabSharedControlsPage1.Location = new System.Drawing.Point(-10000, -10000);
  265. this.ultraTabSharedControlsPage1.Name = "ultraTabSharedControlsPage1";
  266. this.ultraTabSharedControlsPage1.Size = new System.Drawing.Size(900, 329);
  267. //
  268. // ultraGroupBox1
  269. //
  270. this.ultraGroupBox1.Controls.Add(this.txtSteel);
  271. this.ultraGroupBox1.Controls.Add(this.chkSteel);
  272. this.ultraGroupBox1.Controls.Add(this.button2);
  273. this.ultraGroupBox1.Controls.Add(this.comboBox2);
  274. this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit2);
  275. this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit1);
  276. this.ultraGroupBox1.Controls.Add(this.cboGW);
  277. this.ultraGroupBox1.Controls.Add(this.cboGWID);
  278. this.ultraGroupBox1.Controls.Add(this.checkBox4);
  279. this.ultraGroupBox1.Controls.Add(this.checkBox3);
  280. this.ultraGroupBox1.Controls.Add(this.checkBox2);
  281. this.ultraGroupBox1.Controls.Add(this.checkBox1);
  282. this.ultraGroupBox1.Controls.Add(this.label6);
  283. this.ultraGroupBox1.Controls.Add(this.dateTimePicker2);
  284. this.ultraGroupBox1.Controls.Add(this.dateTimePicker1);
  285. this.ultraGroupBox1.Controls.Add(this.button1);
  286. this.ultraGroupBox1.Controls.Add(this.label2);
  287. this.ultraGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
  288. this.ultraGroupBox1.Location = new System.Drawing.Point(0, 0);
  289. this.ultraGroupBox1.Name = "ultraGroupBox1";
  290. this.ultraGroupBox1.Size = new System.Drawing.Size(904, 85);
  291. this.ultraGroupBox1.TabIndex = 4;
  292. //
  293. // txtSteel
  294. //
  295. this.txtSteel.Enabled = false;
  296. this.txtSteel.Location = new System.Drawing.Point(511, 45);
  297. this.txtSteel.Name = "txtSteel";
  298. this.txtSteel.Size = new System.Drawing.Size(252, 21);
  299. this.txtSteel.TabIndex = 88;
  300. //
  301. // chkSteel
  302. //
  303. this.chkSteel.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  304. this.chkSteel.Location = new System.Drawing.Point(459, 43);
  305. this.chkSteel.Name = "chkSteel";
  306. this.chkSteel.Size = new System.Drawing.Size(56, 24);
  307. this.chkSteel.TabIndex = 87;
  308. this.chkSteel.Text = "钢种";
  309. this.chkSteel.CheckedChanged += new System.EventHandler(this.chkSteel_CheckedChanged);
  310. //
  311. // button2
  312. //
  313. this.button2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  314. this.button2.Location = new System.Drawing.Point(769, 41);
  315. this.button2.Name = "button2";
  316. this.button2.Size = new System.Drawing.Size(80, 28);
  317. this.button2.TabIndex = 86;
  318. this.button2.Text = "导出";
  319. this.button2.UseVisualStyleBackColor = false;
  320. this.button2.Click += new System.EventHandler(this.button2_Click);
  321. //
  322. // comboBox2
  323. //
  324. this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  325. this.comboBox2.Enabled = false;
  326. this.comboBox2.Location = new System.Drawing.Point(694, 14);
  327. this.comboBox2.Name = "comboBox2";
  328. this.comboBox2.Size = new System.Drawing.Size(69, 20);
  329. this.comboBox2.TabIndex = 54;
  330. //
  331. // ultraMaskedEdit2
  332. //
  333. editorButton1.Key = "edit";
  334. editorButton2.Key = "clear";
  335. this.ultraMaskedEdit2.ButtonsRight.Add(editorButton1);
  336. this.ultraMaskedEdit2.ButtonsRight.Add(editorButton2);
  337. this.ultraMaskedEdit2.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
  338. this.ultraMaskedEdit2.Enabled = false;
  339. this.ultraMaskedEdit2.Location = new System.Drawing.Point(102, 45);
  340. this.ultraMaskedEdit2.Name = "ultraMaskedEdit2";
  341. this.ultraMaskedEdit2.PromptChar = ' ';
  342. this.ultraMaskedEdit2.Size = new System.Drawing.Size(121, 21);
  343. this.ultraMaskedEdit2.TabIndex = 85;
  344. this.ultraMaskedEdit2.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraMaskedEdit1_EditorButtonClick);
  345. //
  346. // ultraMaskedEdit1
  347. //
  348. editorButton3.Key = "edit";
  349. editorButton4.Key = "clear";
  350. this.ultraMaskedEdit1.ButtonsRight.Add(editorButton3);
  351. this.ultraMaskedEdit1.ButtonsRight.Add(editorButton4);
  352. this.ultraMaskedEdit1.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
  353. this.ultraMaskedEdit1.Enabled = false;
  354. this.ultraMaskedEdit1.Location = new System.Drawing.Point(103, 14);
  355. this.ultraMaskedEdit1.Name = "ultraMaskedEdit1";
  356. this.ultraMaskedEdit1.PromptChar = ' ';
  357. this.ultraMaskedEdit1.Size = new System.Drawing.Size(120, 21);
  358. this.ultraMaskedEdit1.TabIndex = 84;
  359. this.ultraMaskedEdit1.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraMaskedEdit1_EditorButtonClick);
  360. //
  361. // cboGW
  362. //
  363. this.cboGW.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  364. this.cboGW.Enabled = false;
  365. this.cboGW.Items.AddRange(new object[] {
  366. "转炉",
  367. "吹氩站",
  368. "精炼炉",
  369. "RH炉",
  370. "脱硫"});
  371. this.cboGW.Location = new System.Drawing.Point(232, 45);
  372. this.cboGW.Name = "cboGW";
  373. this.cboGW.Size = new System.Drawing.Size(71, 20);
  374. this.cboGW.TabIndex = 69;
  375. this.cboGW.SelectedIndexChanged += new System.EventHandler(this.cboGW_SelectedIndexChanged);
  376. //
  377. // cboGWID
  378. //
  379. this.cboGWID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  380. this.cboGWID.Enabled = false;
  381. this.cboGWID.Location = new System.Drawing.Point(310, 45);
  382. this.cboGWID.Name = "cboGWID";
  383. this.cboGWID.Size = new System.Drawing.Size(144, 20);
  384. this.cboGWID.TabIndex = 70;
  385. //
  386. // checkBox4
  387. //
  388. this.checkBox4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  389. this.checkBox4.Location = new System.Drawing.Point(643, 12);
  390. this.checkBox4.Name = "checkBox4";
  391. this.checkBox4.Size = new System.Drawing.Size(55, 24);
  392. this.checkBox4.TabIndex = 63;
  393. this.checkBox4.Text = "班组";
  394. this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
  395. //
  396. // checkBox3
  397. //
  398. this.checkBox3.Enabled = false;
  399. this.checkBox3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  400. this.checkBox3.Location = new System.Drawing.Point(259, 44);
  401. this.checkBox3.Name = "checkBox3";
  402. this.checkBox3.Size = new System.Drawing.Size(98, 24);
  403. this.checkBox3.TabIndex = 62;
  404. this.checkBox3.Text = "工序位置";
  405. this.checkBox3.Visible = false;
  406. this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
  407. //
  408. // checkBox2
  409. //
  410. this.checkBox2.Checked = true;
  411. this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked;
  412. this.checkBox2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  413. this.checkBox2.Location = new System.Drawing.Point(234, 12);
  414. this.checkBox2.Name = "checkBox2";
  415. this.checkBox2.Size = new System.Drawing.Size(70, 24);
  416. this.checkBox2.TabIndex = 61;
  417. this.checkBox2.Text = "时间从";
  418. this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
  419. //
  420. // checkBox1
  421. //
  422. this.checkBox1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  423. this.checkBox1.Location = new System.Drawing.Point(12, 12);
  424. this.checkBox1.Name = "checkBox1";
  425. this.checkBox1.Size = new System.Drawing.Size(88, 24);
  426. this.checkBox1.TabIndex = 60;
  427. this.checkBox1.Text = "熔炼号从";
  428. this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
  429. //
  430. // label6
  431. //
  432. this.label6.AutoSize = true;
  433. this.label6.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  434. this.label6.Location = new System.Drawing.Point(457, 17);
  435. this.label6.Name = "label6";
  436. this.label6.Size = new System.Drawing.Size(21, 14);
  437. this.label6.TabIndex = 59;
  438. this.label6.Text = "到";
  439. //
  440. // dateTimePicker2
  441. //
  442. this.dateTimePicker2.CustomFormat = "yyyy-MM-dd HH:mm:ss";
  443. this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
  444. this.dateTimePicker2.Location = new System.Drawing.Point(494, 14);
  445. this.dateTimePicker2.Name = "dateTimePicker2";
  446. this.dateTimePicker2.Size = new System.Drawing.Size(144, 21);
  447. this.dateTimePicker2.TabIndex = 58;
  448. //
  449. // dateTimePicker1
  450. //
  451. this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
  452. this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
  453. this.dateTimePicker1.Location = new System.Drawing.Point(310, 14);
  454. this.dateTimePicker1.Name = "dateTimePicker1";
  455. this.dateTimePicker1.Size = new System.Drawing.Size(144, 21);
  456. this.dateTimePicker1.TabIndex = 56;
  457. //
  458. // button1
  459. //
  460. this.button1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  461. this.button1.Location = new System.Drawing.Point(769, 10);
  462. this.button1.Name = "button1";
  463. this.button1.Size = new System.Drawing.Size(80, 28);
  464. this.button1.TabIndex = 55;
  465. this.button1.Text = "查询";
  466. this.button1.UseVisualStyleBackColor = false;
  467. this.button1.Click += new System.EventHandler(this.button1_Click);
  468. //
  469. // label2
  470. //
  471. this.label2.AutoSize = true;
  472. this.label2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  473. this.label2.Location = new System.Drawing.Point(65, 48);
  474. this.label2.Name = "label2";
  475. this.label2.Size = new System.Drawing.Size(21, 14);
  476. this.label2.TabIndex = 50;
  477. this.label2.Text = "到";
  478. //
  479. // frmAdditStatHis
  480. //
  481. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  482. this.ClientSize = new System.Drawing.Size(904, 437);
  483. this.Controls.Add(this.panel1);
  484. this.Name = "frmAdditStatHis";
  485. this.Text = "frmAdditStat";
  486. this.Load += new System.EventHandler(this.frmAdditStatHis_Load);
  487. this.ultraTabPageControl1.ResumeLayout(false);
  488. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
  489. this.ultraTabPageControl2.ResumeLayout(false);
  490. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).EndInit();
  491. this.panel1.ResumeLayout(false);
  492. ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl1)).EndInit();
  493. this.ultraTabControl1.ResumeLayout(false);
  494. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
  495. this.ultraGroupBox1.ResumeLayout(false);
  496. this.ultraGroupBox1.PerformLayout();
  497. this.ResumeLayout(false);
  498. }
  499. #endregion
  500. #endregion
  501. #region " Valiable "
  502. private DataSet _dsHj = new DataSet();
  503. private DataSet _dsFl = new DataSet();
  504. public string _strWhere = " where to_char(jobtime, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')";
  505. public string _strCob1 = "";
  506. public string _strCob2 = "";
  507. #endregion
  508. #region " Init "
  509. #region " 金属料 "
  510. private void InitData1()
  511. {
  512. try
  513. {
  514. UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
  515. band.Columns[0].Header.Caption = "加热处理号";
  516. band.Columns[0].Width = 80;
  517. band.Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  518. band.Columns[0].Hidden = true;
  519. band.Columns[1].Header.Caption = "熔炼号";
  520. band.Columns[1].Width = 80;
  521. band.Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  522. band.Columns[2].Header.Caption = "牌号";
  523. band.Columns[2].Width = 70;
  524. band.Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  525. band.Columns[3].Header.Caption = "设备号";
  526. band.Columns[3].Width = 60;
  527. band.Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  528. //band.Columns[2].Hidden = true;
  529. band.Columns[4].Header.Caption = "班次";
  530. band.Columns[4].Width = 60;
  531. band.Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  532. //band.Columns[2].Hidden = true;
  533. int intIronWsteel = 0;
  534. if (cboGW.Text == "转炉" && this.ultraTabControl1.Tabs[0].Selected == true)
  535. {
  536. band.Columns[5].Header.Caption = "铁水";
  537. band.Columns[5].Width = 60;
  538. band.Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  539. band.Columns[6].Header.Caption = "废钢";
  540. band.Columns[6].Width = 60;
  541. band.Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  542. intIronWsteel = 2;
  543. }
  544. string strSel = "";
  545. if (this.checkBox3.Checked)
  546. strSel = string.Format("MATERIELTYPE='HJ'"); ///, "BOF0" + Convert.ToString(this.cboGWID.SelectedIndex + 1));
  547. else
  548. strSel = "MATERIELTYPE='HJ'";
  549. DataRow[] drs = _dsGridInfo.Tables[0].Select(strSel);//, "wlbm ASC");
  550. int count = drs.Length;
  551. for (int i = 0; i < count; i++)
  552. {
  553. DataRow dr = drs[i];
  554. band.Columns[5 + intIronWsteel + i].Header.Caption = dr["materielforshort"].ToString();
  555. band.Columns[5 + intIronWsteel + i].Width = 70;
  556. band.Columns[5 + intIronWsteel + i].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;
  557. band.Columns[5 + intIronWsteel + i].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  558. band.Columns[5 + intIronWsteel + i].Format = "#########.00";
  559. }
  560. //band.Columns[6 + count].Hidden = true;
  561. //band.Columns[6 + count + 1].Hidden = true;
  562. this.ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = RowSelectorNumberStyle.RowIndex;
  563. if (band.Summaries.Count > 0 && band.Summaries.Count==count) return;
  564. band.Summaries.Clear();
  565. SummarySettings summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
  566. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  567. summary.DisplayFormat = "合计:";
  568. summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
  569. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  570. summary.DisplayFormat = "平均:";
  571. for (int i = 5; i < 5 + count + intIronWsteel; i++)
  572. {
  573. summary = band.Summaries.Add(SummaryType.Sum, band.Columns[i]);
  574. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  575. if (i > 4)
  576. summary.DisplayFormat = " {0:#####}";
  577. else
  578. summary.DisplayFormat = " {0:#####.000}";
  579. summary.Appearance.TextHAlign = HAlign.Right;
  580. summary.Appearance.ForeColor = Color.DarkBlue;
  581. summary.Appearance.BackColor = Color.White;
  582. summary = band.Summaries.Add(SummaryType.Average, band.Columns[i]);
  583. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  584. if (i > 4)
  585. summary.DisplayFormat = " {0:#####}";
  586. else
  587. summary.DisplayFormat = " {0:#####.000}";
  588. summary.Appearance.TextHAlign = HAlign.Right;
  589. summary.Appearance.ForeColor = Color.DarkBlue;
  590. summary.Appearance.BackColor = Color.White;
  591. }
  592. band.Override.SummaryFooterCaptionVisible = DefaultableBoolean.False;
  593. }
  594. catch
  595. { }
  596. }
  597. #endregion
  598. #region " 散装料 "
  599. private void InitData2()
  600. {
  601. try
  602. {
  603. UltraGridBand band = this.ultraGrid2.DisplayLayout.Bands[0];
  604. band.Columns[0].Header.Caption = "加热处理号";
  605. band.Columns[0].Width = 80;
  606. band.Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  607. band.Columns[0].Hidden = true;
  608. band.Columns[1].Header.Caption = "熔炼号";
  609. band.Columns[1].Width = 80;
  610. band.Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  611. band.Columns[2].Header.Caption = "牌号";
  612. band.Columns[2].Width = 70;
  613. band.Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  614. band.Columns[3].Header.Caption = "设备号";
  615. band.Columns[3].Width = 60;
  616. band.Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  617. //band.Columns[2].Hidden = true;
  618. band.Columns[4].Header.Caption = "班次";
  619. band.Columns[4].Width = 60;
  620. band.Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  621. //band.Columns[2].Hidden = true;
  622. string strSel = "";
  623. if (this.checkBox3.Checked)
  624. strSel = "MATERIELTYPE='FL'";//strSel = string.Format("wllx='FL' and lcwz='{0}'", "CVT0"+Convert.ToString(this.comboBox1.SelectedIndex+1));
  625. else
  626. strSel = "MATERIELTYPE='FL'";
  627. DataRow[] drs = _dsGridInfo.Tables[0].Select(strSel);
  628. int count = drs.Length;
  629. for (int i = 0; i < count; i++)
  630. {
  631. DataRow dr = drs[i];
  632. band.Columns[5 + i].Header.Caption = dr["materielforshort"].ToString();
  633. band.Columns[5 + i].Width = 85;
  634. band.Columns[5 + i].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;
  635. band.Columns[5 + i].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  636. band.Columns[5 + i].Format = "#########.00";
  637. //if (i >= count - 4) ////////////// add by tsh on 08-01-05
  638. //band.Columns[1 + i].Hidden = true;
  639. }
  640. this.ultraGrid2.DisplayLayout.Override.RowSelectorNumberStyle = RowSelectorNumberStyle.RowIndex;
  641. if (band.Summaries.Count > 0 && band.Summaries.Count == count) return;
  642. band.Summaries.Clear();
  643. SummarySettings summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
  644. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  645. summary.DisplayFormat = "合计:";
  646. summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
  647. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  648. summary.DisplayFormat = "平均:";
  649. for (int i = 5; i < 5 + count; i++)
  650. {
  651. summary = band.Summaries.Add(SummaryType.Sum, band.Columns[i]);
  652. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  653. if (i > 4)
  654. summary.DisplayFormat = " {0:#####}";
  655. else
  656. summary.DisplayFormat = " {0:#####.000}";
  657. summary.Appearance.TextHAlign = HAlign.Right;
  658. summary.Appearance.ForeColor = Color.DarkBlue;
  659. summary.Appearance.BackColor = Color.White;
  660. summary = band.Summaries.Add(SummaryType.Average, band.Columns[i]);
  661. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  662. if (i > 4)
  663. summary.DisplayFormat = " {0:#####}";
  664. else
  665. summary.DisplayFormat = " {0:#####.000}";
  666. summary.Appearance.TextHAlign = HAlign.Right;
  667. summary.Appearance.ForeColor = Color.DarkBlue;
  668. summary.Appearance.BackColor = Color.White;
  669. }
  670. band.Override.SummaryFooterCaptionVisible = DefaultableBoolean.False;
  671. }
  672. catch
  673. { }
  674. }
  675. #endregion
  676. #endregion
  677. #region " Control Events "
  678. private void EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  679. {
  680. UltraMaskedEdit ume = (UltraMaskedEdit)sender;
  681. switch (e.Button.Key)
  682. {
  683. case "edit":
  684. frmNumberWriter frm = new frmNumberWriter();
  685. frm._strText = ume.Text.Trim();
  686. frm.Location = GetChildWindowLocation(frm.Size);
  687. frm.ShowDialog();
  688. ume.Text = frm._strText;
  689. break;
  690. case "clear":
  691. if (ume.Text.Trim().Length > 0)
  692. {
  693. ume.Tag = ume.Text.Trim();
  694. ume.Text = "";
  695. }
  696. else
  697. {
  698. if (ume.Tag != null)
  699. ume.Text = ume.Tag.ToString();
  700. }
  701. break;
  702. }
  703. }
  704. //==========================================================
  705. // 获取子窗体弹出的位置坐标
  706. //==========================================================
  707. private Point GetChildWindowLocation(Size ChildWindowSize)
  708. {
  709. int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
  710. int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
  711. if (width > 0)
  712. width = Cursor.Position.X - width;
  713. else
  714. width = Cursor.Position.X;
  715. if (height > 0)
  716. height = Cursor.Position.Y - height + 10;
  717. else
  718. height = Cursor.Position.Y + 10;
  719. return new Point(width, height);
  720. }
  721. private void InitControl()
  722. {
  723. this.comboBox2.DataSource = BuildTableDuty();
  724. this.comboBox2.ValueMember = "id";
  725. this.comboBox2.DisplayMember = "name";
  726. if (_strCob2 == "")
  727. this.comboBox2.SelectedIndex = 0;
  728. else
  729. this.comboBox2.SelectedValue = _strCob2;
  730. //if (_strCob1 == "")
  731. // this.cboGWID.SelectedIndex = 0;
  732. //else
  733. // this.cboGWID.SelectedIndex = Convert.ToInt32(_strCob1.Substring(0,1))-1;
  734. }
  735. /// <summary>
  736. /// 初始化班次
  737. /// </summary>
  738. /// <returns></returns>
  739. private DataTable BuildTableDuty()
  740. {
  741. DataTable dt = new DataTable();
  742. DataColumn dc = new DataColumn("id", typeof(System.String));
  743. dt.Columns.Add(dc);
  744. dc = new DataColumn("name", typeof(System.String));
  745. dt.Columns.Add(dc);
  746. DataRow dr = dt.NewRow();
  747. dr[0] = "0";
  748. dr[1] = "全部";
  749. dt.Rows.Add(dr);
  750. dr = dt.NewRow();
  751. dr[0] = "1";
  752. dr[1] = "甲";
  753. dt.Rows.Add(dr);
  754. dr = dt.NewRow();
  755. dr[0] = "2";
  756. dr[1] = "乙";
  757. dt.Rows.Add(dr);
  758. dr = dt.NewRow();
  759. dr[0] = "3";
  760. dr[1] = "丙";
  761. dt.Rows.Add(dr);
  762. dr = dt.NewRow();
  763. dr[0] = "4";
  764. dr[1] = "丁";
  765. dt.Rows.Add(dr);
  766. dt.AcceptChanges();
  767. return dt;
  768. }
  769. #endregion
  770. #region " Control Events "
  771. private void ultraGrid2_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
  772. {
  773. UltraGridBand band = this.ultraGrid2.DisplayLayout.Bands[0];
  774. if (this.ultraGrid2.Rows.Count < 1) return;
  775. try
  776. {
  777. DateTime dtForeTime = Convert.ToDateTime(this.ultraGrid2.Rows[0].Cells[18].Value);
  778. DateTime dtCurrTime = dtForeTime;
  779. TimeSpan ts = new TimeSpan();
  780. for (int i = 1; i < this.ultraGrid2.Rows.Count; i++)
  781. {
  782. dtCurrTime = Convert.ToDateTime(this.ultraGrid2.Rows[i].Cells[18].Value);
  783. ts = dtCurrTime - dtForeTime;
  784. if (ts.Minutes > 99 || ts.Minutes < 0)
  785. this.ultraGrid2.Rows[i].Cells[20].Value = 0;
  786. else
  787. this.ultraGrid2.Rows[i].Cells[20].Value = ts.Minutes;
  788. dtForeTime = dtCurrTime;
  789. }
  790. }
  791. catch { }
  792. }
  793. private void checkBox1_CheckedChanged(object sender, System.EventArgs e)
  794. {
  795. this.ultraMaskedEdit1.Enabled = this.checkBox1.Checked;
  796. this.ultraMaskedEdit2.Enabled = this.checkBox1.Checked;
  797. }
  798. private void checkBox2_CheckedChanged(object sender, System.EventArgs e)
  799. {
  800. this.dateTimePicker1.Enabled = this.checkBox2.Checked;
  801. this.dateTimePicker2.Enabled = this.checkBox2.Checked;
  802. }
  803. private void checkBox3_CheckedChanged(object sender, System.EventArgs e)
  804. {
  805. this.cboGWID.Enabled = this.checkBox3.Checked;
  806. // this.cboGW.Enabled = this.checkBox3.Checked;
  807. }
  808. private void checkBox4_CheckedChanged(object sender, System.EventArgs e)
  809. {
  810. this.comboBox2.Enabled = this.checkBox4.Checked;
  811. }
  812. #endregion
  813. #region " InitGrid "
  814. private DataSet _dsGridInfo;
  815. private void GetGridInfo()
  816. {
  817. try
  818. {
  819. string addTalbeName = "";
  820. string strWhere = "";
  821. string strgw = Convert.ToString(GetGW(this.cboGW.SelectedIndex));
  822. string resTalbeName = TableName(strgw, out addTalbeName);
  823. if (checkBox2.Checked) //时间
  824. strWhere = " and a.updatetime>=to_date('" + dateTimePicker1.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') " +
  825. " and a.updatetime<=to_date('" + dateTimePicker2.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') ";
  826. else
  827. strWhere = " and a.updatetime>=to_date('" + System.DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:00" + "','yyyy-MM-dd HH24:mi:ss') " +
  828. " and a.updatetime<=to_date('" + System.DateTime.Today.ToString("yyyy-MM-dd") + " 23:59:59" + "','yyyy-MM-dd HH24:mi:ss') ";
  829. //if (Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)) != "0") //岗位
  830. // strWhere += " and a.stationcode='" + addTalbeName + "0" + Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)) + "'";
  831. //else
  832. // strWhere += " and a.stationcode like '" + addTalbeName + "%'";
  833. if (this.ultraTabControl1.Tabs[0].Selected == true)
  834. strWhere += " and a.MATERIELTYPE='HJ'";
  835. else
  836. strWhere += " and a.MATERIELTYPE='FL'";
  837. _dsGridInfo = null;//hengxing (DataSet)ClientCommon._RemotingHelp.ExecuteMethod("lgIntegrationQuery", "Core.LgMes.Server.lgIntegrationQuery.LgGeneralInfo", "GetAddGridInfoHis", new object[] { addTalbeName, strWhere }, out strOut);
  838. // _dsGridInfo = this.RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  839. }
  840. catch (Exception ex)
  841. {
  842. Console.WriteLine(ex.Message);
  843. }
  844. }
  845. private string GetSqlWhere2()
  846. {
  847. string str = "";
  848. if (this.checkBox4.Checked)
  849. {
  850. str = string.Format(" where substr(bc,2,1)='{0}' ", this.comboBox2.SelectedIndex + 1);
  851. }
  852. return str;
  853. }
  854. private string GetSqlWhere1()
  855. {
  856. string str = " where 1=1 ";
  857. if (this.checkBox1.Checked)
  858. {
  859. str += string.Format(" and (lh >= '{0}' and lh <= '{1}') ",
  860. this.ultraMaskedEdit1.Text.Trim(), this.ultraMaskedEdit2.Text.Trim());
  861. }
  862. if (this.checkBox2.Checked)
  863. {
  864. str += string.Format(" and (jlsk >= to_date('{0}','yyyy-MM-dd HH24:mi:ss') "
  865. + " and jlsk <= to_date('{1}','yyyy-MM-dd HH24:mi:ss')) ",
  866. this.dateTimePicker1.Text, this.dateTimePicker2.Text);
  867. }
  868. return str;
  869. }
  870. private void button1_Click(object sender, System.EventArgs e)
  871. {
  872. GetAdditStat();
  873. }
  874. /// <summary>
  875. /// 获取物料信息
  876. /// </summary>
  877. private void GetAdditStat()
  878. {
  879. string sqlstr;
  880. string addTalbeName = "";
  881. string strGw = Convert.ToString(GetGW(this.cboGW.SelectedIndex));
  882. string strGWID = Convert.ToString(this.cboGWID.SelectedIndex);
  883. string strWhere = "";
  884. GetGridInfo(); //初始化物料信息列名
  885. if (this.ultraTabControl1.Tabs[0].Selected == true)
  886. sqlstr = BuildSql(Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)), "HJ");
  887. else
  888. sqlstr = BuildSql(Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)), "FL");
  889. if (checkBox2.Checked) //时间
  890. strWhere = " and t.jmdate>=to_date('" + dateTimePicker1.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') " +
  891. " and t.jmdate<=to_date('" + dateTimePicker2.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') ";
  892. else
  893. strWhere = " and t.jmdate>=to_date('" + System.DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:00" +"','yyyy-MM-dd HH24:mi:ss') " +
  894. " and t.jmdate<=to_date('" + System.DateTime.Today.ToString("yyyy-MM-dd") + " 23:59:59" +"','yyyy-MM-dd HH24:mi:ss') ";
  895. try
  896. {
  897. string resTalbeName = TableName(strGw, out addTalbeName);
  898. if (this.ultraTabControl1.Tabs[0].Selected == true)
  899. {
  900. strWhere += " and t.MATERIELTYPE = 'HJ'";
  901. _dsHj = null;//hengxing (DataSet)ClientCommon._RemotingHelp.ExecuteMethod("lgIntegrationQuery", "Core.LgMes.Server.lgIntegrationQuery.LgGeneralInfo", "GetADDITIVESHis", new object[] { sqlstr, strWhere, resTalbeName, addTalbeName }, out strOut);
  902. // _dsHj = this.RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  903. DataTable dtHj = FormatData(_dsHj, "HJ");
  904. this.ultraGrid1.DataSource = dtHj;
  905. InitData1();
  906. }
  907. else
  908. {
  909. strWhere += " and t.MATERIELTYPE = 'FL'";
  910. _dsFl = null;//hengxing (DataSet)ClientCommon._RemotingHelp.ExecuteMethod("lgIntegrationQuery", "Core.LgMes.Server.lgIntegrationQuery.LgGeneralInfo", "GetADDITIVESHis", new object[] { sqlstr, strWhere, resTalbeName, addTalbeName }, out strOut);
  911. DataTable dtFl = FormatData(_dsFl, "FL");
  912. this.ultraGrid2.DataSource = dtFl;
  913. InitData2();
  914. // _dsFl = this.RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  915. // this.ultraGrid2.DataSource = _dsFl;
  916. // InitData2();
  917. }
  918. }
  919. catch (Exception ex)
  920. {
  921. Console.WriteLine(ex.Message);
  922. }
  923. }
  924. /// <summary>
  925. /// 将获取的数据序列化
  926. /// </summary>
  927. /// <param name="_dsFl"></param>
  928. /// <returns></returns>
  929. private DataTable FormatData(DataSet _dsFl,string Type)
  930. {
  931. DataTable dtFl = new DataTable();
  932. dtFl.Columns.Add("heatprocessno");
  933. dtFl.Columns.Add("heatno");
  934. dtFl.Columns.Add("STEEL");
  935. dtFl.Columns.Add("STATIONCODE");
  936. dtFl.Columns.Add("SHIFTCODE");
  937. if (cboGW.Text == "转炉" && Type =="HJ")
  938. {
  939. dtFl.Columns.Add("IRONPOTWGT"); //铁水
  940. dtFl.Columns.Add("WSTEELWGT"); //废钢
  941. }
  942. string strSel = "";
  943. if (this.checkBox3.Checked)
  944. strSel = "MATERIELTYPE='" + Type + "'";//strSel = string.Format("wllx='FL' and lcwz='{0}'", "CVT0"+Convert.ToString(this.comboBox1.SelectedIndex+1));
  945. else
  946. strSel = "MATERIELTYPE='" + Type + "'";
  947. DataRow[] drs = _dsGridInfo.Tables[0].Select(strSel);
  948. int count = drs.Length;
  949. for (int i = 0; i < count; i++)
  950. {
  951. DataRow dr = drs[i];
  952. dtFl.Columns.Add(dr[0].ToString() + "_" + dr[2].ToString().Substring(0, dr[2].ToString().IndexOf('-')));
  953. }
  954. bool bolIs = false;
  955. foreach (DataRow drfl in _dsFl.Tables[0].Rows)
  956. {
  957. foreach (DataRow Isdrfl in dtFl.Rows)
  958. {
  959. if (drfl["heatprocessno"].ToString() == Isdrfl["heatprocessno"].ToString())
  960. {
  961. bolIs = true;
  962. break;
  963. }
  964. }
  965. if (!bolIs)
  966. {
  967. DataRow drFL = dtFl.NewRow();
  968. drFL["heatprocessno"] = drfl["heatprocessno"].ToString();
  969. drFL["heatno"] = drfl["heatno"].ToString();
  970. drFL["STEEL"] = drfl["STEEL"].ToString();
  971. drFL["STATIONCODE"] = drfl["WSID"].ToString() + GetGW(drfl["STATIONCODE"].ToString());
  972. drFL["SHIFTCODE"] =GetBC( drfl["SHIFTCODE"].ToString());
  973. if (cboGW.Text == "转炉" && Type=="HJ")
  974. {
  975. drFL["IRONPOTWGT"] = drfl["IRONPOTWGT"].ToString();//铁水
  976. drFL["WSTEELWGT"] = drfl["WSTEELWGT"].ToString();//废钢
  977. }
  978. foreach (DataColumn dcfl in dtFl.Columns)
  979. {
  980. if (dcfl.ColumnName.ToString() == drfl["MATERIELCODE"].ToString() + "_" + drfl["hoppernumid"].ToString())
  981. {
  982. drFL[dcfl.ColumnName.ToString()] = drfl["JMWGT"].ToString();
  983. }
  984. }
  985. dtFl.Rows.Add(drFL);
  986. bolIs = false;
  987. }
  988. else
  989. {
  990. foreach (DataRow drFlvalue in dtFl.Rows)
  991. {
  992. if (drFlvalue["heatprocessno"].ToString() == drfl["heatprocessno"].ToString())
  993. {
  994. foreach (DataColumn dcfl in dtFl.Columns)
  995. {
  996. if (dcfl.ColumnName.ToString() == drfl["MATERIELCODE"].ToString() + "_" + drfl["hoppernumid"].ToString())
  997. {
  998. drFlvalue[dcfl.ColumnName.ToString()] = drfl["JMWGT"].ToString();
  999. }
  1000. }
  1001. bolIs = false;
  1002. }
  1003. }
  1004. }
  1005. }
  1006. return dtFl;
  1007. }
  1008. private string BuildSql(string wsid, string WlType)
  1009. {
  1010. string sqlstr = "";
  1011. if (checkBox2.Checked) //时间
  1012. sqlstr = " and a.optdate>=to_date('" + dateTimePicker1.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') " +
  1013. " and a.optdate<=to_date('" + dateTimePicker2.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') ";
  1014. else
  1015. sqlstr = " and a.optdate>=to_date('" + System.DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:00" + "','yyyy-MM-dd HH24:mi:ss') " +
  1016. " and a.optdate<=to_date('" + System.DateTime.Today.ToString("yyyy-MM-dd") + " 23:59:59" + "','yyyy-MM-dd HH24:mi:ss') ";
  1017. if (checkBox1.Checked) //熔炼号
  1018. {
  1019. if (!string.IsNullOrEmpty(ultraMaskedEdit1.Text) && !string.IsNullOrEmpty(ultraMaskedEdit2.Text))
  1020. {
  1021. if (string.Compare(ultraMaskedEdit1.Text.Trim(), ultraMaskedEdit2.Text.Trim()) != 1)
  1022. sqlstr += " and a.heatno>='" + ultraMaskedEdit1.Text.ToString() + "' and a.heatno<='" + ultraMaskedEdit2.Text.ToString() + "'";
  1023. else
  1024. MessageBox.Show("结束熔炼号不能大于开始熔炼号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  1025. }
  1026. else if (!string.IsNullOrEmpty(ultraMaskedEdit1.Text) && string.IsNullOrEmpty(ultraMaskedEdit2.Text))
  1027. sqlstr += " and a.heatno='" + ultraMaskedEdit1.Text.ToString() + "'";
  1028. else if (string.IsNullOrEmpty(ultraMaskedEdit1.Text) && !string.IsNullOrEmpty(ultraMaskedEdit2.Text))
  1029. sqlstr += " and a.heatno='" + ultraMaskedEdit2.Text.ToString() + "'";
  1030. }
  1031. if (wsid != "0") //岗位
  1032. sqlstr += " and a.stationcode='0" + wsid + "'";
  1033. if(checkBox4.Checked && this.comboBox2.SelectedIndex !=0 )
  1034. sqlstr += " and substr(SHIFTCODE,2,1)='" + comboBox2.SelectedIndex + "'";
  1035. //钢种
  1036. if (chkSteel.Checked && txtSteel.Text.Trim().Length > 0)
  1037. {
  1038. string strSteeAll = "", str = "";
  1039. string[] strSteel = txtSteel.Text.Split(',');
  1040. for (int i = 0; i < strSteel.Length; i++)
  1041. {
  1042. if (!string.IsNullOrEmpty(strSteel[i]))
  1043. strSteeAll = strSteeAll + "'" + strSteel[i] + "',";
  1044. }
  1045. str = strSteeAll.Substring(0, strSteeAll.Length - 1);
  1046. sqlstr += string.Format(" and a.plansteel in ({0})", str); // lower(b.jhgz)
  1047. }
  1048. //sqlstr += " and b.MATERIELTYPE='" + WlType + "'"; //物料类型(合金、辅料)
  1049. return sqlstr;
  1050. }
  1051. #endregion
  1052. private void ultraMaskedEdit1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1053. {
  1054. UltraMaskedEdit ume = (UltraMaskedEdit)sender;
  1055. switch (e.Button.Key)
  1056. {
  1057. case "edit":
  1058. frmNumberWriter frm = new frmNumberWriter();
  1059. frm._strText = ume.Text.Trim();
  1060. frm.Location = GetChildWindowLocation(frm.Size);
  1061. frm.ShowDialog();
  1062. ume.Text = frm._strText;
  1063. break;
  1064. case "clear":
  1065. if (ume.Text.Trim().Length > 0)
  1066. {
  1067. ume.Tag = ume.Text.Trim();
  1068. ume.Text = "";
  1069. }
  1070. else
  1071. {
  1072. if (ume.Tag != null)
  1073. ume.Text = ume.Tag.ToString();
  1074. }
  1075. break;
  1076. }
  1077. }
  1078. private void cboGW_SelectedIndexChanged(object sender, EventArgs e)
  1079. {
  1080. cboGWID.Items.Clear();
  1081. cboGWID.Items.AddRange(GetCWIDItems(cboGW.SelectedIndex));
  1082. cboGWID.SelectedIndex = 0;
  1083. }
  1084. /// <summary>
  1085. /// 初始化工位
  1086. /// </summary>
  1087. /// <param name="index"></param>
  1088. /// <returns></returns>
  1089. private object[] GetCWIDItems(int index)
  1090. {
  1091. switch (index)
  1092. {
  1093. case 0:
  1094. return new object[] { "所有", "1#转炉", "2#转炉", "3#转炉" };
  1095. case 1:
  1096. return new object[] { "所有", "1#吹氩站", "2#吹氩站", "3#吹氩站" };
  1097. case 2:
  1098. return new object[] { "所有", "1#精炼炉", "2#精炼炉" };
  1099. case 3:
  1100. return new object[] { "所有", "1#RH炉", "2#RH炉" };
  1101. case 4:
  1102. return new object[] { "所有", "1#脱硫", "2#脱硫" };
  1103. default:
  1104. return new object[] { "所有岗位" };
  1105. }
  1106. }
  1107. /// <summary>
  1108. /// 岗位编码
  1109. /// </summary>
  1110. /// <param name="index"></param>
  1111. /// <returns></returns>
  1112. private string GetGW(int index)
  1113. {
  1114. switch (index)
  1115. {
  1116. case 0:
  1117. return "BOF0";
  1118. case 1:
  1119. return "CAS0";
  1120. case 2:
  1121. return "LFS0";
  1122. case 3:
  1123. return "RHS0";
  1124. case 4:
  1125. return "HMP0";
  1126. default:
  1127. return "0";
  1128. }
  1129. }
  1130. /// <summary>
  1131. /// 岗位名称
  1132. /// </summary>
  1133. /// <param name="index"></param>
  1134. /// <returns></returns>
  1135. private string GetGW(string GwID)
  1136. {
  1137. switch (GwID)
  1138. {
  1139. case "BOF0":
  1140. return "#转炉";
  1141. case "CAS0":
  1142. return "#吹氩";
  1143. case "LFS0":
  1144. return "#钢包";
  1145. case "RHS0":
  1146. return "RH炉";
  1147. case "HMP0":
  1148. return "脱硫";
  1149. default:
  1150. return "";
  1151. }
  1152. }
  1153. /// <summary>
  1154. /// 班别
  1155. /// </summary>
  1156. /// <param name="index"></param>
  1157. /// <returns></returns>
  1158. private string GetBC(string bcID)
  1159. {
  1160. string bb = "";
  1161. if (bcID.Length > 1) bb = bcID.Substring(1, 1);
  1162. switch (bb)
  1163. {
  1164. case "1":
  1165. return "甲";
  1166. case "2":
  1167. return "乙";
  1168. case "3":
  1169. return "丙";
  1170. case "4":
  1171. return "丁";
  1172. default:
  1173. return "";
  1174. }
  1175. }
  1176. /// <summary>
  1177. /// 根据岗位获取表名
  1178. /// </summary>
  1179. /// <param name="GWID">岗位</param>
  1180. /// <param name="addTableName">物料表</param>
  1181. /// <returns>返回实绩信息表</returns>
  1182. private string TableName(string GWID, out string addTableName)
  1183. {
  1184. string resTableName = "";
  1185. string addtableName = "";
  1186. switch (GWID)
  1187. {
  1188. case "BOF0":
  1189. resTableName = "JOB_BOF_Optinfo";
  1190. addtableName = "C";
  1191. break;
  1192. case "CAS0":
  1193. resTableName = "JOB_CAS_Optinfo";
  1194. addtableName = "D";
  1195. break;
  1196. case "RHS0":
  1197. resTableName = "JOB_RHS_Optinfo";
  1198. addtableName = "F";
  1199. break;
  1200. case "LFS0":
  1201. resTableName = "JOB_LFS_Optinfo";
  1202. addtableName = "E";
  1203. break;
  1204. case "HMP0":
  1205. resTableName = "JOB_HMP_Optinfo";
  1206. addtableName = "B";
  1207. break;
  1208. }
  1209. addTableName = addtableName;
  1210. return resTableName;
  1211. }
  1212. private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  1213. {
  1214. GetAdditStat();
  1215. }
  1216. private void ExportExcel()
  1217. {
  1218. try
  1219. {
  1220. string StrfileName = System.Windows.Forms.Application.StartupPath + "\\Report\\物料消耗明细.xls";
  1221. if(ultraTabControl1.SelectedTab.Index==0)
  1222. this.GridExcelExporter.Export(this.ultraGrid1, StrfileName);
  1223. else
  1224. this.GridExcelExporter.Export(this.ultraGrid2, StrfileName);
  1225. ProcessStartInfo p = new ProcessStartInfo(StrfileName);
  1226. p.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
  1227. p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
  1228. Process.Start(p);
  1229. }
  1230. catch (Exception ex)
  1231. {
  1232. MessageBox.Show(ex.Message + "\n处理方法:查看(" + System.Windows.Forms.Application.StartupPath + ")目录下是否有[ Report文件夹 ],如果没有请手动创建!");
  1233. }
  1234. }
  1235. private void button2_Click(object sender, EventArgs e)
  1236. {
  1237. ExportExcel();
  1238. }
  1239. private void chkSteel_CheckedChanged(object sender, EventArgs e)
  1240. {
  1241. txtSteel.Enabled = chkSteel.Checked;
  1242. }
  1243. private void frmAdditStatHis_Load(object sender, EventArgs e)
  1244. {
  1245. ultraGrid1.Font = new System.Drawing.Font("Tahoma", 9F);
  1246. ultraGrid2.Font = new System.Drawing.Font("Tahoma", 9F);
  1247. this.dateTimePicker1.Text = System.DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:00";
  1248. this.dateTimePicker2.Text = System.DateTime.Today.ToString("yyyy-MM-dd") + " 23:59:59";
  1249. cboGW.SelectedIndex = 0;
  1250. checkBox3.Checked = true;
  1251. InitControl();
  1252. GetGridInfo();
  1253. }
  1254. }
  1255. }