Exemplo n.º 1
0
 public static List<CurrentDayPickup> GetPickupsForThisRoute(string tag)
 {
     var p = (from pp in CurrentDayPickup.All()
                                where (pp.CDPDefaultRouteID == tag && pp.CDPDeleted == false)
                                select pp);
     return p.ToList();
 }
Exemplo n.º 2
0
        public static void CopyPickupsToArchive()
        {
            List<CurrentDayPickup> cdpList = CurrentDayPickup.All().ToList();
            foreach (var cdp in cdpList)
            {
                var m = new PickupArchive
                    {
                        PACustomerID = cdp.CDPCustomerID,
                        PAComment = cdp.CDPComment,
                        PACustomerName = cdp.CDPCustomerName,
                        PADefaultRouteID = cdp.CDPDefaultRouteID,
                        PADispatched = cdp.CDPDispatched,
                        PADeleted = cdp.CDPDeleted,
                        PADispatchTime = cdp.CDPDispatchTime,
                        PADriverMessage = cdp.CDPDriverMessage,
                        PADriverName = cdp.CDPDriverName,
                        PANotes = cdp.CDPNotes,
                        PAPickupDate = cdp.CDPPickupDate,
                        PARouteName = cdp.CDPRouteName
                    };

                m.Save();
            }
        }
Exemplo n.º 3
0
 public static int GetUndeletedPickupCount()
 {
     return CurrentDayPickup.All().Where(x => x.CDPDeleted == false).Count();
 }
Exemplo n.º 4
0
 public static List<CurrentDayPickup> GetCDPList()
 {
     return (from p in CurrentDayPickup.All()
                             select p).ToList();
 }