Esempio n. 1
0
 public WHArea GetArea(string areaCode)
 {
     if (string.IsNullOrEmpty(areaCode) || areaCode.Trim().Length <= 0)
     {
         return(null);
     }
     DataRow[] rows = _ds.Tables["a"].Select("AreaCode='" + areaCode.Trim() + "'");
     if (rows != null && rows.Length > 0)
     {
         return(WHArea.Row2Entity(rows[0]));
     }
     else
     {
         return(null);
     }
 }
Esempio n. 2
0
        public IList <WHArea> GetAreas(string locationCode)
        {
            IList <WHArea> lists = new List <WHArea>();

            if (string.IsNullOrEmpty(locationCode) || locationCode.Trim().Length <= 0)
            {
                return(lists);
            }
            DataRow[] rows = _ds.Tables["a"].Select("LocationCode='" + locationCode.Trim() + "'", "AreaCode ASC");
            if (rows == null || rows.Length <= 0)
            {
                return(lists);
            }
            foreach (DataRow row in rows)
            {
                lists.Add(WHArea.Row2Entity(row));
            }
            return(lists);
        }