Ejemplo n.º 1
0
        public DeleteFoodPage(string language) : this()
        {
            this.MainLanguage = language;

            Types = MainFunctions.GetFoodTypes(MainLanguage);
            FoodTypeBox.ItemsSource = Types.ToArray();

            Languages = MainFunctions.GetLanguages();
            FoodLanguageBox.ItemsSource = Languages.ToArray();

            ShopContext shopContext = new ShopContext();

            Foods = shopContext.Food
                    .Join(shopContext.FoodDictionary, f => f.FoodID, t => t.FoodID,
                          (f, t) => new { FoodId = f.FoodID, FoodName = t.Name, LanguageId = t.LanguageID })
                    .Join(shopContext.Language, f => f.LanguageId, l => l.LanguageID,
                          (f, l) => new { FoodId = f.FoodId, FoodName = f.FoodName, Language = l.Name })
                    .Where(l => l.Language == MainLanguage)
                    .Select(ft => new FoodPropertie
            {
                FoodName = ft.FoodName,
                FoodId   = ft.FoodId
            }).ToList();
            FoodList.ItemsSource = Foods.ToArray();
        }
Ejemplo n.º 2
0
        public DeleteUnitPage(string language) : this()
        {
            this.MainLanguage           = language;
            Languages                   = MainFunctions.GetLanguages();
            UnitLanguageBox.ItemsSource = Languages.ToArray();

            RefreshList(MainLanguage);
        }
Ejemplo n.º 3
0
        public EditFoodTypePage(string language) : this()
        {
            this.MainLanguage = language;

            Languages = MainFunctions.GetLanguages();
            LanguageBox.ItemsSource = Languages.ToArray();

            RefreshList();
        }
Ejemplo n.º 4
0
        public SettingsPage()
        {
            InitializeComponent();

            Languages = MainFunctions.GetLanguages();
            AppLanguage.ItemsSource = Languages.ToArray();
            AppLanguage.Text        = MainFunctions.Main.MainLanguage;
            this.Resources          = MainFunctions.GetLanguageResource();
        }
Ejemplo n.º 5
0
        public AddShopStorePage(string language, int shopId) : this()
        {
            this.MainLanguage = language;
            this.ShopId       = shopId;

            Languages = MainFunctions.GetLanguages();
            LanguageBox.ItemsSource = Languages.ToArray();
            RefreshList(MainLanguage);
        }
Ejemplo n.º 6
0
        public AddUnitPage(string language) : this()
        {
            this.MainLanguage = language;
            LanguageNum       = 1;

            Languages = MainFunctions.GetLanguages();
            UnitNames.Items.Add(new NewLanguage {
                Languages = Languages
            });
        }
Ejemplo n.º 7
0
        public AddFoodTypePage(string language) : this()
        {
            this.MainLanguage = language;
            AddedImage        = false;
            LanguageNum       = 1;

            Languages = MainFunctions.GetLanguages();
            FoodTypeNames.Items.Add(new NewLanguage {
                Languages = Languages
            });
        }
Ejemplo n.º 8
0
        public DeleteShopStorePage(string language, int shopId) : this()
        {
            this.MainLanguage = language;
            this.ShopId       = shopId;

            Languages = MainFunctions.GetLanguages();
            StoreLanguageBox.ItemsSource = Languages.ToArray();

            Types = MainFunctions.GetFoodTypes(MainLanguage);
            FoodTypeBox.ItemsSource = Types.ToArray();

            RefreshList(MainLanguage);
        }
Ejemplo n.º 9
0
        public EditFoodPage(string language) : this()
        {
            this.MainLanguage = language;

            ShopContext shopContext = new ShopContext();

            Languages = MainFunctions.GetLanguages();
            FoodLanguageBox.ItemsSource = Languages.ToArray();

            Types = MainFunctions.GetFoodTypes(MainLanguage);
            FoodTypeBox.ItemsSource = Types.ToArray();

            RefreshList();
        }
Ejemplo n.º 10
0
        public AddFoodPage(string language) : this()
        {
            this.MainLanguage = language;
            AddedImage        = false;
            LanguageNum       = 1;

            Types = MainFunctions.GetFoodTypes(MainLanguage);
            FoodType.ItemsSource = Types.ToArray();

            Languages = MainFunctions.GetLanguages();
            LanguageBox.ItemsSource = Languages.ToArray();
            FoodNames.Items.Add(new NewLanguage {
                Languages = Languages
            });
        }