| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343 |
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Data;
- using CoreFS.CA06;
- using Infragistics.Win;
- using Infragistics.Win.UltraWinGrid;
- namespace Core.LgMes.Client.LgIntegrationQuery
- {
- /// <summary>
- /// ElementsForm 的摘要说明。
- /// </summary>
- public class frmLgEleConfig : Core.Mes.Client.Common.frmStyleBase
- {
- private System.Data.DataSet dataSet1;
- private System.Data.DataTable dataTable1;
- private System.Data.DataColumn dataColumn1;
- private System.Data.DataColumn dataColumn2;
- private System.Data.DataColumn dataColumn3;
- private System.ComponentModel.IContainer components;
- public static string StrHic;
- public static string StrT;
- private UltraGrid ultraGrid1;
- private string m_szGW = "";
- public static string szEleStd = "";
- private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
- private Label lblSteel;
- private Label lblHeatID;
- private Label label2;
- private Label label1;
- private DataColumn dataColumn4; //化学成分标准列名
- public static string strSteelCode = "";
- public string Hic
- {
- get
- {
- return StrHic;
- }
- set
- {
- StrHic=value;
- }
- }
- public string Bzhi
- {
- get
- {
- return StrT;
- }
- set
- {
- StrT=value;
- }
- }
- public frmLgEleConfig( string StrHic, string StrT, string szGW)
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- //this.Remoting =Remotingh;
- this.Hic=StrHic;
- this.Bzhi=StrT;
- m_szGW = szGW;
- }
- /// <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.Appearance appearance1 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Table1", -1);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("序号");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("项目名称");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("标准范围");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("std_dc");
- this.dataSet1 = new System.Data.DataSet();
- this.dataTable1 = new System.Data.DataTable();
- this.dataColumn1 = new System.Data.DataColumn();
- this.dataColumn2 = new System.Data.DataColumn();
- this.dataColumn3 = new System.Data.DataColumn();
- this.dataColumn4 = new System.Data.DataColumn();
- this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
- this.lblSteel = new System.Windows.Forms.Label();
- this.lblHeatID = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
- ((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.dataColumn1,
- this.dataColumn2,
- this.dataColumn3,
- this.dataColumn4});
- this.dataTable1.TableName = "Table1";
- //
- // dataColumn1
- //
- this.dataColumn1.ColumnName = "序号";
- //
- // dataColumn2
- //
- this.dataColumn2.ColumnName = "项目名称";
- //
- // dataColumn3
- //
- this.dataColumn3.ColumnName = "标准范围";
- //
- // dataColumn4
- //
- this.dataColumn4.Caption = "标准类型";
- this.dataColumn4.ColumnName = "std_dc";
- //
- // ultraGrid1
- //
- this.ultraGrid1.DataMember = "Table1";
- this.ultraGrid1.DataSource = this.dataSet1;
- appearance1.BackGradientStyle = Infragistics.Win.GradientStyle.None;
- this.ultraGrid1.DisplayLayout.Appearance = appearance1;
- ultraGridColumn1.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn1.Header.VisiblePosition = 0;
- ultraGridColumn1.Hidden = true;
- ultraGridColumn1.Width = 42;
- ultraGridColumn2.Header.VisiblePosition = 1;
- ultraGridColumn2.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(60, 0);
- ultraGridColumn3.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn3.Header.VisiblePosition = 2;
- ultraGridColumn3.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(103, 0);
- ultraGridColumn3.Width = 117;
- ultraGridColumn4.Header.VisiblePosition = 3;
- ultraGridColumn4.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(74, 0);
- ultraGridBand1.Columns.AddRange(new object[] {
- ultraGridColumn1,
- ultraGridColumn2,
- ultraGridColumn3,
- ultraGridColumn4});
- ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
- this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
- this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraGrid1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.ultraGrid1.Location = new System.Drawing.Point(0, 49);
- this.ultraGrid1.Name = "ultraGrid1";
- this.ultraGrid1.Size = new System.Drawing.Size(298, 304);
- this.ultraGrid1.TabIndex = 6;
- //
- // ultraGroupBox1
- //
- this.ultraGroupBox1.Controls.Add(this.lblSteel);
- this.ultraGroupBox1.Controls.Add(this.lblHeatID);
- this.ultraGroupBox1.Controls.Add(this.label2);
- this.ultraGroupBox1.Controls.Add(this.label1);
- 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(298, 49);
- this.ultraGroupBox1.TabIndex = 7;
- //
- // lblSteel
- //
- this.lblSteel.AutoSize = true;
- this.lblSteel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblSteel.ForeColor = System.Drawing.Color.Blue;
- this.lblSteel.Location = new System.Drawing.Point(191, 18);
- this.lblSteel.Name = "lblSteel";
- this.lblSteel.Size = new System.Drawing.Size(0, 12);
- this.lblSteel.TabIndex = 3;
- //
- // lblHeatID
- //
- this.lblHeatID.AutoSize = true;
- this.lblHeatID.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblHeatID.ForeColor = System.Drawing.Color.Blue;
- this.lblHeatID.Location = new System.Drawing.Point(63, 18);
- this.lblHeatID.Name = "lblHeatID";
- this.lblHeatID.Size = new System.Drawing.Size(0, 12);
- this.lblHeatID.TabIndex = 2;
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(150, 18);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(41, 12);
- this.label2.TabIndex = 1;
- this.label2.Text = "钢种:";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(21, 18);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(41, 12);
- this.label1.TabIndex = 0;
- this.label1.Text = "炉号:";
- //
- // frmLgEleConfig
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.ClientSize = new System.Drawing.Size(298, 353);
- this.Controls.Add(this.ultraGrid1);
- this.Controls.Add(this.ultraGroupBox1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "frmLgEleConfig";
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "成分标准";
- this.Load += new System.EventHandler(this.ElementsForm_Load);
- ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
- this.ultraGroupBox1.ResumeLayout(false);
- this.ultraGroupBox1.PerformLayout();
- this.ResumeLayout(false);
- }
- #endregion
- private void ElementsForm_Load(object sender, System.EventArgs e)
- {
- lblHeatID.Text = StrHic.Substring(0, 10);
- lblSteel.Text = strSteelCode;
- //this.RemotingHelp =Remoting;
- GetTAM_StandardElement();
- //ElementsForm.ActiveForm .WindowState =0;
- //ElementsForm.ActiveForm.StartPosition =System.Windows .Forms .FormStartPosition.CenterParent;
- // ElementsForm.ActiveForm.Width =224;
- // ElementsForm.ActiveForm.Height =360;
-
-
- }
- public void GetTAM_StandardElement()/// 查询判定牌号成分
- {
-
-
- string err = "";
- string szWhere = "";
-
- object obj = new object();
- szWhere = Hic.Substring(0, 10); //条件
-
- string szCrfStd = "('L02001','L02005') ";
- if (!string.IsNullOrEmpty(szEleStd))
- {
- szEleStd = "('" + szEleStd.Substring(3, szEleStd.Length - 3) + "')";
- //获取成分标准
- obj = null;//hengxing ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
- // "Core.LgMes.Server.lgJobMgt.classCommonModule",
- // "GetProcStandardValue", new object[] { szWhere, szEleStd, szCrfStd }, out err);
- }
- if (err != "")
- {
- MessageBox.Show(err);
- }
- else if (obj != null)
- {
- ArrayList ar = new ArrayList();
- ar = obj as ArrayList;
- DataSet dsStandard = ar[0] as DataSet;
- if (dsStandard.Tables[0].Rows.Count > 0)
- {
- int RowId = 1;
- DataRow newRow = null;//dataTable1.NewRow();
- foreach (DataRow Drow in dsStandard.Tables[0].Rows)
- {
- newRow = dataTable1.NewRow();
- newRow[0] = RowId;
- newRow[1] = Drow["basename"].ToString();
- if (Drow["ITEM1MIN"].ToString() != "" && Drow["ITEM1MAX"].ToString() != "")
- newRow[2] = Drow["ITEM1MIN"].ToString() + " - " + Drow["ITEM1MAX"].ToString();
- else if (Drow["ITEM1MIN"].ToString() != "" && Drow["ITEM1MAX"].ToString() == "")
- newRow[2] = "> " + Drow["ITEM1MIN"].ToString();
- else if (Drow["ITEM1MIN"].ToString() == "" && Drow["ITEM1MAX"].ToString() != "")
- newRow[2] = "≤ " + Drow["ITEM1MAX"].ToString();
- newRow[3] = Drow["std_dc"].ToString() == "1" ? "国标" : "内控";
- dataTable1.Rows.Add(newRow);
- RowId++;
- }
- }
- }
-
- }
- private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
- {
- ultraGrid1.DisplayLayout .Bands [0].Columns [0].Width =30;
- ultraGrid1.DisplayLayout .Bands [0].Columns [1].Width =40;
- ultraGrid1.DisplayLayout .Bands [0].Columns [2].Width =120;
-
- }
- }
- }
|