Ejemplo n.º 1
0
 public Group()
 {
     AvailableGroceries = new AvailableGroceries();
     Recipes            = new List <Recipe>();
     MyGroupMembers     = new List <string>();
     ShoppingCart       = new ShoppingCart();
 }
Ejemplo n.º 2
0
 public Group(string id, AvailableGroceries availableGroceries, List <string> myGroupMembers, ShoppingCart shoppingCart, List <Recipe> recipes)
 {
     Id = id;
     AvailableGroceries = availableGroceries;
     MyGroupMembers     = myGroupMembers;
     ShoppingCart       = shoppingCart;
     Recipes            = recipes;
 }
Ejemplo n.º 3
0
 public void ToShoppingCart(List <ShoppingCartDetails> details)
 {
     if (details.Count != 0)
     {
         foreach (var grocery in details)
         {
             Grocery newGrocery = new Grocery(grocery.Grocery.Name, Grocery.ParseEnum <Unit>(grocery.Grocery.Unit), Grocery.ParseEnum <Category>(grocery.Grocery.Category), grocery.Amount);
             Groceries.AddToList(newGrocery);
         }
     }
     else
     {
         Groceries = new AvailableGroceries();
     }
 }
Ejemplo n.º 4
0
 protected ChamberOfSecrets()
 {
     LoggedUser   = new User();
     AllGroceries = new AvailableGroceries();
     group        = new Group();
 }
Ejemplo n.º 5
0
 public ShoppingCart(AvailableGroceries groceries)
 {
     Groceries = groceries;
 }
Ejemplo n.º 6
0
 public ShoppingCart()
 {
     Groceries = new AvailableGroceries();
 }