using System; using System.Collections.Generic; using System.Text; using System.Collections; using Infragistics.Win.UltraWinGrid; using System.Drawing; using System.Data; namespace Core.LgMes.Client.LgDeviceManager { public class LadleCommonClass { /// /// 铜管厂家编码 /// public const string strCuPipeFactoryCode = "40030406"; /// /// 塞棒厂家编码 /// public const string strStickFactoryCode = "40030405"; /// /// 涂料厂家 /// public const string strPaintFactoryCode = "40030404"; /// /// 水口厂家 /// public const string strWaterFactoryCode = "40030403"; /// /// 喷枪厂家 /// public const string strSpoutFactoryCode = "40030402"; /// /// 喷头厂家 /// public const string strSpoutHeadFactoryCode = "40030401"; /// /// 滑板厂家 /// public const string strSlideBoardFactoryCode = "40030407"; /// /// 耐材厂 /// public const string strRefractoryMatterFactoryCode = "40030408"; /// /// 透气蕊厂家 /// public const string strVentilateFactoryCode = "40030409"; /// /// 钢包包况 /// public const string strVentilatePotSFactoryCode = "400305"; /// /// 钢包等级 /// public const string strVentilateLVLFactoryCode = "400306"; /// /// 包口掉砖 /// public const string strVentilateBKDZFactoryCode = "400307"; /// /// 根据条件设置DataGrid背景颜色 /// /// DataGrid控件 /// Hashtable存放条件字段和颜色 /// 条件列名 /// 是否整列设置背景 public static void SetGridBackColor(Infragistics.Win.UltraWinGrid.UltraGrid ultMain, Hashtable htMain, string ColumnName,bool blRow) { for (int intCount = 0; intCount < ultMain.Rows.Count; intCount++) { for (int inthtCount = 0; inthtCount < htMain.Count; inthtCount++) { if (blRow == true) { if (htMain[ultMain.DisplayLayout.Rows[intCount].Cells[ColumnName].Value.ToString()] != null) { foreach (UltraGridCell cell in ultMain.Rows[intCount].Cells) cell.Appearance.BackColor = (System.Drawing.Color)htMain[ultMain.DisplayLayout.Rows[intCount].Cells[ColumnName].Value.ToString()]; //根据条件显示背景颜色 } } else ultMain.DisplayLayout.Rows[intCount].Cells[ColumnName].Appearance.BackColor = (System.Drawing.Color)htMain[ultMain.DisplayLayout.Rows[intCount].Cells[ColumnName].Value.ToString()]; } } } /// /// 更新铁包基础信息状态,包龄 /// /// 铁包号 /// 包龄 /// 状态 /// public static bool UpdateTB_Status_Age(string strLadleID,string strAge,string strStatus) { string strErr = ""; //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("LgDeviceManager", // "Core.LgMes.Server.LgDeviceManager.LadleManager", // "UpdateTB_Status_Age", // new object[] { strLadleID,strAge,strStatus }, out strErr); if (strErr != "") return false; else return true; } /// /// 获取钢钟信息 /// /// 分类编码 /// public static DataSet GetSteelData(string strWhere) { string strErr = ""; DataSet dsCostSteel = null; DataSet ds = null;// (DataSet)Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("LgDeviceManager", //"Core.LgMes.Server.LgDeviceManager.LadleManager", //"GetSteel", new object[] { strWhere }, out strErr); if (strErr == "" && ds != null) { dsCostSteel = ds; } return dsCostSteel; } } }