using System; using System.Data; namespace MisDataSaveDateMesRead { public partial class Funtion { /// /// 数据表 /// /// static public DataTable BuildDataTables_WWW() { DataTable table; DataColumnCollection columns; table = new DataTable(); columns = table.Columns; table.Columns.Add("TagID", typeof(System.String)); table.Columns.Add("TagValue", typeof(System.String)); table.Columns.Add("IsGoodBad", typeof(System.Int32)); table.Columns.Add("测量位置", typeof(System.String)); table.Columns.Add("测量项目", typeof(System.String)); table.Columns.Add("工位号", typeof(System.String)); table.Columns.Add("理论值", typeof(System.String)); table.Columns.Add("上限值", typeof(System.String)); table.Columns.Add("下限值", typeof(System.String)); table.Columns.Add("测量单位", typeof(System.String)); table.Columns.Add("列位置", typeof(System.Int32)); table.Columns.Add("变量排序", typeof(System.Int32)); return table; } /// /// 返回非标准real /// /// /// static public string GetNoNormalReal(object vDataValue) { try { string real_a; string real_b; string groupValueString; int length; //int real_b_Int; length = ((System.Array)(vDataValue)).Length; groupValueString = ""; if (length != 2) return "0.0"; real_a = Convert.ToUInt16((((System.Array)(vDataValue)).GetValue(0))).ToString(); real_b = Convert.ToUInt16((((System.Array)(vDataValue)).GetValue(1))).ToString("00"); groupValueString = real_a + "." + real_b; return groupValueString; } catch { ////ApplicationLog.WriteLog(err, "GetNoNormalReal"); return "0.0"; } } /// /// 29 工位具体零件合格标志 /// /// static public string GetQualityData_GoodBad_String(bool[] QualityData_GoodBad) { string str; str = ""; if (QualityData_GoodBad != null) { for (int i = 0; i < QualityData_GoodBad.Length; i++) { str = str + (Convert.ToInt32(QualityData_GoodBad[i])).ToString() + "|"; } } return str; } /// /// 返回非标准real /// /// /// } }