| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061 |
- using System;
- using System.Data;
- using System.Drawing;
- using System.Collections.Generic;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Core.StlMes.Client.LgCommon;
- namespace Core.StlMes.Client.LgResMgt
- {
- /// <summary>
- /// Department 的摘要说明。
- /// </summary>
- public class frmMaintenance : frmStyleBase
- {
- private System.Data.DataSet dataSet1;
- private System.Data.DataTable dataTable1;
- private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid2;
- private System.ComponentModel.IContainer components;
- private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
- private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
- private System.Windows.Forms.Panel FrmBase_Fill_Panel;
- private System.Windows.Forms.Label Lb_GWCODE;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.TextBox tb_XMCODE;
- private System.Windows.Forms.TextBox tb_XMNAME;
- private string strError = null;
- private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
- private System.Data.DataColumn XMCode;
- private System.Data.DataColumn XMName;
- private DataColumn XMType;
- private DataColumn GWName;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor uce_XMType;
- private Label label2;
- private Label label3;
- private CheckBox chkGWName;
- private CheckBox chkItemType;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor cmbPosition;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor cmbType;
- private Infragistics.Win.Misc.UltraPanel ultraPanel1;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor uce_GWName;
- private DataColumn dataColumn1;
- string strLG_ZG = "LG"; //判断是炼钢还是轧钢
- /// <summary>
- ///
- /// </summary>
- public frmMaintenance()
- {
- //
- // 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()
- {
- Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Table1", -1);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ItemCode");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ItemName");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ItemType");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("STATIONCODE");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("DESCRIPTION");
- Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance4 = 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 valueListItem31 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem32 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem33 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem9 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem10 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem34 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem35 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem36 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem11 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem12 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem37 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem15 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem16 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem17 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem38 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem39 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem13 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem14 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem40 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem41 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem42 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem43 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem44 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem45 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem46 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem47 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem48 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem49 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem50 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem51 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem52 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem53 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem54 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem55 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem56 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem57 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem4 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem3 = new Infragistics.Win.ValueListItem();
- this.dataSet1 = new System.Data.DataSet();
- this.dataTable1 = new System.Data.DataTable();
- this.XMCode = new System.Data.DataColumn();
- this.XMName = new System.Data.DataColumn();
- this.XMType = new System.Data.DataColumn();
- this.GWName = new System.Data.DataColumn();
- this.dataColumn1 = new System.Data.DataColumn();
- this.ultraGrid2 = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
- this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
- this.ultraPanel1 = new Infragistics.Win.Misc.UltraPanel();
- this.uce_GWName = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.tb_XMNAME = new System.Windows.Forms.TextBox();
- this.tb_XMCODE = new System.Windows.Forms.TextBox();
- this.Lb_GWCODE = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.uce_XMType = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.label2 = new System.Windows.Forms.Label();
- this.cmbPosition = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.cmbType = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.chkGWName = new System.Windows.Forms.CheckBox();
- this.chkItemType = new System.Windows.Forms.CheckBox();
- this.FrmBase_Fill_Panel = new System.Windows.Forms.Panel();
- this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
- ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
- this.ultraExpandableGroupBox1.SuspendLayout();
- this.ultraExpandableGroupBoxPanel1.SuspendLayout();
- this.ultraPanel1.ClientArea.SuspendLayout();
- this.ultraPanel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.uce_GWName)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.uce_XMType)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmbPosition)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmbType)).BeginInit();
- this.FrmBase_Fill_Panel.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
- this.ultraGroupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // dataSet1
- //
- this.dataSet1.DataSetName = "NewDataSet";
- this.dataSet1.Locale = new System.Globalization.CultureInfo("zh-CN");
- this.dataSet1.Tables.AddRange(new System.Data.DataTable[] {
- this.dataTable1});
- //
- // dataTable1
- //
- this.dataTable1.Columns.AddRange(new System.Data.DataColumn[] {
- this.XMCode,
- this.XMName,
- this.XMType,
- this.GWName,
- this.dataColumn1});
- this.dataTable1.TableName = "Table1";
- //
- // XMCode
- //
- this.XMCode.Caption = "项目编码";
- this.XMCode.ColumnName = "ItemCode";
- this.XMCode.ReadOnly = true;
- //
- // XMName
- //
- this.XMName.Caption = "项目名称";
- this.XMName.ColumnName = "ItemName";
- //
- // XMType
- //
- this.XMType.Caption = "项目类型";
- this.XMType.ColumnName = "ItemType";
- //
- // GWName
- //
- this.GWName.Caption = "岗位名称";
- this.GWName.ColumnName = "STATIONCODE";
- //
- // dataColumn1
- //
- this.dataColumn1.ColumnName = "DESCRIPTION";
- //
- // ultraGrid2
- //
- this.ultraGrid2.DataMember = "Table1";
- this.ultraGrid2.DataSource = this.dataSet1;
- ultraGridColumn1.CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
- ultraGridColumn1.Header.VisiblePosition = 0;
- ultraGridColumn1.Hidden = true;
- ultraGridColumn2.CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
- ultraGridColumn2.Header.VisiblePosition = 1;
- ultraGridColumn2.Width = 164;
- ultraGridColumn3.CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
- ultraGridColumn3.Header.VisiblePosition = 2;
- ultraGridColumn3.Width = 147;
- ultraGridColumn4.Header.VisiblePosition = 3;
- ultraGridColumn5.Header.Caption = "描述";
- ultraGridColumn5.Header.VisiblePosition = 4;
- ultraGridColumn5.Hidden = true;
- ultraGridBand1.Columns.AddRange(new object[] {
- ultraGridColumn1,
- ultraGridColumn2,
- ultraGridColumn3,
- ultraGridColumn4,
- ultraGridColumn5});
- this.ultraGrid2.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
- this.ultraGrid2.DisplayLayout.GroupByBox.Hidden = true;
- this.ultraGrid2.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
- this.ultraGrid2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraGrid2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.ultraGrid2.Location = new System.Drawing.Point(0, 40);
- this.ultraGrid2.Name = "ultraGrid2";
- this.ultraGrid2.Size = new System.Drawing.Size(888, 313);
- this.ultraGrid2.TabIndex = 0;
- this.ultraGrid2.AfterRowActivate += new System.EventHandler(this.ultraGrid2_AfterRowActivate);
- //
- // ultraExpandableGroupBox1
- //
- appearance1.BackColor = System.Drawing.SystemColors.Control;
- this.ultraExpandableGroupBox1.Appearance = appearance1;
- this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
- this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(888, 100);
- this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 353);
- this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
- this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(888, 100);
- this.ultraExpandableGroupBox1.TabIndex = 1;
- this.ultraExpandableGroupBox1.Text = "编辑区";
- this.ultraExpandableGroupBox1.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.VisualStudio2005;
- //
- // ultraExpandableGroupBoxPanel1
- //
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraPanel1);
- this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(2, 20);
- this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
- this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(884, 78);
- this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
- //
- // ultraPanel1
- //
- this.ultraPanel1.AutoScroll = true;
- //
- // ultraPanel1.ClientArea
- //
- this.ultraPanel1.ClientArea.Controls.Add(this.uce_GWName);
- this.ultraPanel1.ClientArea.Controls.Add(this.tb_XMNAME);
- this.ultraPanel1.ClientArea.Controls.Add(this.tb_XMCODE);
- this.ultraPanel1.ClientArea.Controls.Add(this.Lb_GWCODE);
- this.ultraPanel1.ClientArea.Controls.Add(this.label1);
- this.ultraPanel1.ClientArea.Controls.Add(this.label3);
- this.ultraPanel1.ClientArea.Controls.Add(this.uce_XMType);
- this.ultraPanel1.ClientArea.Controls.Add(this.label2);
- this.ultraPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraPanel1.Location = new System.Drawing.Point(0, 0);
- this.ultraPanel1.Name = "ultraPanel1";
- this.ultraPanel1.Size = new System.Drawing.Size(884, 78);
- this.ultraPanel1.TabIndex = 4;
- //
- // uce_GWName
- //
- appearance4.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance4.BorderColor = System.Drawing.Color.Black;
- this.uce_GWName.Appearance = appearance4;
- this.uce_GWName.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.uce_GWName.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.uce_GWName.Font = new System.Drawing.Font("宋体", 9F);
- valueListItem5.DataValue = "HMP01";
- valueListItem5.DisplayText = "1#脱硫";
- valueListItem6.DataValue = "HMP02";
- valueListItem6.DisplayText = "2#脱硫";
- valueListItem7.DataValue = "BOF01";
- valueListItem7.DisplayText = "1#转炉";
- valueListItem8.DataValue = "BOF02";
- valueListItem8.DisplayText = "2#转炉";
- valueListItem31.DataValue = "BOF03";
- valueListItem31.DisplayText = "3#转炉";
- valueListItem32.DataValue = "BOF04";
- valueListItem32.DisplayText = "4#转炉";
- valueListItem33.DataValue = "BOF05";
- valueListItem33.DisplayText = "5#转炉";
- valueListItem9.DataValue = "CAS01";
- valueListItem9.DisplayText = "1#吹氩";
- valueListItem10.DataValue = "CAS02";
- valueListItem10.DisplayText = "2#吹氩";
- valueListItem34.DataValue = "CAS03";
- valueListItem34.DisplayText = "3#吹氩";
- valueListItem35.DataValue = "CAS04";
- valueListItem35.DisplayText = "4#吹氩";
- valueListItem36.DataValue = "CAS05";
- valueListItem36.DisplayText = "5#吹氩";
- valueListItem11.DataValue = "LFS01";
- valueListItem11.DisplayText = "1#精炼";
- valueListItem12.DataValue = "LFS02";
- valueListItem12.DisplayText = "2#精炼";
- valueListItem37.DataValue = "LFS03";
- valueListItem37.DisplayText = "3#精炼";
- valueListItem15.DataValue = "CCM01";
- valueListItem15.DisplayText = "1#连铸机";
- valueListItem16.DataValue = "CCM02";
- valueListItem16.DisplayText = "2#连铸机";
- valueListItem17.DataValue = "CCM03";
- valueListItem17.DisplayText = "3#连铸机";
- valueListItem38.DataValue = "CCM04";
- valueListItem38.DisplayText = "4#连铸机";
- valueListItem39.DataValue = "CCM05";
- valueListItem39.DisplayText = "5#连铸机";
- this.uce_GWName.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem5,
- valueListItem6,
- valueListItem7,
- valueListItem8,
- valueListItem31,
- valueListItem32,
- valueListItem33,
- valueListItem9,
- valueListItem10,
- valueListItem34,
- valueListItem35,
- valueListItem36,
- valueListItem11,
- valueListItem12,
- valueListItem37,
- valueListItem15,
- valueListItem16,
- valueListItem17,
- valueListItem38,
- valueListItem39});
- this.uce_GWName.Location = new System.Drawing.Point(624, 23);
- this.uce_GWName.Name = "uce_GWName";
- this.uce_GWName.Size = new System.Drawing.Size(115, 19);
- this.uce_GWName.TabIndex = 80;
- //
- // tb_XMNAME
- //
- this.tb_XMNAME.Location = new System.Drawing.Point(127, 22);
- this.tb_XMNAME.MaxLength = 10;
- this.tb_XMNAME.Name = "tb_XMNAME";
- this.tb_XMNAME.Size = new System.Drawing.Size(123, 21);
- this.tb_XMNAME.TabIndex = 2;
- //
- // tb_XMCODE
- //
- this.tb_XMCODE.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.tb_XMCODE.Location = new System.Drawing.Point(778, 37);
- this.tb_XMCODE.MaxLength = 9;
- this.tb_XMCODE.Name = "tb_XMCODE";
- this.tb_XMCODE.Size = new System.Drawing.Size(123, 21);
- this.tb_XMCODE.TabIndex = 1;
- this.tb_XMCODE.Visible = false;
- //
- // Lb_GWCODE
- //
- this.Lb_GWCODE.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.Lb_GWCODE.Location = new System.Drawing.Point(802, 13);
- this.Lb_GWCODE.Name = "Lb_GWCODE";
- this.Lb_GWCODE.Size = new System.Drawing.Size(79, 21);
- this.Lb_GWCODE.TabIndex = 0;
- this.Lb_GWCODE.Text = "项目编码";
- this.Lb_GWCODE.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- this.Lb_GWCODE.Visible = false;
- //
- // label1
- //
- this.label1.Font = new System.Drawing.Font("宋体", 9F);
- this.label1.Location = new System.Drawing.Point(54, 22);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(67, 21);
- this.label1.TabIndex = 1;
- this.label1.Text = "项目名称";
- this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // label3
- //
- this.label3.Font = new System.Drawing.Font("宋体", 9F);
- this.label3.Location = new System.Drawing.Point(553, 22);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(65, 21);
- this.label3.TabIndex = 5;
- this.label3.Text = "岗位名称";
- this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // uce_XMType
- //
- this.uce_XMType.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.uce_XMType.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.uce_XMType.Font = new System.Drawing.Font("宋体", 9F);
- valueListItem2.DataValue = "0";
- valueListItem2.DisplayText = "设备运行";
- valueListItem1.DataValue = "1";
- valueListItem1.DisplayText = "耗材消耗";
- this.uce_XMType.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem2,
- valueListItem1});
- this.uce_XMType.Location = new System.Drawing.Point(380, 22);
- this.uce_XMType.Name = "uce_XMType";
- this.uce_XMType.Size = new System.Drawing.Size(123, 19);
- this.uce_XMType.TabIndex = 4;
- this.uce_XMType.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- //
- // label2
- //
- this.label2.Font = new System.Drawing.Font("宋体", 9F);
- this.label2.Location = new System.Drawing.Point(301, 22);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(79, 21);
- this.label2.TabIndex = 3;
- this.label2.Text = "项目类型";
- this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // cmbPosition
- //
- appearance6.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance6.BorderColor = System.Drawing.Color.Black;
- this.cmbPosition.Appearance = appearance6;
- this.cmbPosition.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.cmbPosition.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.cmbPosition.Enabled = false;
- this.cmbPosition.Font = new System.Drawing.Font("宋体", 9F);
- valueListItem13.DataValue = "HMP01";
- valueListItem13.DisplayText = "1#脱硫";
- valueListItem14.DataValue = "HMP02";
- valueListItem14.DisplayText = "2#脱硫";
- valueListItem40.DataValue = "BOF01";
- valueListItem40.DisplayText = "1#转炉";
- valueListItem41.DataValue = "BOF02";
- valueListItem41.DisplayText = "2#转炉";
- valueListItem42.DataValue = "BOF03";
- valueListItem42.DisplayText = "3#转炉";
- valueListItem43.DataValue = "BOF04";
- valueListItem43.DisplayText = "4#转炉";
- valueListItem44.DataValue = "BOF05";
- valueListItem44.DisplayText = "5#转炉";
- valueListItem45.DataValue = "CAS01";
- valueListItem45.DisplayText = "1#吹氩";
- valueListItem46.DataValue = "CAS02";
- valueListItem46.DisplayText = "2#吹氩";
- valueListItem47.DataValue = "CAS03";
- valueListItem47.DisplayText = "3#吹氩";
- valueListItem48.DataValue = "CAS04";
- valueListItem48.DisplayText = "4#吹氩";
- valueListItem49.DataValue = "CAS05";
- valueListItem49.DisplayText = "5#吹氩";
- valueListItem50.DataValue = "LFS01";
- valueListItem50.DisplayText = "1#精炼";
- valueListItem51.DataValue = "LFS02";
- valueListItem51.DisplayText = "2#精炼";
- valueListItem52.DataValue = "LFS03";
- valueListItem52.DisplayText = "3#精炼";
- valueListItem53.DataValue = "CCM01";
- valueListItem53.DisplayText = "1#连铸机";
- valueListItem54.DataValue = "CCM02";
- valueListItem54.DisplayText = "2#连铸机";
- valueListItem55.DataValue = "CCM03";
- valueListItem55.DisplayText = "3#连铸机";
- valueListItem56.DataValue = "CCM04";
- valueListItem56.DisplayText = "4#连铸机";
- valueListItem57.DataValue = "CCM05";
- valueListItem57.DisplayText = "5#连铸机";
- this.cmbPosition.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem13,
- valueListItem14,
- valueListItem40,
- valueListItem41,
- valueListItem42,
- valueListItem43,
- valueListItem44,
- valueListItem45,
- valueListItem46,
- valueListItem47,
- valueListItem48,
- valueListItem49,
- valueListItem50,
- valueListItem51,
- valueListItem52,
- valueListItem53,
- valueListItem54,
- valueListItem55,
- valueListItem56,
- valueListItem57});
- this.cmbPosition.Location = new System.Drawing.Point(317, 10);
- this.cmbPosition.Name = "cmbPosition";
- this.cmbPosition.Size = new System.Drawing.Size(115, 19);
- this.cmbPosition.TabIndex = 79;
- this.cmbPosition.ValueChanged += new System.EventHandler(this.ultcbo_ValueChanged);
- //
- // cmbType
- //
- appearance5.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance5.BorderColor = System.Drawing.Color.Black;
- this.cmbType.Appearance = appearance5;
- this.cmbType.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.cmbType.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.cmbType.Enabled = false;
- this.cmbType.Font = new System.Drawing.Font("宋体", 9F);
- valueListItem4.DataValue = "0";
- valueListItem4.DisplayText = "设备运行";
- valueListItem3.DataValue = "1";
- valueListItem3.DisplayText = "耗材消耗";
- this.cmbType.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem4,
- valueListItem3});
- this.cmbType.Location = new System.Drawing.Point(103, 10);
- this.cmbType.Name = "cmbType";
- this.cmbType.Size = new System.Drawing.Size(103, 19);
- this.cmbType.TabIndex = 78;
- this.cmbType.ValueChanged += new System.EventHandler(this.ultcbo_ValueChanged);
- //
- // chkGWName
- //
- this.chkGWName.AutoSize = true;
- this.chkGWName.BackColor = System.Drawing.Color.Transparent;
- this.chkGWName.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.chkGWName.Font = new System.Drawing.Font("宋体", 9F);
- this.chkGWName.Location = new System.Drawing.Point(240, 11);
- this.chkGWName.Name = "chkGWName";
- this.chkGWName.Size = new System.Drawing.Size(84, 17);
- this.chkGWName.TabIndex = 77;
- this.chkGWName.Text = " 岗位名称";
- this.chkGWName.UseVisualStyleBackColor = false;
- this.chkGWName.CheckedChanged += new System.EventHandler(this.chkGWName_CheckedChanged);
- //
- // chkItemType
- //
- this.chkItemType.AutoSize = true;
- this.chkItemType.BackColor = System.Drawing.Color.Transparent;
- this.chkItemType.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.chkItemType.Font = new System.Drawing.Font("宋体", 9F);
- this.chkItemType.Location = new System.Drawing.Point(26, 11);
- this.chkItemType.Name = "chkItemType";
- this.chkItemType.Size = new System.Drawing.Size(84, 17);
- this.chkItemType.TabIndex = 76;
- this.chkItemType.Text = " 项目类型";
- this.chkItemType.UseVisualStyleBackColor = false;
- this.chkItemType.CheckedChanged += new System.EventHandler(this.chkItemType_CheckedChanged);
- //
- // FrmBase_Fill_Panel
- //
- this.FrmBase_Fill_Panel.Controls.Add(this.ultraGrid2);
- this.FrmBase_Fill_Panel.Controls.Add(this.ultraExpandableGroupBox1);
- this.FrmBase_Fill_Panel.Controls.Add(this.ultraGroupBox1);
- this.FrmBase_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
- this.FrmBase_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.FrmBase_Fill_Panel.Location = new System.Drawing.Point(0, 0);
- this.FrmBase_Fill_Panel.Name = "FrmBase_Fill_Panel";
- this.FrmBase_Fill_Panel.Size = new System.Drawing.Size(888, 453);
- this.FrmBase_Fill_Panel.TabIndex = 0;
- //
- // ultraGroupBox1
- //
- this.ultraGroupBox1.Controls.Add(this.cmbType);
- this.ultraGroupBox1.Controls.Add(this.cmbPosition);
- this.ultraGroupBox1.Controls.Add(this.chkGWName);
- this.ultraGroupBox1.Controls.Add(this.chkItemType);
- 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(888, 40);
- this.ultraGroupBox1.TabIndex = 2;
- //
- // frmMaintenance
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.ClientSize = new System.Drawing.Size(888, 453);
- this.Controls.Add(this.FrmBase_Fill_Panel);
- this.KeyPreview = true;
- this.Name = "frmMaintenance";
- this.Text = "交接班耗材和设备项目维护";
- this.Load += new System.EventHandler(this.GWBM_Load);
- ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
- this.ultraExpandableGroupBox1.ResumeLayout(false);
- this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
- this.ultraPanel1.ClientArea.ResumeLayout(false);
- this.ultraPanel1.ClientArea.PerformLayout();
- this.ultraPanel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.uce_GWName)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.uce_XMType)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmbPosition)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmbType)).EndInit();
- this.FrmBase_Fill_Panel.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
- this.ultraGroupBox1.ResumeLayout(false);
- this.ultraGroupBox1.PerformLayout();
- this.ResumeLayout(false);
- }
- #endregion
- /// <summary>
- /// 初始化函数
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void GWBM_Load(object sender, System.EventArgs e)
- {
- //判断是炼钢还是轧钢
- if(this.Key.IndexOf('@')>0)
- strLG_ZG = this.Key.Substring(this.Key.IndexOf('@')+1,2);
- uce_XMType.SelectedIndex = 0;
- cmbType.SelectedIndex = 0;
- //初始化UltraDropDown控件
- //InitUltraDropDown();
- cmbPosition.SelectedIndex = 0;
- uce_GWName.SelectedIndex = 0;
- GetHCXMData();
- }
- // 设置岗位信息
- /// <summary>
- /// 设置岗位信息
- /// </summary>
- private string getPos(string key)
- {
- try
- {
- if(key.Length<5) return "未知";
- string gw=key.Substring(0,3);
- string no=key.Substring(4,1);
- string pos = "";
- switch (gw)
- {
- case "HMP":
- pos = no + "#脱硫";
- break;
- case "BOF":
- pos = no + "#转炉";
- break;
- case "CAS":
- pos = no + "#吹氩";
- break;
- case "LFS":
- pos = no + "#精炼";
- break;
- case "CCM":
- pos = no + "#连铸机";
- break;
- }
- return pos;
- }
- catch { return "未知"; }
-
- }
- // 交接班项目配置数据查询
- /// <summary>
- /// 交接班项目配置数据查询
- /// </summary>
- private void GetHCXMData()
- {
- string strWhere = "";
- try
- {
- if (chkItemType.Checked == true)
- {
- if (cmbType.SelectedIndex < 0)
- {
- MessageBox.Show("查询条件项目类型不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- cmbType.Focus();
- return;
- }
- else
- {
- strWhere = " and a.itemtype='" + cmbType.Value.ToString() + "'";
- }
- }
- if (chkGWName.Checked == true)
- {
- if (cmbPosition.SelectedIndex < 0)
- {
- MessageBox.Show("查询条件岗位名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- cmbType.Focus();
- return;
- }
- else
- {
- strWhere += " and a.stationcode = '" + cmbPosition.SelectedItem.DataValue.ToString() + "'";
- }
- }
- dataTable1.Rows.Clear();
- string strErr = "";
- //获取交接班耗材,设备数据
- DataSet ds = new DataSet();
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- ArrayList sqlList = new ArrayList();
- arry.Add("frmJJBBase_Query.select");//此ID为XML文件ID
- sqlList.Add(strWhere);
- //调用服务端方法
- CoreClientParam CCP_JJBQuery = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_JJBQuery.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_JJBQuery.MethodName = "doQuery";
- CCP_JJBQuery.ServerParams = new object[] { arry ,sqlList};
- CCP_JJBQuery.SourceDataTable = dt;
- this.ExecuteSortResultByQueryToDataTable(CCP_JJBQuery, CoreInvokeType.Internal);
-
- ds.Tables.Add(dt);
- if (strErr != "")
- {
- MessageBox.Show(strErr);
- }
- else
- {
- if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
- {
- int RowId = 1;
- foreach (DataRow Drow in ds.Tables[0].Rows)
- {
- DataRow newRow = dataTable1.NewRow();
- foreach (DataColumn dataColumn in ds.Tables[0].Columns)
- {
- if(dataColumn.ColumnName!="STATIONCODE")
- {
- newRow[dataColumn.ColumnName] = Drow[dataColumn.ColumnName].ToString();
- }
- if (dataColumn.ColumnName == "STATIONCODE")
- {
- newRow[dataColumn.ColumnName] = getPos(Drow[dataColumn.ColumnName].ToString().Trim());
- }
- }
- dataTable1.Rows.Add(newRow);
- RowId++;
- }
- dataTable1.AcceptChanges();
- }
- }
- }
- catch (System.Exception exp)
- {
- WriteLog(exp.Message);
- }
- finally
- {
- }
- }
- /// <summary>
- /// 写日志信息到日志文件
- /// </summary>
- /// <param name="str"></param>
- private void WriteLog(string str)
- {
- string strDate = System.DateTime.Now.Year.ToString() + System.DateTime.Now.Month.ToString() + System.DateTime.Now.Day.ToString();
- this.WriteLog(str, this.UserInfo.GetUserName(), "frmMaintenance" + strDate, LogInfoLevel.Message);
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- DialogResult result;
- switch (ToolbarKey)
- {
- case "Query": //显示数据
- GetHCXMData();
- break;
- case "Add"://新增
- AddHCXMData();
- GetHCXMData();
- break;
- case "Update":
- result = MessageBox.Show(this, "您确定要修改此项目配置吗?", "提示", MessageBoxButtons.YesNo,
- MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
- if (result == DialogResult.Yes)
- {
- UpdateHCXMData();
- GetHCXMData();
- }
- break;
- case "Delete":
- string mk = "确定要删除此项目配置吗?";
- result = MessageBox.Show(this, mk, "提示", MessageBoxButtons.YesNo,
- MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
- if (result == DialogResult.Yes)
- {
- DeleteHCXMData();
- GetHCXMData();
- }
- break;
- case "Export":
- try
- {
- Core.Mes.Client.Comm.Globals.ulGridToExcel(ultraGrid2, Text);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- break;
- case "Exit":
- this.Close();
- break;
- default:
- break;
- }
-
- }
- // 新增耗材项目编码数据
- /// <summary>
- /// 新增耗材项目编码数据
- /// </summary>
- public void AddHCXMData()
- {
- try
- {
-
- //耗材项目名称
- string strXMNAME = null;
- if (string.IsNullOrEmpty(tb_XMNAME.Text.Trim()))
- {
- MessageBox.Show("项目名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- else
- strXMNAME = tb_XMNAME.Text.Trim();
- //项目类型
- if (uce_XMType.SelectedIndex<0)
- {
- MessageBox.Show("项目类型不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- string strXMType = uce_XMType.Value.ToString();
- //岗位编码
- string strGWName = "";
- if (uce_GWName.SelectedIndex < 0)
- {
- MessageBox.Show("岗位名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- try
- {
- strGWName = uce_GWName.Value.ToString();
- }
- catch { strGWName = "0"; }
- string strErr = "";
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList sArgs = new ArrayList();
- sArgs.Add(strXMNAME);
- sArgs.Add(strXMType);
- sArgs.Add(strGWName);
- ClsDataAccessPack.DoProcedure("frmMaintenance_AddToPos.select", sArgs, out strErr, ob);
- if (strErr != "")
- {
- MessageBox.Show("交接班项目配置新增失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- else
- MessageBox.Show("交接班项目配置新增成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
-
- }
- catch (System.Exception exp)
- {
- WriteLog(exp.Message);
- }
- finally
- {
- }
- }
- // 修改耗材项目,设备状况数据
- /// <summary>
- /// 修改耗材项目,设备状况数据
- /// </summary>
- public void UpdateHCXMData()
- {
- try
- {
- //耗材项目名称
- string strXMNAME = null;
- if (string.IsNullOrEmpty(tb_XMNAME.Text.Trim()))
- {
- MessageBox.Show("项目名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- else
- strXMNAME = tb_XMNAME.Text.Trim();
- //项目类型
- if (uce_XMType.SelectedIndex < 0)
- {
- MessageBox.Show("项目类型不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- string strXMType = uce_XMType.Value.ToString();
- //岗位编码
- string strGWName = "";
- if (uce_GWName.SelectedIndex < 0)
- {
- MessageBox.Show("岗位名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- try
- {
- strGWName = uce_GWName.Value.ToString();
- }
- catch { strGWName = "0"; }
-
- string strErr = "";
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- arry.Add("frmJJBBase_Update.select");
- arry.Add(strXMNAME);
- arry.Add(strXMType);
- arry.Add(strGWName);
- arry.Add(ultraGrid2.ActiveRow.Cells["ItemCode"].Value.ToString().Trim());
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- string info = cctos.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arry, out strErr);
-
- if (strErr != "")
- {
- MessageBox.Show("交接班项目配置修改失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); ;
- }
- else
- {
- MessageBox.Show("交接班项目配置修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- dataTable1.Clear();
- }
-
- }
- catch (System.Exception exp)
- {
- WriteLog(exp.Message);
- MessageBox.Show("修改失败!");
- }
- finally
- {
- }
- }
- // 删除耗材项目,设备状况数据
- /// <summary>
- /// 删除耗材项目,设备状况数据
- /// </summary>
- public void DeleteHCXMData()
- {
- try
- {
- string strErr = "";
- string strXMCODE = ultraGrid2.ActiveRow.Cells["ItemCODE"].Text.Trim();
-
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- arry.Add("frmJJBBase_Del.select");
- arry.Add(strXMCODE);
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- string info = cctos.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave",
- "doSimpleSave", arry, out strErr);
- if (strErr != "")
- {
- MessageBox.Show("交接班项目配置删除失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- else
- {
- tb_XMCODE.Text = "";
- tb_XMNAME.Text = "";
- MessageBox.Show("交接班项目配置删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- }//end try
- catch (System.Exception exp)
- {
- WriteLog(exp.Message);
- }
- finally
- {
- }
- }
- private void chkItemType_CheckedChanged(object sender, EventArgs e)
- {
- cmbType.Enabled = chkItemType.Checked;
- }
- private void chkGWName_CheckedChanged(object sender, EventArgs e)
- {
- cmbPosition.Enabled = chkGWName.Checked;
- }
- private void ultcbo_ValueChanged(object sender, EventArgs e)
- {
- GetHCXMData();
- }
- private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- if (ultraGrid2.ActiveRow == null || ultraGrid2.Rows.Count==0)
- {
- return;
- }
- tb_XMCODE.Text = ultraGrid2.ActiveRow.Cells["ItemCODE"].Text.Trim();
- tb_XMNAME.Text = ultraGrid2.ActiveRow.Cells["ItemNAME"].Text.Trim();
- uce_XMType.Text = ultraGrid2.ActiveRow.Cells["ItemTYPE"].Text.Trim();
- uce_GWName.Text = ultraGrid2.ActiveRow.Cells["STATIONCODE"].Text.Trim();
- this.ultraGrid2.ActiveRow.Selected = true;
- }
- catch { }
- }
- }
- }
|