public void Add(Workshop workshop)
 {
     if (workshop == null || Workshops.Contains(workshop))
     {
         return;
     }
     Workshops.Add(workshop);
 }
Example #2
0
        private void Seed()
        {
            Users.Add(
                "Roman", new User()
            {
                City       = "Lviv",
                Country    = "Ukraine",
                Email      = "*****@*****.**",
                PostalCode = 81000,
                UserName   = "******"
            });

            Users.Add(
                "Dariia", new User()
            {
                City       = "Kyiv",
                Country    = "Ukraine",
                Email      = "*****@*****.**",
                PostalCode = 79000,
                UserName   = "******"
            });

            Workshops.Add("Car Repair",
                          new CarWorkshop
            {
                PostalCode    = 81000,
                Country       = "Ukraine",
                City          = "Lviv",
                CompanyName   = "Car Repair",
                CarTrademarks = new List <string>
                {
                    "VW", "BMW"
                }
            });

            Workshops.Add("Automoto",
                          new CarWorkshop
            {
                PostalCode    = 79000,
                Country       = "Ukraine",
                City          = "Kyiv",
                CompanyName   = "Automoto",
                CarTrademarks = new List <string>
                {
                    "VW", "MB"
                }
            });
        }
Example #3
0
        /*public ObservableCollection<Poststed> Source
         * {
         *  get
         *  {
         *      // TODO WTS: Replace this with your actual data
         *      ObservableCollection<Poststed> poststed = PoststedDataService.AllOrdersAsync().Result;
         *      return poststed;
         *      //return PoststedDataService.GetGridSampleData();
         *  }
         * }*/
        internal async Task LoadWorkshopsAsync()
        {
            await LoadPoststedsAsyns();

            var workshops = await workshopsDataAccess.GetWorkshopsAsync();

            for (int i = 0; i < workshops.Length; i++)
            {
                Poststed postnumber = workshops[i].Ws_poststed;
                Workshops.Add(new Workshop
                {
                    Ws_address   = workshops[i].Ws_address,
                    Ws_id        = workshops[i].Ws_id,
                    Ws_name      = workshops[i].Ws_name,
                    Ws_orgnumber = workshops[i].Ws_orgnumber,
                    Ws_poststed  = Poststeds[5000]
                });
            }
        }