public IList <WHLocation> GetLocations()
        {
            DataRow[]          rows  = _ds.Tables["l"].Select("", "LocationCode ASC");
            IList <WHLocation> lists = new List <WHLocation>();

            if (rows == null || rows.Length <= 0)
            {
                return(lists);
            }
            foreach (DataRow row in rows)
            {
                lists.Add(WHLocation.Row2Entity(row));
            }
            return(lists);
        }
 public WHLocation GetLocation(string locationCode)
 {
     if (string.IsNullOrEmpty(locationCode) || locationCode.Trim().Length <= 0)
     {
         return(null);
     }
     DataRow[] rows = _ds.Tables["l"].Select("LocationCode='" + locationCode.Trim() + "'");
     if (rows != null && rows.Length > 0)
     {
         return(WHLocation.Row2Entity(rows[0]));
     }
     else
     {
         return(null);
     }
 }