public ActionResult Create(int?id)
        {
            var brands = _brandApplicationService.GetAllBrands();

            ViewData["Brands"]     = new SelectList(brands, "Id", "BrandName", id);
            ViewData["Semaphores"] = _semaphoreApplicationService.GetAllSemaphores();
            SetAdviceTagViewData();
            return(View());
        }
        protected override void Before_each_spec()
        {
            var brands = _brandApplicationService.GetAllBrands();

            foreach (var brand in brands)
            {
                _brandApplicationService.DeleteBrand(brand.Id);
            }
            base.Before_each_spec();
        }
Esempio n. 3
0
        private void InitViewData()
        {
            var brands = _brandApplicationService.GetAllBrands();

            ViewData["Brand"] = new SelectList(brands, "Id", "BrandName");

            var countries = _countryApplicationService.GetAllCountries();

            ViewData["OriginCountry"] = new SelectList(countries, "Id", "CountryCode.Name");

            var certificationMarks = _certificationMarkDomainService.GetAllCertificationMarks();

            ViewData["CertificationMarks"] = certificationMarks;
        }
Esempio n. 4
0
        public ActionResult Create(int?id)
        {
            //var products = _productApplicationService.GetAllProducts();
            //ViewData["Products"] = new SelectList(products, "Id", "ProductName", id);
            var companies = _companyApplicationService.GetAllCompanies();

            ViewData["Companies"] = new SelectList(companies, "Id", "CompanyName");
            var brands = _brandApplicationService.GetAllBrands();

            ViewData["Brands"]     = new SelectList(brands, "Id", "BrandName");
            ViewData["Semaphores"] = _semaphoreApplicationService.GetAllSemaphores();
            SetAdviceTagViewData();
            return(View());
        }
Esempio n. 5
0
        public ActionResult BrandIndex()
        {
            var brands = _brandApplicationService.GetAllBrands();

            return(View(brands));
        }