public List <CollectionPointList> GetAllCollectionPoint() { List <CollectionPointList> cpl = new List <CollectionPointList>(); List <CollectionPoint> cp = icps.GetAllCollectionPoint(); foreach (CollectionPoint c in cp) { CollectionPointList collection = new CollectionPointList(); collection.EmployeeId = c.EmployeeId.ToString(); collection.LocationId = c.LocationId; collection.LocationName = c.LocationName; collection.Time = c.Time.ToString(); cpl.Add(collection); } return(cpl); }
public CollectionPointList FindCollectionById(string id) { CollectionPointList cpl = null; CollectionPoint cp = icps.GetCollectionPointById(id); if (cp != null) { cpl = new CollectionPointList() { LocationId = cp.LocationId, LocationName = cp.LocationName, EmployeeId = cp.EmployeeId.ToString(), Time = cp.Time.ToString() }; } return(cpl); }