| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783 |
- using System;
- using System.Data;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using Infragistics.Win.UltraWinGrid;
- using Infragistics.Win;
- using CoreFS.CA06;
- //using Core.LgMes.Client.LgIntegrationQuery;
- using Core.Mes.Client.Common;
- namespace Core.LgMes.Client.LgDeviceManager
- {
- /// <summary>
- /// FrmCasAffirm 的摘要说明。
- /// </summary>
- public class FrmCasAffirm : FrmLgDevFunctions
- {
- private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
- private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
- private System.Windows.Forms.Button button3;
- private System.Windows.Forms.Button button2;
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.RadioButton radioButton2;
- private System.Windows.Forms.RadioButton radioButton1;
- private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label3;
- private Infragistics.Win.UltraWinDataSource.UltraDataSource ultraDataSource1;
- private TextBox txtTemp;
- private Label lalTemp;
- private Label laltempFH;
- private Label lblDSPlaySteel;
- private Label lblSteel;
- private IContainer components;
- public FrmCasAffirm(OpeBase oba)
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- ob = oba;
- //
- // 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.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("CVTPOS");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("LADLEID");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("LVL");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("POTSTATUS", -1, null, 0, Infragistics.Win.UltraWinGrid.SortIndicator.Descending, false);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("USETIMES");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("sendtime");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SENDID");
- 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 appearance13 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn1 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("CVTPOS");
- Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn2 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("LADLEID");
- Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn3 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("LVL");
- Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn4 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("POTSTATUS");
- Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn5 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("USETIMES");
- Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn6 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("sendtime");
- Infragistics.Win.UltraWinDataSource.UltraDataColumn ultraDataColumn7 = new Infragistics.Win.UltraWinDataSource.UltraDataColumn("SENDID");
- this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
- this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
- this.lblDSPlaySteel = new System.Windows.Forms.Label();
- this.lblSteel = new System.Windows.Forms.Label();
- this.laltempFH = new System.Windows.Forms.Label();
- this.lalTemp = new System.Windows.Forms.Label();
- this.txtTemp = new System.Windows.Forms.TextBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.button3 = new System.Windows.Forms.Button();
- this.button2 = new System.Windows.Forms.Button();
- this.button1 = new System.Windows.Forms.Button();
- this.radioButton2 = new System.Windows.Forms.RadioButton();
- this.radioButton1 = new System.Windows.Forms.RadioButton();
- this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.ultraDataSource1 = new Infragistics.Win.UltraWinDataSource.UltraDataSource(this.components);
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
- this.ultraExpandableGroupBox1.SuspendLayout();
- this.ultraExpandableGroupBoxPanel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraDataSource1)).BeginInit();
- this.SuspendLayout();
- //
- // ultraExpandableGroupBox1
- //
- this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
- this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(0, 0);
- this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 239);
- this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
- this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(490, 120);
- this.ultraExpandableGroupBox1.TabIndex = 0;
- this.ultraExpandableGroupBox1.Text = "操作";
- //
- // ultraExpandableGroupBoxPanel1
- //
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.lblDSPlaySteel);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.lblSteel);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.laltempFH);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.lalTemp);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.txtTemp);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.label3);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.label2);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.label1);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.button3);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.button2);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.button1);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.radioButton2);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.radioButton1);
- this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(3, 19);
- this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
- this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(484, 98);
- this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
- //
- // lblDSPlaySteel
- //
- this.lblDSPlaySteel.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)), true);
- this.lblDSPlaySteel.Location = new System.Drawing.Point(94, 67);
- this.lblDSPlaySteel.Name = "lblDSPlaySteel";
- this.lblDSPlaySteel.Size = new System.Drawing.Size(96, 20);
- this.lblDSPlaySteel.TabIndex = 302;
- //
- // lblSteel
- //
- this.lblSteel.AutoSize = true;
- this.lblSteel.Location = new System.Drawing.Point(23, 71);
- this.lblSteel.Name = "lblSteel";
- this.lblSteel.Size = new System.Drawing.Size(65, 12);
- this.lblSteel.TabIndex = 301;
- this.lblSteel.Text = "上一炉钢种";
- //
- // laltempFH
- //
- this.laltempFH.AutoSize = true;
- this.laltempFH.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.laltempFH.ForeColor = System.Drawing.Color.Blue;
- this.laltempFH.Location = new System.Drawing.Point(378, 12);
- this.laltempFH.Name = "laltempFH";
- this.laltempFH.Size = new System.Drawing.Size(21, 14);
- this.laltempFH.TabIndex = 9;
- this.laltempFH.Tag = "";
- this.laltempFH.Text = "℃";
- //
- // lalTemp
- //
- this.lalTemp.AutoSize = true;
- this.lalTemp.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lalTemp.ForeColor = System.Drawing.Color.Blue;
- this.lalTemp.Location = new System.Drawing.Point(244, 12);
- this.lalTemp.Name = "lalTemp";
- this.lalTemp.Size = new System.Drawing.Size(70, 14);
- this.lalTemp.TabIndex = 8;
- this.lalTemp.Text = "钢包温度:";
- //
- // txtTemp
- //
- this.txtTemp.BackColor = System.Drawing.SystemColors.Window;
- this.txtTemp.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.txtTemp.Location = new System.Drawing.Point(320, 8);
- this.txtTemp.Name = "txtTemp";
- this.txtTemp.Size = new System.Drawing.Size(56, 21);
- this.txtTemp.TabIndex = 7;
- this.txtTemp.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTemp_KeyPress);
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(96, 71);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(0, 12);
- this.label3.TabIndex = 0;
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(96, 42);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(0, 12);
- this.label2.TabIndex = 0;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(96, 14);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(0, 12);
- this.label1.TabIndex = 0;
- //
- // button3
- //
- this.button3.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.button3.Location = new System.Drawing.Point(400, 38);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(75, 23);
- this.button3.TabIndex = 0;
- this.button3.Text = "退出";
- this.button3.Click += new System.EventHandler(this.button3_Click);
- //
- // button2
- //
- this.button2.Location = new System.Drawing.Point(320, 38);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(75, 23);
- this.button2.TabIndex = 0;
- this.button2.Text = "确认";
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(240, 38);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(75, 23);
- this.button1.TabIndex = 0;
- this.button1.Text = "查询";
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // radioButton2
- //
- this.radioButton2.Location = new System.Drawing.Point(32, 37);
- this.radioButton2.Name = "radioButton2";
- this.radioButton2.Size = new System.Drawing.Size(64, 24);
- this.radioButton2.TabIndex = 0;
- this.radioButton2.Text = "2#转炉";
- //
- // radioButton1
- //
- this.radioButton1.Checked = true;
- this.radioButton1.Location = new System.Drawing.Point(32, 8);
- this.radioButton1.Name = "radioButton1";
- this.radioButton1.Size = new System.Drawing.Size(64, 24);
- this.radioButton1.TabIndex = 0;
- this.radioButton1.TabStop = true;
- this.radioButton1.Text = "1#转炉";
- //
- // ultraGrid1
- //
- this.ultraGrid1.DataSource = this.ultraDataSource1;
- appearance1.BackColor = System.Drawing.SystemColors.Window;
- appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption;
- this.ultraGrid1.DisplayLayout.Appearance = appearance1;
- ultraGridColumn1.Header.Caption = "转炉号";
- ultraGridColumn1.Header.VisiblePosition = 0;
- ultraGridColumn1.Width = 71;
- ultraGridColumn2.Header.Caption = "钢包号";
- ultraGridColumn2.Header.VisiblePosition = 1;
- ultraGridColumn2.Width = 74;
- ultraGridColumn3.Header.Caption = "等级";
- ultraGridColumn3.Header.VisiblePosition = 2;
- ultraGridColumn3.Width = 52;
- ultraGridColumn4.Header.Caption = "包况";
- ultraGridColumn4.Header.VisiblePosition = 3;
- ultraGridColumn4.Width = 93;
- ultraGridColumn5.Header.Caption = "使用次数";
- ultraGridColumn5.Header.VisiblePosition = 4;
- ultraGridColumn5.Width = 81;
- ultraGridColumn6.Header.Caption = "发送时间";
- ultraGridColumn6.Header.VisiblePosition = 5;
- ultraGridColumn6.Width = 119;
- ultraGridColumn7.Header.Caption = "发送编号";
- ultraGridColumn7.Header.VisiblePosition = 6;
- ultraGridColumn7.Hidden = true;
- ultraGridBand1.Columns.AddRange(new object[] {
- ultraGridColumn1,
- ultraGridColumn2,
- ultraGridColumn3,
- ultraGridColumn4,
- ultraGridColumn5,
- ultraGridColumn6,
- ultraGridColumn7});
- ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
- this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
- this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- appearance2.TextHAlignAsString = "Left";
- this.ultraGrid1.DisplayLayout.CaptionAppearance = appearance2;
- appearance3.BackColor = System.Drawing.SystemColors.ActiveBorder;
- appearance3.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
- appearance3.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance3;
- appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance4;
- this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
- appearance5.BackColor = System.Drawing.SystemColors.ControlLightLight;
- appearance5.BackColor2 = System.Drawing.SystemColors.Control;
- appearance5.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance5.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance5;
- this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
- this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
- appearance6.BackColor = System.Drawing.SystemColors.Window;
- appearance6.ForeColor = System.Drawing.SystemColors.ControlText;
- this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance6;
- appearance7.BackColor = System.Drawing.SystemColors.Highlight;
- appearance7.ForeColor = System.Drawing.SystemColors.HighlightText;
- this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance7;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
- appearance8.BackColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.Override.CardAreaAppearance = appearance8;
- appearance9.BorderColor = System.Drawing.Color.Silver;
- appearance9.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
- this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance9;
- this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
- this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
- appearance10.BackColor = System.Drawing.SystemColors.Control;
- appearance10.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance10.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
- appearance10.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance10.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.Override.GroupByRowAppearance = appearance10;
- appearance11.TextHAlignAsString = "Left";
- this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance11;
- this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
- this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
- appearance12.BackColor = System.Drawing.SystemColors.Window;
- appearance12.BorderColor = System.Drawing.Color.Silver;
- this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance12;
- this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
- appearance13.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance13;
- 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.Location = new System.Drawing.Point(0, 0);
- this.ultraGrid1.Name = "ultraGrid1";
- this.ultraGrid1.Size = new System.Drawing.Size(490, 239);
- this.ultraGrid1.TabIndex = 0;
- this.ultraGrid1.Text = "钢包主要信息";
- this.ultraGrid1.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.ultraGrid1_InitializeRow);
- this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
- //
- // ultraDataSource1
- //
- this.ultraDataSource1.Band.Columns.AddRange(new object[] {
- ultraDataColumn1,
- ultraDataColumn2,
- ultraDataColumn3,
- ultraDataColumn4,
- ultraDataColumn5,
- ultraDataColumn6,
- ultraDataColumn7});
- //
- // FrmCasAffirm
- //
- this.AcceptButton = this.button2;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(228)))), ((int)(((byte)(242)))));
- this.CancelButton = this.button3;
- this.ClientSize = new System.Drawing.Size(490, 359);
- this.Controls.Add(this.ultraGrid1);
- this.Controls.Add(this.ultraExpandableGroupBox1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "FrmCasAffirm";
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "钢包选择";
- this.Load += new System.EventHandler(this.FrmCasAffirm_Load);
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
- this.ultraExpandableGroupBox1.ResumeLayout(false);
- this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
- this.ultraExpandableGroupBoxPanel1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraDataSource1)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- private DataSet _dsBigPot;
- //public RemotingHelp RemotingHelp;
- public bool _updateFlag = false;
- private void FrmCasAffirm_Load(object sender, System.EventArgs e)
- {
- GetData();
- }
- private void GetData() //显示待用状态的大包
- {
- try
- {
- string strErr = "";
- ArrayList arry = new ArrayList();
- arry.Add("CasGBComfirmPot_Load");
- CommonClientToServer ccs = new CommonClientToServer();
- ccs.ob = this.ob;
- DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
- if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
- {
- MessageBox.Show("钢包信息获取失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- this.ultraDataSource1.Rows.Clear();
- if (ds == null) return;
- for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
- {
- try
- {
- DataRow dr = ds.Tables[0].Rows[i];
- this.ultraDataSource1.Rows.Add(new object[]{
- dr["CVTPOS"].ToString(),
- dr["LADLEID"].ToString(),
- dr["LVL"].ToString(),
- dr["POTSTATUS"].ToString(),
- dr["USETIMES"].ToString(),
- dr["sendtime"].ToString(),
- dr["SENDID"].ToString()
- });
- }
- catch { }
- }
- if (ds.Tables[0].Rows.Count > 0)
- {
- this.ultraGrid1.ActiveRow = this.ultraGrid1.Rows[0];
- this.ultraGrid1.Rows[0].Selected = true;
- }
- //_dsBigPot = null;// this.RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- //this.ultraGrid1.DataSource = _dsBigPot.Tables[0];
- }
- catch { }
- try
- {
- string strErr = "";
- ArrayList arry = new ArrayList();
- arry.Add("GetCvtCurrHeaNoID");
- CommonClientToServer ccs = new CommonClientToServer();
- ccs.ob = this.ob;
- DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
- if (strErr == "" && ds != null && ds.Tables.Count > 0)
- {
- for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
- {
- if (Convert.ToString(ds.Tables[0].Rows[i][1]) == "1" &&
- Convert.ToString(ds.Tables[0].Rows[i][1]).Length > 0)
- {
- this.label1.Text = Convert.ToString(ds.Tables[0].Rows[i][0]);
- }
- else if (Convert.ToString(ds.Tables[0].Rows[i][1]) == "2" &&
- Convert.ToString(ds.Tables[0].Rows[i][1]).Length > 0)
- {
- this.label2.Text = Convert.ToString(ds.Tables[0].Rows[i][0]);
- }
- }
- }
- }
- catch { }
- }
- private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
- {
- //Color myColor = Color.Silver;
- //switch (e.Row.Cells["CVTPOS"].Value.ToString())
- //{
- // case "1":
- // myColor = Color.NavajoWhite;
- // break;
- // case "2":
- // myColor = Color.NavajoWhite;
- // break;
- //}
- //e.Row.Appearance.BackColor = myColor;
- }
- private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
- {
- if (this.ultraGrid1.ActiveRow == null) return;
- switch (this.ultraGrid1.ActiveRow.Cells["CVTPOS"].Value.ToString())
- {
- case "1":
- this.radioButton1.Checked = true;
- break;
- case "2":
- this.radioButton2.Checked = true;
- break;
- }
- string strErr = "";
- string strPot = this.ultraGrid1.DisplayLayout.ActiveRow.Cells["LADLEID"].Value.ToString();
- ArrayList arry = new ArrayList();
- arry.Add("GetLastPlanSteel.Query");
- arry.Add(strPot);
- arry.Add(strPot);
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- if (strErr == "" && ds.Tables[0].Rows.Count > 0)
- {
- this.lblDSPlaySteel.ForeColor = Color.Red;
- this.lblDSPlaySteel.Text = ds.Tables[0].Rows[0][0].ToString();
- }
- }
- private void button1_Click(object sender, System.EventArgs e)
- {
- GetData();
- }
- private void button3_Click(object sender, System.EventArgs e)
- {
- this.Close();
- }
- private void button2_Click(object sender, System.EventArgs e)
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- {
- MessageBox.Show("请选择钢包!");
- return;
- }
- string strPot = ugr.Cells[1].Value.ToString();
- string strCvtPlan = ugr.Cells[0].Value.ToString();
- string strPotRank = ugr.Cells[2].Value.ToString();
- string strPotStatus = ugr.Cells[3].Value.ToString();
- string smeltingid = "";
- string strCvtName = "";
- string strMsg = "";
- string strCvtNum = "1";
- if (this.radioButton1.Checked)
- {
- strCvtNum = "1";
- strCvtName = this.radioButton1.Text;
- smeltingid = this.label1.Text;
- if (string.IsNullOrEmpty(smeltingid))
- {
- MessageBox.Show("1#转炉当前不在冶炼!");
- return;
- }
- }
- else if (this.radioButton2.Checked)
- {
- strCvtNum = "2";
- strCvtName = this.radioButton2.Text;
- smeltingid = this.label2.Text;
- if (string.IsNullOrEmpty(smeltingid))
- {
- MessageBox.Show("2#转炉当前不在冶炼!");
- return;
- }
- }
- strMsg = string.Format("是否确认将计划发送至{0}#转炉的{1}号钢包发送至{2}", strCvtPlan, strPot, strCvtName);
- DialogResult dr = MessageBox.Show(strMsg, "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
- if (dr == DialogResult.No) return;
- try
- {
- string sqlstr = "", strErr = "";
- object[] sArgs = new object[6];
- sArgs[0] = ugr.Cells[1].Value.ToString();//钢包号
- sArgs[1] = ugr.Cells[6].Value.ToString();//发送编号
- sArgs[2] = ugr.Cells[2].Value.ToString();//等级
- sArgs[3] = ugr.Cells[3].Value.ToString();//包况
- sArgs[4] = smeltingid.ToString();//炉号
- sArgs[5] = strCvtNum.ToString();//炉座
- //获取钢包等级
- ArrayList arryPlC = new ArrayList();
- arryPlC.Add("GBJiangLVL");
- arryPlC.Add(sArgs[0]);
- CommonClientToServer cctosJJLVL = new CommonClientToServer();
- cctosJJLVL.ob = this.ob;
- DataSet dsPLC = cctosJJLVL.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arryPlC, out strErr);
- string strPotLvl = "";
- if (dsPLC != null && dsPLC.Tables[0].Rows.Count > 0)
- {
- strPotLvl = Convert.ToString(dsPLC.Tables[0].Rows[0][0]);
- }
- //根据发送编号修改钢包发送信息
- ArrayList arryS = new ArrayList();
- arryS.Add("GBSendInfo_Update");
- arryS.Add(sArgs[5]);
- arryS.Add(strPotLvl);
- arryS.Add(sArgs[3]);
- arryS.Add(sArgs[4]);
- arryS.Add(sArgs[1]);
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arryS, out strErr);
- string err = "";
- string str = sArgs[2].ToString();
- //根据钢包号修改钢包基础信息
- ArrayList arryB = new ArrayList();
- arryB.Add("GBBaseInfo_Update");
- arryB.Add(sArgs[4]);
- arryB.Add(sArgs[4]);
- arryB.Add(sArgs[4]);
- arryB.Add(sArgs[0]);
- CommonClientToServer cctosB = new CommonClientToServer();
- cctosB.ob = this.ob;
- DataSet dsB = cctosB.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arryB, out strErr);
-
- //获取钢包离开铸机时间
- ArrayList arryPl = new ArrayList();
- arryPl.Add("GetPotLeaveCcmTime");
- arryPl.Add(sArgs[0]);
- CommonClientToServer cctosPLC = new CommonClientToServer();
- cctosPLC.ob = this.ob;
- DataSet dsPLtime = cctosPLC.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arryPl, out strErr);
- string flo = "";
- if (dsPLtime == null)
- flo = "0";
- flo = dsPLtime.Tables[0].Rows[0][0].ToString();
- //根据钢包号、周期编号修改钢包使用信息
- ArrayList arryUD = new ArrayList();
- arryUD.Add("GBUserDetail");
- arryUD.Add(sArgs[4]);
- arryUD.Add(dsPLtime.Tables[0].Rows.Count > 0 ? dsPLtime.Tables[0].Rows[0][0] : 0);//停罐时间
- arryUD.Add(strPotLvl);
- arryUD.Add(sArgs[0]);
- arryUD.Add(sArgs[0]);
-
- CommonClientToServer cctosUD = new CommonClientToServer();
- cctosUD.ob = this.ob;
- DataSet dsUD = cctosUD.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arryUD, out strErr);
-
- string strRank = "";
- string strStatus = "";
- if (sArgs[2] != null) strRank = sArgs[2].ToString();
- if (sArgs[3] != null) strStatus = sArgs[3].ToString();
- if (strPotLvl != strRank)
- {
- strMsg = string.Format("{0}号钢包连铸下台时刻到确认时刻间隔{1}分钟,钢包等级变更为{2}", sArgs[0].ToString(), flo, strPotLvl);
- //strMsg = string.Format("{0}号钢包连铸下台时刻到确认时刻间隔{1}分钟,钢包等级变更为{2}", sArgs[0].ToString(), flo.ToString(), str);
- //根据钢包号更新钢包等级
- ArrayList arryPL = new ArrayList();
- arryPL.Add("PotLvl_Update");
- arryPL.Add(strPotLvl);
- arryPL.Add(sArgs[0]);
- CommonClientToServer cctosPL = new CommonClientToServer();
- cctosPL.ob = this.ob;
- DataSet dsPL = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arryPL, out strErr);
- //根据发送编号更新钢包发送记录表等级
- ArrayList arrySG = new ArrayList();
- arrySG.Add("SendGrade_Update");
- arrySG.Add(strPotLvl);
- arrySG.Add(strMsg);
- arrySG.Add(sArgs[1]);
- CommonClientToServer cctosSG = new CommonClientToServer();
- cctosSG.ob = this.ob;
- DataSet dsSG = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arrySG, out strErr);
- }
- // }
- try
- {
- //根据炉号修改转炉钢包信息
- ArrayList arryBPI = new ArrayList();
- arryBPI.Add("BofPOTInfo_Update");
- arryBPI.Add(sArgs[0]);
- arryBPI.Add(sArgs[0]);
- arryBPI.Add(strPotLvl);
- arryBPI.Add(strStatus);
- arryBPI.Add(txtTemp.Text);
- arryBPI.Add(sArgs[4]);
- CommonClientToServer cctosBPI = new CommonClientToServer();
- cctosBPI.ob = this.ob;
- DataSet dsBPI = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arryBPI, out strErr);
- }
- catch { }
- //strErr = obj.ToString();
- if (strErr.Length > 0)
- {
- MessageBox.Show(strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- strPotRank = strErr.Substring(strErr.Length - 1, 1);
- }
- GetData();
- }
- catch { }
- }
- private void txtTemp_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b'))
- {
- e.Handled = true;
- }
- }
- }
- }
|