public void GetCuisines()
        {
            var rec = ReciepeBookHelper.GetCuisines();

            Cuisines.Clear();
            foreach (var item in rec)
            {
                Cuisines.Add(item);
            }
        }
        public void GetReciepeTypes()
        {
            var rec = ReciepeBookHelper.GetReciepeTypes();

            ReciepeTypes.Clear();
            foreach (var item in rec)
            {
                ReciepeTypes.Add(item);
            }
        }
Exemplo n.º 3
0
        public void GetReciepesByCategories()
        {
            var rec = ReciepeBookHelper.GetReciepesByCategory(selectedCuisine, Rating, Calories, CookingTime);

            Reciepes.Clear();
            foreach (var item in rec)
            {
                Reciepes.Add(item);
            }
        }
Exemplo n.º 4
0
        public SendMessageWindow(User user, string email)
        {
            InitializeComponent();
            User    = user;
            EmailTo = email;
            if (!String.IsNullOrEmpty(email))
            {
                tbTo.Text = EmailTo;
            }
            foreach (var item in ReciepeBookHelper.GetReciepes())
            {
                Reciepes.Add(new Reciepe()
                {
                    Id          = item.Id,
                    ReciepeName = item.ReciepeName,
                    Ingredients = item.Ingredients,
                    PhotoPath   = item.PhotoPath,
                    Instruction = item.Instruction,
                    CookingTime = item.CookingTime,
                    Calories    = item.Calories,
                    Raiting     = (int)item.Rating,

                    Cuisine = new Cuisine()
                    {
                        Name = item.Cuisine.CuisineName,
                        Id   = (int)item.CuisineId
                    },

                    ReciepeType = new ReciepeType()
                    {
                        Name = item.ReciepeType.TypeName,
                        Id   = (int)item.TypeId
                    }
                });
            }
            DataContext = this;
        }