| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504 |
- using System;
- using System.Data;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using System.Diagnostics;
- using Infragistics.Win.UltraWinMaskedEdit;
- using Infragistics.Win.UltraWinGrid;
- using Infragistics.Win;
- using System.IO;
- using Core.StlMes.Client.LgCommon;
- using Core.Mes.Client.Comm.Control;
- namespace Core.StlMes.Client.LgIntegrationQuery
- {
- /// <summary>
- /// FrmAdditStat 的摘要说明。
- /// </summary>
- public class frmAdditStat : frmStyleBase
- {
- #region " Construct "系统自动生成的 窗口结构代码
- private System.Windows.Forms.Panel panel1;
- private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
- private Infragistics.Win.UltraWinTabControl.UltraTabControl ultraTabControl1;
- private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage1;
- private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl1;
- private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl2;
- private System.Windows.Forms.Label label2;
- private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
- private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid2;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.CheckBox chk_HeaNo;
- private System.Windows.Forms.CheckBox checkBox3;
- private System.Windows.Forms.CheckBox chk_Staticode;
- private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter GridExcelExporter;
- private CheckBox chkSteel;
- private TextBox txtSteel;
- private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtEndTime;
- private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtBeginTime;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor cboStaticode;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor cboGW;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor cboGWID;
- private Infragistics.Win.UltraWinEditors.UltraCheckEditor uCkEditorForFilter;
- private Label label1;
- private TextBox ultraMaskedEdit2;
- private TextBox ultraMaskedEdit1;
- private Label label3;
- private System.ComponentModel.IContainer components;
- public frmAdditStat()
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- //
- // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
- //
- }
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose(disposing);
- }
- #region Windows 窗体设计器生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinTabControl.UltraTab ultraTab1 = new Infragistics.Win.UltraWinTabControl.UltraTab();
- Infragistics.Win.UltraWinTabControl.UltraTab ultraTab2 = new Infragistics.Win.UltraWinTabControl.UltraTab();
- Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem3 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem12 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem5 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem6 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem7 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem8 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem9 = new Infragistics.Win.ValueListItem();
- this.ultraTabPageControl1 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl();
- this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.ultraTabPageControl2 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl();
- this.ultraGrid2 = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.panel1 = new System.Windows.Forms.Panel();
- this.ultraTabControl1 = new Infragistics.Win.UltraWinTabControl.UltraTabControl();
- this.ultraTabSharedControlsPage1 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage();
- this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.ultraMaskedEdit2 = new System.Windows.Forms.TextBox();
- this.ultraMaskedEdit1 = new System.Windows.Forms.TextBox();
- this.uCkEditorForFilter = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
- this.cboGWID = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.cboGW = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.cboStaticode = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.uldtEndTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
- this.uldtBeginTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
- this.txtSteel = new System.Windows.Forms.TextBox();
- this.chkSteel = new System.Windows.Forms.CheckBox();
- this.chk_Staticode = new System.Windows.Forms.CheckBox();
- this.checkBox3 = new System.Windows.Forms.CheckBox();
- this.chk_HeaNo = new System.Windows.Forms.CheckBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.GridExcelExporter = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter(this.components);
- this.ultraTabPageControl1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
- this.ultraTabPageControl2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).BeginInit();
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl1)).BeginInit();
- this.ultraTabControl1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
- this.ultraGroupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.uCkEditorForFilter)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboGWID)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboGW)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboStaticode)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).BeginInit();
- this.SuspendLayout();
- //
- // ultraTabPageControl1
- //
- this.ultraTabPageControl1.Controls.Add(this.ultraGrid1);
- this.ultraTabPageControl1.Location = new System.Drawing.Point(2, 21);
- this.ultraTabPageControl1.Name = "ultraTabPageControl1";
- this.ultraTabPageControl1.Size = new System.Drawing.Size(900, 349);
- //
- // ultraGrid1
- //
- appearance1.TextHAlignAsString = "Left";
- this.ultraGrid1.DisplayLayout.CaptionAppearance = appearance1;
- appearance2.BackColor = System.Drawing.SystemColors.ActiveBorder;
- appearance2.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance2.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
- appearance2.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance2;
- appearance3.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance3;
- this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
- appearance4.BackColor = System.Drawing.SystemColors.ControlLightLight;
- appearance4.BackColor2 = System.Drawing.SystemColors.Control;
- appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance4;
- this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
- this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
- appearance5.FontData.SizeInPoints = 10F;
- this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance5;
- this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
- appearance6.FontData.SizeInPoints = 9F;
- appearance6.TextHAlignAsString = "Center";
- this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance6;
- this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
- this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
- this.ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
- this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
- this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
- this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraGrid1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.ultraGrid1.Location = new System.Drawing.Point(0, 0);
- this.ultraGrid1.Name = "ultraGrid1";
- this.ultraGrid1.Size = new System.Drawing.Size(900, 349);
- this.ultraGrid1.TabIndex = 20;
- //
- // ultraTabPageControl2
- //
- this.ultraTabPageControl2.Controls.Add(this.ultraGrid2);
- this.ultraTabPageControl2.Location = new System.Drawing.Point(-10000, -10000);
- this.ultraTabPageControl2.Name = "ultraTabPageControl2";
- this.ultraTabPageControl2.Size = new System.Drawing.Size(900, 349);
- //
- // ultraGrid2
- //
- appearance7.TextHAlignAsString = "Left";
- this.ultraGrid2.DisplayLayout.CaptionAppearance = appearance7;
- appearance8.BackColor = System.Drawing.SystemColors.ActiveBorder;
- appearance8.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance8.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
- appearance8.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid2.DisplayLayout.GroupByBox.Appearance = appearance8;
- appearance9.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid2.DisplayLayout.GroupByBox.BandLabelAppearance = appearance9;
- this.ultraGrid2.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.ultraGrid2.DisplayLayout.GroupByBox.Hidden = true;
- appearance10.BackColor = System.Drawing.SystemColors.ControlLightLight;
- appearance10.BackColor2 = System.Drawing.SystemColors.Control;
- appearance10.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance10.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid2.DisplayLayout.GroupByBox.PromptAppearance = appearance10;
- this.ultraGrid2.DisplayLayout.MaxColScrollRegions = 1;
- this.ultraGrid2.DisplayLayout.MaxRowScrollRegions = 1;
- appearance11.FontData.SizeInPoints = 10F;
- this.ultraGrid2.DisplayLayout.Override.CellAppearance = appearance11;
- this.ultraGrid2.DisplayLayout.Override.CellPadding = 0;
- appearance12.FontData.SizeInPoints = 9F;
- appearance12.TextHAlignAsString = "Center";
- this.ultraGrid2.DisplayLayout.Override.HeaderAppearance = appearance12;
- this.ultraGrid2.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
- this.ultraGrid2.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
- this.ultraGrid2.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
- this.ultraGrid2.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
- this.ultraGrid2.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
- this.ultraGrid2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraGrid2.Font = new System.Drawing.Font("宋体", 9F);
- this.ultraGrid2.Location = new System.Drawing.Point(0, 0);
- this.ultraGrid2.Name = "ultraGrid2";
- this.ultraGrid2.Size = new System.Drawing.Size(900, 349);
- this.ultraGrid2.TabIndex = 21;
- //
- // panel1
- //
- this.panel1.Controls.Add(this.ultraTabControl1);
- this.panel1.Controls.Add(this.ultraGroupBox1);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel1.Location = new System.Drawing.Point(0, 0);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(904, 437);
- this.panel1.TabIndex = 0;
- //
- // ultraTabControl1
- //
- appearance19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(228)))), ((int)(((byte)(242)))));
- this.ultraTabControl1.Appearance = appearance19;
- this.ultraTabControl1.Controls.Add(this.ultraTabSharedControlsPage1);
- this.ultraTabControl1.Controls.Add(this.ultraTabPageControl1);
- this.ultraTabControl1.Controls.Add(this.ultraTabPageControl2);
- this.ultraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraTabControl1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.ultraTabControl1.Location = new System.Drawing.Point(0, 65);
- this.ultraTabControl1.MinTabWidth = 100;
- this.ultraTabControl1.Name = "ultraTabControl1";
- this.ultraTabControl1.SharedControlsPage = this.ultraTabSharedControlsPage1;
- this.ultraTabControl1.Size = new System.Drawing.Size(904, 372);
- this.ultraTabControl1.TabIndex = 5;
- ultraTab1.TabPage = this.ultraTabPageControl1;
- ultraTab1.Text = "金属料";
- ultraTab2.TabPage = this.ultraTabPageControl2;
- ultraTab2.Text = "辅料";
- this.ultraTabControl1.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] {
- ultraTab1,
- ultraTab2});
- this.ultraTabControl1.ViewStyle = Infragistics.Win.UltraWinTabControl.ViewStyle.VisualStudio2005;
- this.ultraTabControl1.SelectedTabChanged += new Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventHandler(this.ultraTabControl1_SelectedTabChanged);
- //
- // ultraTabSharedControlsPage1
- //
- this.ultraTabSharedControlsPage1.Location = new System.Drawing.Point(-10000, -10000);
- this.ultraTabSharedControlsPage1.Name = "ultraTabSharedControlsPage1";
- this.ultraTabSharedControlsPage1.Size = new System.Drawing.Size(900, 349);
- //
- // ultraGroupBox1
- //
- this.ultraGroupBox1.Controls.Add(this.txtSteel);
- this.ultraGroupBox1.Controls.Add(this.label3);
- this.ultraGroupBox1.Controls.Add(this.label1);
- this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit2);
- this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit1);
- this.ultraGroupBox1.Controls.Add(this.uCkEditorForFilter);
- this.ultraGroupBox1.Controls.Add(this.cboGWID);
- this.ultraGroupBox1.Controls.Add(this.cboGW);
- this.ultraGroupBox1.Controls.Add(this.cboStaticode);
- this.ultraGroupBox1.Controls.Add(this.uldtEndTime);
- this.ultraGroupBox1.Controls.Add(this.uldtBeginTime);
- this.ultraGroupBox1.Controls.Add(this.chkSteel);
- this.ultraGroupBox1.Controls.Add(this.chk_Staticode);
- this.ultraGroupBox1.Controls.Add(this.checkBox3);
- this.ultraGroupBox1.Controls.Add(this.chk_HeaNo);
- this.ultraGroupBox1.Controls.Add(this.label6);
- this.ultraGroupBox1.Controls.Add(this.label2);
- this.ultraGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
- this.ultraGroupBox1.Location = new System.Drawing.Point(0, 0);
- this.ultraGroupBox1.Name = "ultraGroupBox1";
- this.ultraGroupBox1.Size = new System.Drawing.Size(904, 65);
- this.ultraGroupBox1.TabIndex = 4;
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(367, 15);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(53, 12);
- this.label3.TabIndex = 296;
- this.label3.Text = " 岗 位";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(21, 14);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(41, 12);
- this.label1.TabIndex = 295;
- this.label1.Text = "时间从";
- //
- // ultraMaskedEdit2
- //
- this.ultraMaskedEdit2.Enabled = false;
- this.ultraMaskedEdit2.Location = new System.Drawing.Point(221, 37);
- this.ultraMaskedEdit2.MaxLength = 8;
- this.ultraMaskedEdit2.Name = "ultraMaskedEdit2";
- this.ultraMaskedEdit2.Size = new System.Drawing.Size(128, 21);
- this.ultraMaskedEdit2.TabIndex = 294;
- //
- // ultraMaskedEdit1
- //
- this.ultraMaskedEdit1.Enabled = false;
- this.ultraMaskedEdit1.Location = new System.Drawing.Point(91, 38);
- this.ultraMaskedEdit1.MaxLength = 8;
- this.ultraMaskedEdit1.Name = "ultraMaskedEdit1";
- this.ultraMaskedEdit1.Size = new System.Drawing.Size(104, 21);
- this.ultraMaskedEdit1.TabIndex = 293;
- //
- // uCkEditorForFilter
- //
- appearance13.BackColor = System.Drawing.Color.LimeGreen;
- appearance13.TextVAlignAsString = "Middle";
- this.uCkEditorForFilter.Appearance = appearance13;
- this.uCkEditorForFilter.BackColor = System.Drawing.Color.LimeGreen;
- this.uCkEditorForFilter.BackColorInternal = System.Drawing.Color.Transparent;
- this.uCkEditorForFilter.Location = new System.Drawing.Point(830, 7);
- this.uCkEditorForFilter.Name = "uCkEditorForFilter";
- this.uCkEditorForFilter.Size = new System.Drawing.Size(46, 20);
- this.uCkEditorForFilter.TabIndex = 292;
- this.uCkEditorForFilter.Text = "过滤";
- this.uCkEditorForFilter.Visible = false;
- this.uCkEditorForFilter.CheckedChanged += new System.EventHandler(this.uCkEditorForFilter_CheckedChanged);
- //
- // cboGWID
- //
- appearance14.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance14.BorderColor = System.Drawing.Color.Black;
- this.cboGWID.Appearance = appearance14;
- this.cboGWID.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.cboGWID.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.cboGWID.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.cboGWID.Location = new System.Drawing.Point(502, 11);
- this.cboGWID.Name = "cboGWID";
- this.cboGWID.Size = new System.Drawing.Size(146, 19);
- this.cboGWID.TabIndex = 285;
- this.cboGWID.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- //
- // cboGW
- //
- appearance15.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance15.BorderColor = System.Drawing.Color.Black;
- this.cboGW.Appearance = appearance15;
- this.cboGW.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.cboGW.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.cboGW.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- valueListItem1.DataValue = "0";
- valueListItem1.DisplayText = "转炉";
- valueListItem2.DataValue = "1";
- valueListItem2.DisplayText = "吹氩站";
- valueListItem3.DataValue = "2";
- valueListItem3.DisplayText = "精炼炉";
- valueListItem12.DataValue = "6";
- valueListItem12.DisplayText = "连铸";
- this.cboGW.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem1,
- valueListItem2,
- valueListItem3,
- valueListItem12});
- this.cboGW.Location = new System.Drawing.Point(425, 10);
- this.cboGW.Name = "cboGW";
- this.cboGW.Size = new System.Drawing.Size(65, 19);
- this.cboGW.TabIndex = 284;
- this.cboGW.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- this.cboGW.SelectionChanged += new System.EventHandler(this.cboGW_SelectionChanged);
- //
- // cboStaticode
- //
- appearance16.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance16.BorderColor = System.Drawing.Color.Black;
- this.cboStaticode.Appearance = appearance16;
- this.cboStaticode.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.cboStaticode.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.cboStaticode.Enabled = false;
- this.cboStaticode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- valueListItem5.DataValue = "0";
- valueListItem5.DisplayText = "全部";
- valueListItem6.DataValue = "1";
- valueListItem6.DisplayText = "甲班";
- valueListItem7.DataValue = "2";
- valueListItem7.DisplayText = "乙班";
- valueListItem8.DataValue = "3";
- valueListItem8.DisplayText = "丙班";
- valueListItem9.DataValue = "4";
- valueListItem9.DisplayText = "丁班";
- this.cboStaticode.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem5,
- valueListItem6,
- valueListItem7,
- valueListItem8,
- valueListItem9});
- this.cboStaticode.Location = new System.Drawing.Point(725, 10);
- this.cboStaticode.Name = "cboStaticode";
- this.cboStaticode.Size = new System.Drawing.Size(65, 19);
- this.cboStaticode.TabIndex = 283;
- this.cboStaticode.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- //
- // uldtEndTime
- //
- this.uldtEndTime.DateTime = new System.DateTime(2008, 11, 24, 0, 0, 0, 0);
- this.uldtEndTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
- this.uldtEndTime.FormatString = "";
- this.uldtEndTime.Location = new System.Drawing.Point(221, 11);
- this.uldtEndTime.MaskInput = "yyyy-mm-dd hh:mm";
- this.uldtEndTime.Name = "uldtEndTime";
- this.uldtEndTime.Size = new System.Drawing.Size(128, 21);
- this.uldtEndTime.TabIndex = 282;
- this.uldtEndTime.Value = new System.DateTime(2008, 11, 24, 0, 0, 0, 0);
- //
- // uldtBeginTime
- //
- this.uldtBeginTime.DateTime = new System.DateTime(2008, 11, 24, 0, 0, 0, 0);
- this.uldtBeginTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
- this.uldtBeginTime.FormatString = "";
- this.uldtBeginTime.Location = new System.Drawing.Point(68, 11);
- this.uldtBeginTime.MaskInput = "yyyy-mm-dd hh:mm";
- this.uldtBeginTime.Name = "uldtBeginTime";
- this.uldtBeginTime.Size = new System.Drawing.Size(128, 21);
- this.uldtBeginTime.TabIndex = 281;
- this.uldtBeginTime.Value = new System.DateTime(2008, 11, 24, 0, 0, 0, 0);
- //
- // txtSteel
- //
- this.txtSteel.Enabled = false;
- this.txtSteel.Location = new System.Drawing.Point(425, 35);
- this.txtSteel.MaxLength = 50;
- this.txtSteel.Name = "txtSteel";
- this.txtSteel.Size = new System.Drawing.Size(223, 21);
- this.txtSteel.TabIndex = 88;
- //
- // chkSteel
- //
- this.chkSteel.Font = new System.Drawing.Font("宋体", 9F);
- this.chkSteel.Location = new System.Drawing.Point(370, 34);
- this.chkSteel.Name = "chkSteel";
- this.chkSteel.Size = new System.Drawing.Size(66, 24);
- this.chkSteel.TabIndex = 87;
- this.chkSteel.Text = "牌 号";
- this.chkSteel.CheckedChanged += new System.EventHandler(this.chkSteel_CheckedChanged);
- //
- // chk_Staticode
- //
- this.chk_Staticode.Font = new System.Drawing.Font("宋体", 9F);
- this.chk_Staticode.Location = new System.Drawing.Point(664, 8);
- this.chk_Staticode.Name = "chk_Staticode";
- this.chk_Staticode.Size = new System.Drawing.Size(60, 24);
- this.chk_Staticode.TabIndex = 63;
- this.chk_Staticode.Text = " 班 组";
- this.chk_Staticode.CheckedChanged += new System.EventHandler(this.chk_Staticode_CheckedChanged);
- //
- // checkBox3
- //
- this.checkBox3.Enabled = false;
- this.checkBox3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.checkBox3.Location = new System.Drawing.Point(852, 42);
- this.checkBox3.Name = "checkBox3";
- this.checkBox3.Size = new System.Drawing.Size(82, 24);
- this.checkBox3.TabIndex = 62;
- this.checkBox3.Text = "工序位置";
- this.checkBox3.Visible = false;
- this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
- //
- // chk_HeaNo
- //
- this.chk_HeaNo.Font = new System.Drawing.Font("宋体", 9F);
- this.chk_HeaNo.Location = new System.Drawing.Point(12, 35);
- this.chk_HeaNo.Name = "chk_HeaNo";
- this.chk_HeaNo.Size = new System.Drawing.Size(73, 24);
- this.chk_HeaNo.TabIndex = 60;
- this.chk_HeaNo.Text = "熔炼号从";
- this.chk_HeaNo.CheckedChanged += new System.EventHandler(this.chk_HeaNo_CheckedChanged);
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Font = new System.Drawing.Font("宋体", 9F);
- this.label6.Location = new System.Drawing.Point(201, 14);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(17, 12);
- this.label6.TabIndex = 59;
- this.label6.Text = "到";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Font = new System.Drawing.Font("宋体", 9F);
- this.label2.Location = new System.Drawing.Point(201, 42);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(17, 12);
- this.label2.TabIndex = 50;
- this.label2.Text = "到";
- //
- // frmAdditStat
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.ClientSize = new System.Drawing.Size(904, 437);
- this.Controls.Add(this.panel1);
- this.Name = "frmAdditStat";
- this.Text = "物料消耗查询";
- this.Load += new System.EventHandler(this.frmAdditStat_Load);
- this.ultraTabPageControl1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
- this.ultraTabPageControl2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).EndInit();
- this.panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl1)).EndInit();
- this.ultraTabControl1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
- this.ultraGroupBox1.ResumeLayout(false);
- this.ultraGroupBox1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.uCkEditorForFilter)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboGWID)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboGW)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboStaticode)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- #endregion
- private DataSet _dsHj = new DataSet();
- private DataSet _dsPL = new DataSet();
- private DataSet _dsFl = new DataSet();
- private Hashtable tabSteel = new Hashtable();
- public string _strWhere = " where to_char(jobtime, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')";
- public string _strCob1 = "";
- public string _strCob2 = "";
- private DataSet _dsGridInfo = new DataSet();
- private void frmAdditStat_Load(object sender, System.EventArgs e)
- {
- this.uldtBeginTime.Text = System.DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:00";
- this.uldtEndTime.Text = System.DateTime.Today.ToString("yyyy-MM-dd") + " 23:59:59";
- initGW();
- initBZ();
- InitSteel();
- //GetGridInfo();
- }
- // 初始化Grind牌号
- /// <summary>
- /// 初始化Grind牌号
- /// </summary>
- private void InitSteel()
- {
- try
- {
- string strErr = "";
- ultraGrid1.DisplayLayout.ValueLists.Add("SteelCode");
- ultraGrid2.DisplayLayout.ValueLists.Add("SteelCode1");
- ArrayList arry = new ArrayList();
- arry.Add("ElementsSteel.Query");//此ID为XML文件ID
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet dsSteel = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- if (strErr == "" && dsSteel != null)
- {
- //初始经Grid牌号字段数据集
- for (int i = 0; i < dsSteel.Tables[0].Rows.Count; i++)
- {
- // ultraGrid1.DisplayLayout.ValueLists["SteelCode"].ValueListItems.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
- // ultraGrid2.DisplayLayout.ValueLists["SteelCode1"].ValueListItems.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
- tabSteel.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
- }
- //绑定单位
- //ultraGrid1.DisplayLayout.Bands[0].Columns["STEEL"].ValueList = ultraGrid1.DisplayLayout.ValueLists["SteelCode"];
- //ultraGrid2.DisplayLayout.Bands[0].Columns["STEEL"].ValueList = ultraGrid2.DisplayLayout.ValueLists["SteelCode1"];
- }
- }
- catch { }
- }
- // 金属料初始化
- /// <summary>
- /// 金属料初始化
- /// </summary>
- private void InitData1()
- {
- try
- {
- UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
- band.Columns[0].Header.Caption = "加热处理号";
- band.Columns[0].Width = 80;
- band.Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[0].Hidden = true;
- band.Columns[1].Header.Caption = "熔炼号";
- band.Columns[1].Width = 100;
- band.Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- band.Columns[2].Header.Caption = "牌号";
- band.Columns[2].Width = 100;
- band.Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[3].Header.Caption = "设备号";
- band.Columns[3].Width = 60;
- band.Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- //band.Columns[2].Hidden = true;
- band.Columns[4].Header.Caption = "班组";
- band.Columns[4].Width = 60;
- band.Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- //band.Columns[2].Hidden = true;
- int intIronWsteel = 0;
- if (cboGW.Text == "转炉" && this.ultraTabControl1.Tabs[0].Selected == true)
- {
- band.Columns[5].Header.Caption = "铁水";
- band.Columns[5].Width = 60;
- band.Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[6].Header.Caption = "生铁";
- band.Columns[6].Width = 60;
- band.Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[7].Header.Caption = "废钢";
- band.Columns[7].Width = 60;
- band.Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- intIronWsteel = 3;
- }
- string strSel = "";
- if (this.checkBox3.Checked)
- strSel = string.Format("MATERIELTYPE='HJ'"); ///, "BOF0" + Convert.ToString(this.cboGWID.SelectedIndex + 1));
- else
- strSel = "MATERIELTYPE='HJ'";
- DataRow[] drs = _dsGridInfo.Tables[0].Select(strSel);//, "wlbm ASC");
- int count = drs.Length;
- for (int i = 0; i < count; i++)
- {
- DataRow dr = drs[i];
- band.Columns[5 + intIronWsteel + i].Header.Caption = dr["materielforshort"].ToString();
- band.Columns[5 + intIronWsteel + i].Width = 70;
- band.Columns[5 + intIronWsteel + i].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;
- band.Columns[5 + intIronWsteel + i].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[5 + intIronWsteel + i].Format = "#########.00";
- }
- this.ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = RowSelectorNumberStyle.RowIndex;
- if (band.Summaries.Count > 0 && band.Summaries.Count == count) return;
- band.Summaries.Clear();
- SummarySettings summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- summary.DisplayFormat = "合计:";
- summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- summary.DisplayFormat = "平均:";
- for (int i = 5; i < 5 + count + intIronWsteel; i++)
- {
- summary = band.Summaries.Add(SummaryType.Sum, band.Columns[i]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- if (i > 4)
- summary.DisplayFormat = " {0:#####}";
- else
- summary.DisplayFormat = " {0:#####.000}";
- summary.Appearance.TextHAlign = HAlign.Right;
- summary.Appearance.ForeColor = Color.DarkBlue;
- summary.Appearance.BackColor = Color.White;
- summary = band.Summaries.Add(SummaryType.Average, band.Columns[i]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- if (i > 4)
- summary.DisplayFormat = " {0:#####}";
- else
- summary.DisplayFormat = " {0:#####.000}";
- summary.Appearance.TextHAlign = HAlign.Right;
- summary.Appearance.ForeColor = Color.DarkBlue;
- summary.Appearance.BackColor = Color.White;
- }
- band.Override.SummaryFooterCaptionVisible = DefaultableBoolean.False;
- }
- catch
- { }
- }
- // 散装料初始化
- /// <summary>
- /// 散装料初始化
- /// </summary>
- private void InitData2()
- {
- try
- {
- UltraGridBand band = this.ultraGrid2.DisplayLayout.Bands[0];
- band.Columns[0].Header.Caption = "加热处理号";
- band.Columns[0].Width = 80;
- band.Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[0].Hidden = true;
- band.Columns[1].Header.Caption = "熔炼号";
- band.Columns[1].Width = 100;
- band.Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[2].Header.Caption = "牌号";
- band.Columns[2].Width = 100;
- band.Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[3].Header.Caption = "设备号";
- band.Columns[3].Width = 60;
- band.Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- //band.Columns[2].Hidden = true;
- band.Columns[4].Header.Caption = "班组";
- band.Columns[4].Width = 60;
- band.Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- //band.Columns[2].Hidden = true;
- string strSel = "";
- if (this.checkBox3.Checked)
- strSel = "MATERIELTYPE='FL'";
- else
- strSel = "MATERIELTYPE='FL'";
- DataRow[] drs = _dsGridInfo.Tables[0].Select(strSel);
- int count = drs.Length;
- for (int i = 0; i < count; i++)
- {
- DataRow dr = drs[i];
- band.Columns[5 + i].Header.Caption = dr["materielforshort"].ToString();
- band.Columns[5 + i].Width = 85;
- band.Columns[5 + i].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;
- band.Columns[5 + i].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- band.Columns[5 + i].Format = "#########.00";
- }
- this.ultraGrid2.DisplayLayout.Override.RowSelectorNumberStyle = RowSelectorNumberStyle.RowIndex;
- if (band.Summaries.Count > 0 && band.Summaries.Count == count) return;
- band.Summaries.Clear();
- SummarySettings summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- summary.DisplayFormat = "合计:";
- summary = band.Summaries.Add(SummaryType.Count, band.Columns[1]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- summary.DisplayFormat = "平均:";
- for (int i = 5; i < 5 + count; i++)
- {
- summary = band.Summaries.Add(SummaryType.Sum, band.Columns[i]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- if (i > 4)
- summary.DisplayFormat = " {0:#####}";
- else
- summary.DisplayFormat = " {0:#####.000}";
- summary.Appearance.TextHAlign = HAlign.Right;
- summary.Appearance.ForeColor = Color.DarkBlue;
- summary.Appearance.BackColor = Color.White;
- summary = band.Summaries.Add(SummaryType.Average, band.Columns[i]);
- summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
- if (i > 4)
- summary.DisplayFormat = " {0:#####}";
- else
- summary.DisplayFormat = " {0:#####.000}";
- summary.Appearance.TextHAlign = HAlign.Right;
- summary.Appearance.ForeColor = Color.DarkBlue;
- summary.Appearance.BackColor = Color.White;
- }
- band.Override.SummaryFooterCaptionVisible = DefaultableBoolean.False;
- }
- catch
- { }
- }
- // 初始化工位
- /// <summary>
- /// 初始化工位
- /// </summary>
- private void initGW()
- {
- cboGW.Items.Clear();
- //cboGW.Items.Add("SYGW", "所有工位");
- cboGW.Items.Add("HMP0", "脱硫站");
- cboGW.Items.Add("BOF0", "转炉");
- cboGW.Items.Add("CAS0", "吹氩站");
- cboGW.Items.Add("LFS0", "精炼炉");
- // cboGW.Items.Add("CCM0", "连铸机");
- cboGW.SelectedIndex = 0;
- }
- // 初始化班组
- /// <summary>
- /// 初始化班组
- /// </summary>
- private void initBZ()
- {
- cboStaticode.Items.Clear();
- cboStaticode.Items.Add("0", "所有");
- cboStaticode.Items.Add("1", "甲");
- cboStaticode.Items.Add("2", "乙");
- cboStaticode.Items.Add("3", "丙");
- cboStaticode.Items.Add("4", "丁");
- cboStaticode.SelectedIndex = 0;
- }
- #region " Control Events " 条件选择
- //private void ultraGrid2_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
- //{
- // UltraGridBand band = this.ultraGrid2.DisplayLayout.Bands[0];
- // if (this.ultraGrid2.Rows.Count < 1) return;
- // try
- // {
- // DateTime dtForeTime = Convert.ToDateTime(this.ultraGrid2.Rows[0].Cells[18].Value);
- // DateTime dtCurrTime = dtForeTime;
- // TimeSpan ts = new TimeSpan();
- // for (int i = 1; i < this.ultraGrid2.Rows.Count; i++)
- // {
- // dtCurrTime = Convert.ToDateTime(this.ultraGrid2.Rows[i].Cells[18].Value);
- // ts = dtCurrTime - dtForeTime;
- // if (ts.Minutes > 99 || ts.Minutes < 0)
- // this.ultraGrid2.Rows[i].Cells[20].Value = 0;
- // else
- // this.ultraGrid2.Rows[i].Cells[20].Value = ts.Minutes;
- // dtForeTime = dtCurrTime;
- // }
- // }
- // catch { }
- //}
- private void chk_HeaNo_CheckedChanged(object sender, EventArgs e)
- {
- this.ultraMaskedEdit1.Enabled = this.chk_HeaNo.Checked;
- this.ultraMaskedEdit2.Enabled = this.chk_HeaNo.Checked;
- if (!this.ultraMaskedEdit1.Enabled)
- {
- ultraMaskedEdit1.BackColor = Color.WhiteSmoke;
- }
- if (!this.ultraMaskedEdit2.Enabled)
- {
- ultraMaskedEdit2.BackColor = Color.WhiteSmoke;
- }
- }
- private void checkBox3_CheckedChanged(object sender, System.EventArgs e)
- {
- this.cboGWID.Enabled = this.checkBox3.Checked;
- this.cboGW.Enabled = this.checkBox3.Checked;
- }
- private void chk_Staticode_CheckedChanged(object sender, System.EventArgs e)
- {
- this.cboStaticode.Enabled = this.chk_Staticode.Checked;
- }
- #endregion
- //初始化物料信息列名
- /// <summary>
- /// 初始化物料信息列名
- /// </summary>
- private void GetGridInfo()
- {
- try
- {
- string strErr = "";
- string addTalbeName = "";
- string strWhere = "";
- string strgw = cboGW.Value.ToString();
- if (cboGW.SelectedIndex == -1)
- {
- strgw = "BOF0";
- }
- string strStartTime = "";
- string strEndTime = "";
- string strMType = "";
- string resTalbeName = TableName(strgw, out addTalbeName);
-
- if (Convert.ToDateTime(uldtBeginTime.Value) > Convert.ToDateTime(uldtEndTime.Value))
- {
- MessageBox.Show("时间条件的开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- else
- {
- strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd");
- strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd");
- }
-
- if (cboGWID.Value.ToString() != "0" ) //岗位
- strWhere += " and a.stationcode='" + addTalbeName + "0" + cboGWID.Value.ToString() + "'";
- else
- strWhere += " and a.stationcode like '" + addTalbeName + "%'";
- if (this.ultraTabControl1.Tabs[0].Selected == true)
- strMType = "HJ";
- else
- strMType = "FL";
- //定义一个ArrayList集合存储变量[参数]值
- string NowTime = DateTime.Now.ToString("yyyy-MM-dd");
- ArrayList arry = new ArrayList();
- arry.Add("frmAdditStat_Load.select");//此ID为XML文件ID
- arry.Add(strMType);
- arry.Add(strStartTime == "" ? NowTime : strStartTime);
- arry.Add(strEndTime == "" ? NowTime : strEndTime);
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- _dsGridInfo = ds;
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- // 获取物料信息
- /// <summary>
- /// 获取物料信息
- /// </summary>
- private void GetAdditStat()
- {
- string sqlstr;
- string addTalbeName = "";
- if (cboGW.Value == null) return;
- string strGw = cboGW.Value.ToString();
- string strGWID = cboGWID.Value.ToString();
- if (chk_HeaNo.Checked)
- {
- if (ultraMaskedEdit1.Text.Length == 0 && ultraMaskedEdit2.Text.Length == 0)
- {
- MessageBox.Show("炉号不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- ultraMaskedEdit1.Focus();
- return;
- }
- }
- if (chk_Staticode.Checked)
- {
- if (cboStaticode.SelectedIndex == -1)
- {
- MessageBox.Show("班组不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- cboStaticode.Focus();
- return;
- }
- }
- if (chkSteel.Checked)
- {
- if (txtSteel.Text.Length == 0)
- {
- MessageBox.Show("牌号不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- txtSteel.Focus();
- return;
- }
- }
- GetGridInfo(); //初始化物料信息列名
- if (this.ultraTabControl1.Tabs[0].Selected == true)
- sqlstr = BuildSql(strGWID, "HJ");
- else
- sqlstr = BuildSql(strGWID, "FL");
- try
- {
- string resTalbeName = TableName(strGw, out addTalbeName);
- string strIronWSteel = "";
- if (addTalbeName == "C")
- strIronWSteel = " ,IRONPOTWGT,PIGIRONWGT,WSTEELWGT ";
- string strWhereB = "";
- if (addTalbeName == "B")
- strWhereB = " where a.heatno =b.heatno and '" + addTalbeName + "'|| a.EQUIPMENTNO = b.stationcode ";
- else
- strWhereB = " where a.heatno =b.heatno and '" + addTalbeName + "'|| a.stationcode = b.stationcode and a.disposaltime = b.disposaltime ";
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- ArrayList sqlList = new ArrayList();
- arry.Add("frmAdditStat_Query.select");//此ID为XML文件ID
- sqlList.Add(strIronWSteel);
- sqlList.Add(strIronWSteel);
- sqlList.Add(resTalbeName);
- sqlList.Add(resTalbeName);
- sqlList.Add(strWhereB);
- sqlList.Add(sqlstr);
- //调用服务端方法
- CoreClientParam CCP_AStat = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_AStat.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_AStat.MethodName = "doQuery";
- CCP_AStat.ServerParams = new object[] { arry, sqlList };
- CCP_AStat.SourceDataTable = dt;
- this.ExecuteSortResultByQueryToDataTable(CCP_AStat, CoreInvokeType.Internal);
- DataTable dtHj = new DataTable();
- DataTable dtFl = new DataTable();
- _dsPL.Tables.Clear();
- _dsHj.Tables.Clear();
- if (dt.Rows.Count > 0)
- {
- if (this.ultraTabControl1.Tabs[0].Selected == true)
- {
- _dsHj.Tables.Add(dt);
- dtHj = FormatData(_dsHj, "HJ");
- this.ultraGrid1.DataSource = dtHj;
- InitData1();
- PublicMethod.RefreshAndAutoSize(ultraGrid1);
- }
- else
- {
- _dsPL.Tables.Add(dt);
- dtFl = FormatData(_dsPL, "FL");
- this.ultraGrid2.DataSource = dtFl;
- InitData2();
- PublicMethod.RefreshAndAutoSize(ultraGrid2);
- }
- }
- else
- {
- ultraGrid1.DataSource = null;
- ultraGrid2.DataSource = null;
- dtHj.Clear();
- dtFl.Clear();
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- // 将获取的数据序列化
- /// <summary>
- /// 将获取的数据序列化
- /// </summary>
- /// <param name="_dsFl"></param>
- /// <returns></returns>
- private DataTable FormatData(DataSet _dsFl, string Type)
- {
- DataTable dtFl = new DataTable();
- dtFl.Columns.Add("heatprocessno");
- dtFl.Columns.Add("heatno");
- dtFl.Columns.Add("STEEL");
- dtFl.Columns.Add("STATIONCODE");
- dtFl.Columns.Add("SHIFTCODE");
- if (cboGW.Text == "转炉" && Type == "HJ")
- {
- dtFl.Columns.Add("IRONPOTWGT"); //铁水
- dtFl.Columns.Add("PIGIRONWGT"); //生铁
- dtFl.Columns.Add("WSTEELWGT"); //废钢
- }
- string strSel = "";
- strSel = "MATERIELTYPE='" + Type + "'";
- DataRow[] drs = _dsGridInfo.Tables[0].Select(strSel);
- int count = drs.Length;
- for (int i = 0; i < count; i++)
- {
- DataRow dr = drs[i];
- dtFl.Columns.Add(dr[2].ToString());
- }
- dtFl.Columns.Add("OPTDATE");
- dtFl.Columns["OPTDATE"].Caption = "操作时间";
- bool bolIs = false;
- foreach (DataRow drfl in _dsFl.Tables[0].Rows)
- {
- foreach (DataRow Isdrfl in dtFl.Rows)
- {
- if (drfl["heatprocessno"].ToString() == Isdrfl["heatprocessno"].ToString())
- {
- bolIs = true;
- break;
- }
- }
- if (!bolIs)
- {
- DataRow drFL = dtFl.NewRow();
- drFL["heatprocessno"] = drfl["heatprocessno"].ToString();
- drFL["heatno"] = drfl["heatno"].ToString();
- drFL["STEEL"] = tabSteel[drfl["STEEL"].ToString()].ToString();
- drFL["STATIONCODE"] = drfl["WSID"].ToString() + GetGW(drfl["STATIONCODE"].ToString());
- drFL["OPTDATE"] = Convert.ToDateTime(drfl["OPTDATE"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
- if (drfl["SHIFTCODE"].ToString().Length > 1)
- {
- drFL["SHIFTCODE"] = GetBZ(drfl["SHIFTCODE"].ToString().Substring(1, 1));
- }
- else
- {
- drFL["SHIFTCODE"] = "未知";
- }
- if (cboGW.Text == "转炉" && Type == "HJ")
- {
- drFL["IRONPOTWGT"] = drfl["IRONPOTWGT"].ToString();//铁水
- drFL["PIGIRONWGT"] = drfl["PIGIRONWGT"].ToString();//废钢
- drFL["WSTEELWGT"] = drfl["WSTEELWGT"].ToString();//废钢
- }
- foreach (DataColumn dcfl in dtFl.Columns)
- {
- if (dcfl.ColumnName.ToString() == drfl["MATERIELNAME"].ToString())
- {
- drFL[dcfl.ColumnName.ToString()] = drfl["JMWGT"].ToString();
- }
- }
- dtFl.Rows.Add(drFL);
- bolIs = false;
- }
- else
- {
- foreach (DataRow drFlvalue in dtFl.Rows)
- {
- if (drFlvalue["heatprocessno"].ToString() == drfl["heatprocessno"].ToString())
- {
- foreach (DataColumn dcfl in dtFl.Columns)
- {
- if (dcfl.ColumnName.ToString() == drfl["MATERIELNAME"].ToString())
- {
- drFlvalue[dcfl.ColumnName.ToString()] = drfl["JMWGT"].ToString();
- }
- }
- bolIs = false;
- }
- }
- }
- }
- return dtFl;
- }
- // 查询条件
- /// <summary>
- /// 查询条件
- /// </summary>
- /// <returns>返回查询条件</returns>
- private string BuildSql(string wsid, string WlType)
- {
- string sqlstr = "";
- //时间
- sqlstr = " and a.optdate>=to_date('" + uldtBeginTime.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') " +
- " and a.optdate<=to_date('" + uldtEndTime.Value.ToString() + "','yyyy-MM-dd HH24:mi:ss') ";
- //熔炼号
- if (chk_HeaNo.Checked)
- {
- if (!string.IsNullOrEmpty(ultraMaskedEdit1.Text) && !string.IsNullOrEmpty(ultraMaskedEdit2.Text))
- {
- if (string.Compare(ultraMaskedEdit1.Text.Trim(), ultraMaskedEdit2.Text.Trim()) != 1)
- //sqlstr += " and a.heatno>='" + ultraMaskedEdit1.Text.ToString() + "' and a.heatno<='" + ultraMaskedEdit2.Text.ToString() + "'";
- sqlstr += " and a.heatno between'" + ultraMaskedEdit1.Text.ToString() + "' and '" + ultraMaskedEdit2.Text.ToString() + "'";
- else
- MessageBox.Show("结束熔炼号不能大于开始熔炼号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- else if (!string.IsNullOrEmpty(ultraMaskedEdit1.Text) && string.IsNullOrEmpty(ultraMaskedEdit2.Text))
- sqlstr += " and a.heatno like '" + ultraMaskedEdit1.Text.ToString() + "%'";
- else if (string.IsNullOrEmpty(ultraMaskedEdit1.Text) && !string.IsNullOrEmpty(ultraMaskedEdit2.Text))
- sqlstr += " and a.heatno like '" + ultraMaskedEdit2.Text.ToString() + "%'";
- }
- //岗位
- if (wsid != "0")
- sqlstr += " and a.stationcode='0" + wsid + "'";
-
- //班组
- if (chk_Staticode.Checked && this.cboStaticode.Value.ToString()!="0")
- sqlstr += " and substr(SHIFTCODE,2,1)='" + cboStaticode.Value.ToString() + "'";
-
- //钢种
- if (chkSteel.Checked && txtSteel.Text.Trim().Length > 0)
- {
- string strSteeAll = "", str = "";
- string[] strSteel = txtSteel.Text.Split(',');
- for (int i = 0; i < strSteel.Length; i++)
- {
- if (!string.IsNullOrEmpty(strSteel[i]))
- strSteeAll = strSteeAll + "'" + strSteel[i].ToUpper().Trim() + "'" + ",";
- }
- str = strSteeAll.Substring(0, strSteeAll.Length - 1);
- //sqlstr += " and a.plansteel in ('" + str + "')";
- sqlstr += string.Format(" and UPPER(a.plansteel) in ({0})", str); // lower(b.jhgz)
- }
- sqlstr += " and b.MATERIELTYPE='" + WlType + "'"; //物料类型(合金、辅料)
- return sqlstr;
- }
- private void ultraMaskedEdit1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- UltraMaskedEdit ume = (UltraMaskedEdit)sender;
- switch (e.Button.Key)
- {
- //case "edit":
- // frmNumberWriter frm = new frmNumberWriter();
- // frm._strText = ume.Text.Trim();
- // frm.Location = GetChildWindowLocation(frm.Size);
- // frm.ShowDialog();
- // ume.Text = frm._strText;
- // break;
- case "clear":
- if (ume.Text.Trim().Length > 0)
- {
- ume.Tag = ume.Text.Trim();
- ume.Text = "";
- }
- else
- {
- if (ume.Tag != null)
- ume.Text = ume.Tag.ToString();
- }
- break;
- }
- }
- private void cboGW_SelectedIndexChanged(object sender, EventArgs e)
- {
- cboGWID.Items.Clear();
- //cboGWID.Items.Add(GetCWIDItems(cboGW.SelectedIndex));
- cboGWID.SelectedIndex = 0;
- }
- public string GetBZ(string str)
- {
- switch (str)
- {
- case "1":
- return "甲班";
- case "2":
- return "乙班";
- case "3":
- return "丙班";
- case "4":
- return "丁班";
- default:
- return "";
- }
- }
- // 岗位名称
- /// <summary>
- /// 岗位名称
- /// </summary>
- /// <param name="index"></param>
- /// <returns></returns>
- private string GetGW(string GwID)
- {
- switch (GwID)
- {
- case "BOF0":
- return "#转炉";
- case "CAS0":
- return "#吹氩";
- case "LFS0":
- return "#钢包";
- case "HMP0":
- return "脱硫";
- default:
- return "";
- }
- }
- // 根据岗位获取表名
- /// <summary>
- /// 根据岗位获取表名
- /// </summary>
- /// <param name="GWID">岗位</param>
- /// <param name="addTableName">物料表</param>
- /// <returns>返回实绩信息表</returns>
- private string TableName(string GWID, out string addTableName)
- {
- string resTableName = "";
- string addtableName = "";
- switch (GWID)
- {
- case "HMP0":
- resTableName = "STL_HMP_Optinfo";
- addtableName = "B";
- break;
- case "BOF0":
- resTableName = "STL_BOF_Optinfo";
- addtableName = "C";
- break;
- case "CAS0":
- resTableName = "STL_CAS_Optinfo";
- addtableName = "D";
- break;
- case "RHS0":
- resTableName = "STL_RHS_Optinfo";
- addtableName = "F";
- break;
- case "LFS0":
- resTableName = "STL_LFS_Optinfo";
- addtableName = "E";
- break;
- default:
- resTableName = "STL_CCM_Optinfo";
- addtableName = "G";
- break;
- }
- addTableName = addtableName;
- return resTableName;
- }
- private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- GetAdditStat();
- }
- private void chkSteel_CheckedChanged(object sender, EventArgs e)
- {
- txtSteel.Enabled = chkSteel.Checked;
- if (!chkSteel.Checked)
- {
- txtSteel.BackColor = Color.WhiteSmoke;
- }
- }
- /// <summary>
- /// 系统功能
- /// </summary>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- GetAdditStat();
- break;
- case "Export":
- try
- {
- if (ultraTabControl1.SelectedTab.Text == "金属料")
- {
- //Core.Mes.Client.Common.Globals.ulGridToExcel(ultraGrid1, Text + "_金属料");
- GridHelper.ulGridToExcel(ultraGrid1, Text + "_金属料");
- }
- if (ultraTabControl1.SelectedTab.Text == "辅料")
- {
- //Core.Mes.Client.Common.Globals.ulGridToExcel(ultraGrid2, Text + "_辅料");
- GridHelper.ulGridToExcel(ultraGrid2, Text + "_辅料");
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- break;
- case "Exit":
- this.Close();
- break;
- default:
- break;
- }
- }
- // 工序位置选择
- /// <summary>
- /// 工序位置选择
- /// </summary>
- private void cboGW_SelectionChanged(object sender, EventArgs e)
- {
- cboGWID.Items.Clear();
- string gw = cboGW.Value.ToString();
- switch (gw)
- {
- case "BOF0":
- cboGWID.Items.Add("0", "所有");
- cboGWID.Items.Add("1", "1#转炉");
- cboGWID.Items.Add("2", "2#转炉");
- cboGWID.Items.Add("3", "3#转炉");
- cboGWID.Items.Add("4", "4#转炉");
- //cboGWID.Items.Add("5", "5#转炉");
- break;
- case "CAS0":
- cboGWID.Items.Add("0", "所有");
- cboGWID.Items.Add("1", "1#吹氩站");
- cboGWID.Items.Add("2", "2#吹氩站");
- cboGWID.Items.Add("3", "3#吹氩站");
- cboGWID.Items.Add("4", "4#吹氩站");
- //cboGWID.Items.Add("5", "5#吹氩站");
- break;
- case "LFS0":
- cboGWID.Items.Add("0", "所有");
- cboGWID.Items.Add("1", "1#精炼炉");
- cboGWID.Items.Add("2", "2#精炼炉");
- //cboGWID.Items.Add("3", "3#精炼炉");
- break;
- case "CCM0":
- cboGWID.Items.Add("0", "所有");
- cboGWID.Items.Add("1", "1#连铸");
- cboGWID.Items.Add("2", "2#连铸");
- cboGWID.Items.Add("3", "3#连铸");
- cboGWID.Items.Add("4", "2#连铸");
- cboGWID.Items.Add("5", "3#连铸");
- break;
- case "HMP0":
- cboGWID.Items.Add("0", "所有");
- cboGWID.Items.Add("1", "1#脱硫");
- cboGWID.Items.Add("2", "2#脱硫");
- break;
- case "SYGW":
- cboGWID.Items.Add("0", "所有岗位");
- break;
- default:
- cboGWID.Items.Add("0", "所有岗位");
- break;
- }
- cboGWID.SelectedIndex = 0;
- }
- private void uCkEditorForFilter_CheckedChanged(object sender, EventArgs e)
- {
- ClsControlPack.SetUltraGridRowFilter(ref this.ultraGrid1, uCkEditorForFilter.Checked);
- ClsControlPack.SetUltraGridRowFilter(ref this.ultraGrid2, uCkEditorForFilter.Checked);
- }
- }
- }
|