| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616 |
- 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.Mes.Client.Common;
- namespace Core.LgMes.Client.LgIntegrationQuery
- {
- /// <summary>
- /// FrmAdditStat 的摘要说明。
- /// </summary>
- public class frmAdditStat : Core.Mes.Client.Common.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 chk_Date;
- private System.Windows.Forms.CheckBox checkBox3;
- private System.Windows.Forms.CheckBox chk_Staticode;
- private UltraMaskedEdit ultraMaskedEdit2;
- private UltraMaskedEdit ultraMaskedEdit1;
- 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 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 valueListItem10 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem11 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem4 = 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();
- Infragistics.Win.UltraWinEditors.EditorButton editorButton1 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
- Infragistics.Win.UltraWinEditors.EditorButton editorButton2 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
- Infragistics.Win.UltraWinEditors.EditorButton editorButton3 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
- Infragistics.Win.UltraWinEditors.EditorButton editorButton4 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
- 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.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.ultraMaskedEdit2 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
- this.ultraMaskedEdit1 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
- this.chk_Staticode = new System.Windows.Forms.CheckBox();
- this.checkBox3 = new System.Windows.Forms.CheckBox();
- this.chk_Date = 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.Override.RowSelectorWidth = 25;
- 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("Tahoma", 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.Override.RowSelectorWidth = 25;
- 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("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- 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;
- this.ultraGrid2.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.ultraGrid2_InitializeLayout);
- //
- // 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.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.txtSteel);
- this.ultraGroupBox1.Controls.Add(this.chkSteel);
- this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit2);
- this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit1);
- this.ultraGroupBox1.Controls.Add(this.chk_Staticode);
- this.ultraGroupBox1.Controls.Add(this.checkBox3);
- this.ultraGroupBox1.Controls.Add(this.chk_Date);
- 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;
- //
- // 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(791, 10);
- this.uCkEditorForFilter.Name = "uCkEditorForFilter";
- this.uCkEditorForFilter.Size = new System.Drawing.Size(46, 20);
- this.uCkEditorForFilter.TabIndex = 292;
- this.uCkEditorForFilter.Text = "过滤";
- 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(305, 38);
- 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 = "精炼炉";
- valueListItem10.DataValue = "4";
- valueListItem10.DisplayText = "RH炉";
- valueListItem11.DataValue = "5";
- valueListItem11.DisplayText = "VD炉";
- valueListItem4.DataValue = "3";
- valueListItem4.DisplayText = "脱硫";
- valueListItem12.DataValue = "6";
- valueListItem12.DisplayText = "连铸";
- this.cboGW.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem1,
- valueListItem2,
- valueListItem3,
- valueListItem10,
- valueListItem11,
- valueListItem4,
- valueListItem12});
- this.cboGW.Location = new System.Drawing.Point(234, 38);
- 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(698, 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 = "yyyy-MM-dd HH:mm:ss";
- this.uldtEndTime.Location = new System.Drawing.Point(475, 9);
- this.uldtEndTime.MaskInput = "yyyy-mm-dd hh:mm:ss";
- this.uldtEndTime.Name = "uldtEndTime";
- this.uldtEndTime.Size = new System.Drawing.Size(150, 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 = "yyyy-MM-dd HH:mm:ss";
- this.uldtBeginTime.Location = new System.Drawing.Point(301, 9);
- this.uldtBeginTime.MaskInput = "yyyy-mm-dd hh:mm:ss";
- this.uldtBeginTime.Name = "uldtBeginTime";
- this.uldtBeginTime.Size = new System.Drawing.Size(150, 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(511, 37);
- this.txtSteel.Name = "txtSteel";
- this.txtSteel.Size = new System.Drawing.Size(252, 21);
- this.txtSteel.TabIndex = 88;
- //
- // chkSteel
- //
- this.chkSteel.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.chkSteel.Location = new System.Drawing.Point(459, 35);
- this.chkSteel.Name = "chkSteel";
- this.chkSteel.Size = new System.Drawing.Size(56, 24);
- this.chkSteel.TabIndex = 87;
- this.chkSteel.Text = "钢种";
- this.chkSteel.CheckedChanged += new System.EventHandler(this.chkSteel_CheckedChanged);
- //
- // ultraMaskedEdit2
- //
- editorButton1.Key = "edit";
- editorButton2.Key = "clear";
- this.ultraMaskedEdit2.ButtonsRight.Add(editorButton1);
- this.ultraMaskedEdit2.ButtonsRight.Add(editorButton2);
- this.ultraMaskedEdit2.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
- this.ultraMaskedEdit2.Enabled = false;
- this.ultraMaskedEdit2.Location = new System.Drawing.Point(102, 37);
- this.ultraMaskedEdit2.Name = "ultraMaskedEdit2";
- this.ultraMaskedEdit2.PromptChar = ' ';
- this.ultraMaskedEdit2.Size = new System.Drawing.Size(121, 21);
- this.ultraMaskedEdit2.TabIndex = 85;
- this.ultraMaskedEdit2.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- this.ultraMaskedEdit2.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraMaskedEdit1_EditorButtonClick);
- //
- // ultraMaskedEdit1
- //
- editorButton3.Key = "edit";
- editorButton4.Key = "clear";
- this.ultraMaskedEdit1.ButtonsRight.Add(editorButton3);
- this.ultraMaskedEdit1.ButtonsRight.Add(editorButton4);
- this.ultraMaskedEdit1.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
- this.ultraMaskedEdit1.Enabled = false;
- this.ultraMaskedEdit1.Location = new System.Drawing.Point(103, 9);
- this.ultraMaskedEdit1.Name = "ultraMaskedEdit1";
- this.ultraMaskedEdit1.PromptChar = ' ';
- this.ultraMaskedEdit1.Size = new System.Drawing.Size(120, 21);
- this.ultraMaskedEdit1.TabIndex = 84;
- this.ultraMaskedEdit1.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- this.ultraMaskedEdit1.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraMaskedEdit1_EditorButtonClick);
- //
- // chk_Staticode
- //
- this.chk_Staticode.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.chk_Staticode.Location = new System.Drawing.Point(643, 7);
- this.chk_Staticode.Name = "chk_Staticode";
- this.chk_Staticode.Size = new System.Drawing.Size(55, 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(259, 44);
- this.checkBox3.Name = "checkBox3";
- this.checkBox3.Size = new System.Drawing.Size(98, 24);
- this.checkBox3.TabIndex = 62;
- this.checkBox3.Text = "工序位置";
- this.checkBox3.Visible = false;
- this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
- //
- // chk_Date
- //
- this.chk_Date.Checked = true;
- this.chk_Date.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chk_Date.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.chk_Date.Location = new System.Drawing.Point(234, 7);
- this.chk_Date.Name = "chk_Date";
- this.chk_Date.Size = new System.Drawing.Size(70, 24);
- this.chk_Date.TabIndex = 61;
- this.chk_Date.Text = "时间从";
- this.chk_Date.CheckedChanged += new System.EventHandler(this.chk_Date_CheckedChanged);
- //
- // chk_HeaNo
- //
- this.chk_HeaNo.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.chk_HeaNo.Location = new System.Drawing.Point(12, 7);
- this.chk_HeaNo.Name = "chk_HeaNo";
- this.chk_HeaNo.Size = new System.Drawing.Size(88, 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("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label6.Location = new System.Drawing.Point(455, 12);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(21, 14);
- this.label6.TabIndex = 59;
- this.label6.Text = "到";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label2.Location = new System.Drawing.Point(65, 40);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(21, 14);
- 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 = "frmAdditStat";
- 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
- #region " Valiable "
- private DataSet _dsHj = new DataSet();
- private DataSet _dsPL = new DataSet();
- private DataSet _dsFl = new DataSet();
- 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();
- #endregion
- #region " Init "
- private void frmAdditStat_Load(object sender, System.EventArgs e)
- {
- ultraGrid1.Font = new System.Drawing.Font("Tahoma", 9F);
- ultraGrid2.Font = new System.Drawing.Font("Tahoma", 9F);
- 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";
- cboGW.SelectedIndex = 0;
- checkBox3.Checked = true;
- InitControl();
- //GetGridInfo();
- }
- #region " 金属料 "
- 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
- { }
- }
- #endregion
- #region " 散装料 "
- 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
- { }
- }
- #endregion
- #endregion
- #region " Control Events "
- private void 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 Point GetChildWindowLocation(Size ChildWindowSize)
- {
- int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
- int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
- if (width > 0)
- width = Cursor.Position.X - width;
- else
- width = Cursor.Position.X;
- if (height > 0)
- height = Cursor.Position.Y - height + 10;
- else
- height = Cursor.Position.Y + 10;
- return new Point(width, height);
- }
- private void InitControl()
- {
- if (_strCob2 == "")
- this.cboStaticode.SelectedIndex = 0;
- else
- this.cboStaticode.Value = _strCob2;
- }
- /// <summary>
- /// 初始化班次
- /// </summary>
- /// <returns></returns>
- private DataTable BuildTableDuty()
- {
- DataTable dt = new DataTable();
- DataColumn dc = new DataColumn("id", typeof(System.String));
- dt.Columns.Add(dc);
- dc = new DataColumn("name", typeof(System.String));
- dt.Columns.Add(dc);
- DataRow dr = dt.NewRow();
- dr[0] = "0";
- dr[1] = "全部";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr[0] = "1";
- dr[1] = "甲";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr[0] = "2";
- dr[1] = "乙";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr[0] = "3";
- dr[1] = "丙";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr[0] = "4";
- dr[1] = "丁";
- dt.Rows.Add(dr);
- dt.AcceptChanges();
- return dt;
- }
- #endregion
- #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;
- }
- private void chk_Date_CheckedChanged(object sender, System.EventArgs e)
- {
- this.uldtBeginTime.Enabled = this.chk_Date.Checked;
- this.uldtEndTime.Enabled = this.chk_Date.Checked;
- }
- 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
- #region " InitGrid "
- private void GetGridInfo()
- {
- try
- {
- if (uldtEndTime.DateTime.Date.Subtract(uldtBeginTime.DateTime.Date).Days > 180)
- {
- MessageBox.Show("查询时间不可超过6个月。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (uldtBeginTime.DateTime > uldtEndTime.DateTime)
- {
- MessageBox.Show("查询起始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- string strErr = "";
- string addTalbeName = "";
- string strWhere = "";
- string strgw = Convert.ToString(GetGW(this.cboGW.SelectedIndex));
- if (cboGW.SelectedIndex == -1)
- {
- strgw = "BOF0";
- }
- string strStartTime = "";
- string strEndTime = "";
- string strMType = "";
- string resTalbeName = TableName(strgw, out addTalbeName);
- if (chk_Date.Checked == true)
- {
- 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 (Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)) != "0" && Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)) != "-1") //岗位
- strWhere += " and a.stationcode='" + addTalbeName + "0" + Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)) + "'";
- 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);
- }
- }
- private string GetSqlWhere2()
- {
- string str = "";
- if (this.chk_Staticode.Checked)
- {
- str = string.Format(" where substr(bc,2,1)='{0}' ", this.cboStaticode.SelectedIndex + 1);
- }
- return str;
- }
- private string GetSqlWhere1()
- {
- string str = " where 1=1 ";
- if (this.chk_HeaNo.Checked)
- {
- str += string.Format(" and (lh >= '{0}' and lh <= '{1}') ",
- this.ultraMaskedEdit1.Text.Trim(), this.ultraMaskedEdit2.Text.Trim());
- }
- if (this.chk_Date.Checked)
- {
- str += string.Format(" and (jlsk >= to_date('{0}','yyyy-MM-dd HH24:mi:ss') "
- + " and jlsk <= to_date('{1}','yyyy-MM-dd HH24:mi:ss')) ",
- this.uldtBeginTime.Text, this.uldtEndTime.Text);
- }
- return str;
- }
- /// <summary>
- /// 获取物料信息
- /// </summary>
- private void GetAdditStat()
- {
- string sqlstr;
- string addTalbeName = "";
- string strGw = Convert.ToString(GetGW(this.cboGW.SelectedIndex));
- string strGWID = Convert.ToString(this.cboGWID.SelectedIndex);
- GetGridInfo(); //初始化物料信息列名
- if (this.ultraTabControl1.Tabs[0].Selected == true)
- sqlstr = BuildSql(Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)), "HJ");
- else
- sqlstr = BuildSql(Convert.ToString(Convert.ToString(this.cboGWID.SelectedIndex)), "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.hudwid =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.ExecuteQueryToDataTable(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();
- }
- else
- {
- _dsPL.Tables.Add(dt);
- dtFl = FormatData(_dsPL, "FL");
- this.ultraGrid2.DataSource = dtFl;
- InitData2();
- }
- }
- else
- {
- ultraGrid1.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 = "";
- if (this.checkBox3.Checked)
- strSel = "MATERIELTYPE='" + Type + "'";
- else
- 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());
- }
- 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"] = drfl["STEEL"].ToString();
- drFL["STATIONCODE"] = drfl["WSID"].ToString() + GetGW(drfl["STATIONCODE"].ToString());
- drFL["SHIFTCODE"] = GetBC(drfl["SHIFTCODE"].ToString());
- 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["MATERIELCODE"].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["MATERIELCODE"].ToString())
- {
- drFlvalue[dcfl.ColumnName.ToString()] = drfl["JMWGT"].ToString();
- }
- }
- bolIs = false;
- }
- }
- }
- }
- return dtFl;
- }
- private string BuildSql(string wsid, string WlType)
- {
- string sqlstr = "";
- if (chk_Date.Checked) //时间
- 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='" + ultraMaskedEdit1.Text.ToString() + "'";
- else if (string.IsNullOrEmpty(ultraMaskedEdit1.Text) && !string.IsNullOrEmpty(ultraMaskedEdit2.Text))
- sqlstr += " and a.heatno='" + ultraMaskedEdit2.Text.ToString() + "'";
- }
- if (wsid != "0" && wsid != "-1") //岗位
- sqlstr += " and a.stationcode='0" + wsid + "'";
- if (chk_Staticode.Checked && this.cboStaticode.SelectedIndex != 0)
- sqlstr += " and substr(SHIFTCODE,2,1)='" + cboStaticode.SelectedIndex + "'";
- //钢种
- 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]+"'",";
- strSteeAll = strSteeAll + "'" + strSteel[i] + "'" + ",";
- }
- str = strSteeAll.Substring(0, strSteeAll.Length - 1);
- //sqlstr += " and a.plansteel in ('" + str + "')";
- sqlstr += string.Format(" and UPPER(a.plansteel) in (UPPER({0}))", str); // lower(b.jhgz)
- }
- sqlstr += " and b.MATERIELTYPE='" + WlType + "'"; //物料类型(合金、辅料)
- return sqlstr;
- }
- #endregion
- 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;
- }
- /// <summary>
- /// 初始化工位
- /// </summary>
- /// <param name="index"></param>
- /// <returns></returns>
- private object[] GetCWIDItems(int index)
- {
- switch (index)
- {
- case 0:
- return new object[] { "所有", "1#转炉", "2#转炉", "3#转炉" };
- case 1:
- return new object[] { "所有", "1#吹氩站", "2#吹氩站", "3#吹氩站" };
- case 2:
- return new object[] { "所有", "1#精炼炉", "2#精炼炉" };
- case 3:
- return new object[] { "所有", "1#RH炉" };
- case 4:
- return new object[] { "所有", "1#VD炉" };
- case 5:
- return new object[] { "所有", "1#脱硫", "2#脱硫" };
- default:
- return new object[] { "所有岗位" };
- }
- }
- /// <summary>
- /// 岗位编码
- /// </summary>
- /// <param name="index"></param>
- /// <returns></returns>
- private string GetGW(int index)
- {
- switch (index)
- {
- case 0:
- return "BOF0";
- case 1:
- return "CAS0";
- case 2:
- return "LFS0";
- case 3:
- return "RHS0";
- case 4:
- return "VDS0";
- case 5:
- return "HMP0";
- default:
- return "0";
- }
- }
- /// <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 "RHS0":
- return "RH炉";
- case "VDS0":
- return "VD炉";
- case "HMP0":
- return "脱硫";
- default:
- return "";
- }
- }
- /// <summary>
- /// 班别
- /// </summary>
- /// <param name="index"></param>
- /// <returns></returns>
- private string GetBC(string bcID)
- {
- string bb = "";
- if (bcID.Length > 1) bb = bcID.Substring(1, 1);
- switch (bb)
- {
- case "1":
- return "甲";
- case "2":
- return "乙";
- case "3":
- return "丙";
- case "4":
- 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 "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;
- case "VDS0":
- resTableName = "STL_VDS_Optinfo";
- addtableName = "I";
- break;
- case "HMP0":
- resTableName = "STL_HMP_Optinfo";
- addtableName = "B";
- 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 ExportExcel()
- {
- try
- {
- string StrfileName = System.Windows.Forms.Application.StartupPath + "\\Report\\物料消耗明细.xls";
- if (ultraTabControl1.SelectedTab.Index == 0)
- this.GridExcelExporter.Export(this.ultraGrid1, StrfileName);
- else
- this.GridExcelExporter.Export(this.ultraGrid2, StrfileName);
- ProcessStartInfo p = new ProcessStartInfo(StrfileName);
- p.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
- p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
- Process.Start(p);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message + "\n处理方法:查看(" + System.Windows.Forms.Application.StartupPath + ")目录下是否有[ Report文件夹 ],如果没有请手动创建!");
- }
- }
- private void chkSteel_CheckedChanged(object sender, EventArgs e)
- {
- txtSteel.Enabled = chkSteel.Checked;
- if (!chkSteel.Checked)
- {
- txtSteel.BackColor = Color.WhiteSmoke;//(224, 224, 224);
- }
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- GetAdditStat();
- break;
- case "Export":
- ExportExcel();
- break;
- case "Exit":
- this.Close();
- break;
- default:
- break;
- }
- }
- private void cboGW_SelectionChanged(object sender, EventArgs e)
- {
- cboGWID.Items.Clear();
- int index;
- index = cboGW.SelectedIndex;
- //cboGWID.Items.Add(GetCWIDItems(cboGW.SelectedIndex));
- switch (index)
- {
- case 0:
- cboGWID.Items.Add(0, "所有");
- cboGWID.Items.Add(1, "1#转炉");
- cboGWID.Items.Add(2, "2#转炉");
- break;
- case 1:
- cboGWID.Items.Add(0, "所有");
- cboGWID.Items.Add(1, "1#吹氩站");
- cboGWID.Items.Add(2, "2#吹氩站");
- break;
- case 2:
- cboGWID.Items.Add(0, "所有");
- cboGWID.Items.Add(1, "1#精炼炉");
- cboGWID.Items.Add(2, "2#精炼炉");
- break;
- case 3:
- cboGWID.Items.Add(0, "所有");
- cboGWID.Items.Add(1, "1#RH炉");
- break; ;
- case 4:
- cboGWID.Items.Add(0, "所有");
- cboGWID.Items.Add(1, "1#VD炉");
- break;
- case 5:
- cboGWID.Items.Add(0, "所有铁水");
- break;
- case 6:
- cboGWID.Items.Add(0, "所有");
- cboGWID.Items.Add(1, "1#连铸");
- cboGWID.Items.Add(2, "2#连铸");
- cboGWID.Items.Add(3, "3#连铸");
- break;
- default:
- cboGWID.Items.Add(0, "所有岗位");
- break;
- }
- cboGWID.SelectedIndex = 0;
- }
- private void uCkEditorForFilter_CheckedChanged(object sender, EventArgs e)
- {
- JJBStaticFunction.SetGridRowFilter(ref this.ultraGrid1, uCkEditorForFilter.Checked);
- JJBStaticFunction.SetGridRowFilter(ref this.ultraGrid2, uCkEditorForFilter.Checked);
- }
- }
- }
|