| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Text;
- using System.Windows.Forms;
- using System.Collections;
- using Core.LgMes.Client.Comm;
- namespace Core.LgMes.Client.LgJobMgt
- {
- public partial class ucBofIronInfo : UserControl
- {
- public ucBofIronInfo()
- {
- InitializeComponent();
- CStaticMethod.SetUltraGridStyle(ultraGrid1, 2); //设置样式
- }
- private void ucBofIronInfo_Load(object sender, EventArgs e)
- {
- ultraDataSource1.Rows.Add(new object[] { "", "", "", "", "", "" });
- }
- public void ResetData()
- {
- try
- {
- for (int i = 0; i < this.ultraDataSource1.Band.Columns.Count; i++)
- {
- if (this.ultraDataSource1.Band.Columns[i].DataType == typeof(System.DateTime))
- this.ultraDataSource1.Rows[0][i] = null;
- else
- this.ultraDataSource1.Rows[0][i] = "";
- }
- }
- catch { }
- }
- public void SetData(Hashtable ar)
- {
- if (ar == null || ar.Count == 0)
- return;
- int count = this.ultraDataSource1.Band.Columns.Count;
- string strKey = "";
- for (int i = 0; i < count; i++)
- {
- try
- {
- strKey = this.ultraDataSource1.Band.Columns[i].Key;
- if (ar.Contains(strKey))
- if (strKey == "MOLIRNTYPE") //铁水来源
- {
- string strMolirnType = "";
- if (ar[strKey].ToString().Length == 2)
- {
- switch (ar[strKey].ToString().Substring(0, 1))
- {
- case "1":
- strMolirnType = "半钢";
- break;
- case "2":
- strMolirnType = "脱硫";
- break;
- case "3":
- strMolirnType = "混铁炉";
- break;
- case "4":
- strMolirnType = "直上";
- break;
- default:
- break;
- }
- }
- this.ultraDataSource1.Rows[0][i] = strMolirnType;
- }
- else
- this.ultraDataSource1.Rows[0][i] = ar[strKey];
- else
- {
- if (this.ultraDataSource1.Band.Columns[i].DataType == typeof(System.DateTime))
- this.ultraDataSource1.Rows[0][i] = null;
- else
- this.ultraDataSource1.Rows[0][i] = "";
- }
- }
- catch { }
- }
- }
- }
- }
|