Exemple #1
0
        /// <summary>
        /// 获取指定设备的实时故障
        /// </summary>
        /// <param name="space"></param>
        /// <param name="index"></param>
        /// <returns></returns>
        public static string[] GetMachineError(FlushAllError.SpaceList space, int index)
        {
            List <string> result = new List <string>();

            using (DataTable dt = frmMain.mMain.AllDataBase.ReportData.Read(string.Format("select * from StatueErrorAllTmp where ErrorSpace={0}", GetMachineIndexForAllError(space, index))))
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        result.Add(All.Class.Num.ToString(dt.Rows[i]["ErrorText"]));
                    }
                }
            }
            return(result.ToArray());
        }
Exemple #2
0
 /// <summary>
 /// 取设备识别号
 /// </summary>
 /// <param name="space"></param>
 /// <param name="index"></param>
 /// <returns></returns>
 public static int GetMachineIndexForAllError(FlushAllError.SpaceList space, int index)
 {
     return(index + 1000 * (int)space);
 }
 public bool Show(FlushAllError.SpaceList space)
 {
     return(AllSheBeiShows[(int)space]);
 }