private int sous_id = 0; //Выбранный соус public BuildingPizza(ShowBasket sb) { db = new PizzaContext(); basket = sb; Images = new ObservableCollection <ImageViewModel>(); IngredientID = new List <int>(); ing = db.Ingredient.ToList().Select(i => new IngredientViewModel(i)).ToList(); AllIngredient = new List <IngredientViewModel>(); selectedingredient = ing.Where(i => i.IngredientID == 1).SingleOrDefault(); sum = selectedingredient.Price; massa = selectedingredient.Massa; IngredientID.Add(selectedingredient.IngredientID); }
private LoginScreen loginScreen; //Окно с авторизацией public MainViewModel() { db = new PizzaContext(); basket = new ShowBasket(); menu = new Katalog(basket); build = new Konstruktor(basket); kor = new Korzina(basket); report = new Page_Report(); order = new Page_Order(); SourcePage = menu; //Текущая страница }
public ShowPizza(ShowBasket sb) { db = new PizzaContext(); basket = sb; AllProduct = db.Product.ToList().Select(i => new ProductViewModel(i)).Where(i => !i.MyPizza).ToList(); }