コード例 #1
0
        public static string[] getPostiveLine()
        {
            DataSet ds = AGVStatusDAL.getDatasetByWhere(PlatForm, " direction = 1");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                string[] str = new string[ds.Tables[0].Rows.Count];
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    str[i] = ds.Tables[0].Rows[i]["line"].ToString();
                }
                return(str);
            }
            return(null);
        }
コード例 #2
0
 public static WZYB.Model.AGVStatus GetAgvModel(int id)
 {
     try
     {
         DataSet ds = AGVStatusDAL.getDatasetByIdAndTable(id, AGVtable);
         if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
         {
             return(DataTableToAgvList(ds.Tables[0])[0]);
         }
         return(null);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
        public static Dictionary <string, string> getPlatFormLine()
        {
            DataSet ds = AGVStatusDAL.getDatasetByWhere(PlatForm, " Platformid <> 0 order by Platformid asc ");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                Dictionary <string, string> Platline = new Dictionary <string, string>();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string row = dt.Rows[i]["Platformid"].ToString();
                    if (Platline.ContainsKey(row))
                    {
                        Platline[row] = Platline[row].ToString() + "," + dt.Rows[i]["line"].ToString();
                    }
                    else
                    {
                        Platline.Add(row, dt.Rows[i]["line"].ToString());
                    }
                }
                return(Platline);
            }
            return(null);
        }