Пример #1
0
        //public ActionResult DeleteConfirmed(int id)
        //{
        //    try
        //    {
        //        itemServices.Delete(id);
        //        return RedirectToAction("Index");
        //    }
        //    catch
        //    {
        //        return View();
        //    }

        //}

        public void loadAll()
        {
            var CategoryList = categoryServices.GetAll();

            ViewBag.categorylist = new SelectList(CategoryList, "CategoryId", "CategoryName");

            var SubCategoryList = subCategoryServices.GetAll();

            ViewBag.subCategorylist = new SelectList(SubCategoryList, "SubCategoryId", "SubCategoryName");

            var SubSubCategoryList = subSubCategoryServices.GetAll();

            ViewBag.subSubCategoryList = new SelectList(SubSubCategoryList, "SubSubCategoryId", "SubSubCategoryName");

            var SubSubSubCategoryList = subSubSubCategoryServices.GetAll();

            ViewBag.subSubSubCategoryList = new SelectList(SubSubSubCategoryList, "SubSubSubCategoryId", "SubSubSubCategoryName");

            var SubSubSubSubCategoryList = subSubSubSubCategoryServices.GetAll();

            ViewBag.subSubSubSubCategoryList = new SelectList(SubSubSubSubCategoryList, "SubSubSubSubCategoryId", "SubSubSubSubCategoryName");

            var CompanyList = companyServices.GetAll();

            ViewBag.companyList = new SelectList(CompanyList, "CompanyId", "CompanyName");

            var UnitList = unitServices.GetAll();

            ViewBag.unitList = new SelectList(UnitList, "UnitId", "UnitName");

            var StoreList = storeServices.GetAll();

            ViewBag.storeList = new SelectList(StoreList, "StoreId", "StoreName");

            var SubStoreList = subStoreServices.GetAll();

            ViewBag.subStoreList = new SelectList(SubStoreList, "SubStoreId", "SubStoreName");

            var SubSubStoreList = subSubStoreServices.GetAll();

            ViewBag.subSubStoreList = new SelectList(SubSubStoreList, "SubSubStoreId", "SubSubStoreName");

            var SubSubSubStoreList = subSubSubStoreServices.GetAll();

            ViewBag.subSubSubStoreList = new SelectList(SubSubSubStoreList, "SubSubSubStoreId", "SubSubSubStoreName");

            var SubSubSubSubStoreList = subSubSubSubStoreServices.GetAll();

            ViewBag.subSubSubSubStoreList = new SelectList(SubSubSubSubStoreList, "SubSubSubSubStoreId", "SubSubSubSubStoreName");

            var BrandList = BrandServices.GetAll();

            ViewBag.BrandList = new SelectList(BrandList, "BrandId", "BrandName");


            var ModelList = ModelServices.GetAll();

            ViewBag.ModelList = new SelectList(ModelList, "ModelId", "ModelName");
        }
Пример #2
0
        // GET: Country
        public ActionResult Index()
        {
            var data = CompanyServices.GetAll();

            return(View(data));
        }