예제 #1
0
파일: User.cs 프로젝트: AJardine9/Lauren-MS
 public User(string username, string password)
 {
     Username            = username;
     Password            = password;
     Orders              = new List <ord.Order>();
     LastLocationOrdered = null;
     LastTimeOrdered     = new DateTime();
     CurrentOrder        = null;
 }
예제 #2
0
        public OrderTest()
        {
            address     = new Address("1123 Fletcher St", "Tampa", "Florida");
            userAddress = new Address("51 Viking Oak", "Tampa", "Florida");

            location = new lo.Location(address);
            user     = new us.User("admin", "password", userAddress);
            sut      = new ord.Order(user.Username, location.OrderNumber, location.Address);

            crust   = new pi.Crust();
            size    = new pi.Size();
            topping = new pi.Toppings();
        }
예제 #3
0
        public static List <pi.Pizza> GetPizzaByOrder(ord.Order order)
        {
            var dataOrder = _db.Order.Where(o => o.OrderId == order.OrderId).FirstOrDefault();

            if (dataOrder == null)
            {
                return(null);
            }

            return(GetPizzas(new List <Order>()
            {
                dataOrder
            }));
        }
예제 #4
0
파일: User.cs 프로젝트: AJardine9/Lauren-MS
 public void CancelOrder()
 {
     CurrentOrder = null;
 }
예제 #5
0
파일: User.cs 프로젝트: AJardine9/Lauren-MS
        //public void AddOrder()
        //{
        //    if (CurrentOrder != null)
        //    {
        //        Orders.Add(CurrentOrder);
        //        LastLocationOrdered = CurrentOrder.LocationAddress;
        //        LastTimeOrdered = CurrentOrder.PurchaseTime;
        //        CurrentOrder = null;
        //    }
        //}

        public void CreateOrder()
        {
            CurrentOrder = new ord.Order(Username);
        }