コード例 #1
0
 public ActionResult Edit(SubSubSubSubCategoryViewModel subSubSubSubCategoryViewModel)
 {
     if (ModelState.IsValid)
     {
         SubSubSubSubCategoryServices.Update(subSubSubSubCategoryViewModel);
         return(RedirectToAction("Index"));
     }
     ViewBag.CategoryId          = new SelectList(CategoryServices.GetAll(), "CategoryId", "CategoryName", subSubSubSubCategoryViewModel.CategoryId);
     ViewBag.SubCategoryId       = new SelectList(SubCategoryServices.GetAll(), "SubCategoryId", "SubCategoryName", subSubSubSubCategoryViewModel.SubCategoryId);
     ViewBag.SubSubCategoryId    = new SelectList(SubSubCategoryServices.GetAll(), "SubSubCategoryId", "SubSubCategoryName", subSubSubSubCategoryViewModel.SubSubCategoryId);
     ViewBag.SubSubSubCategoryId = new SelectList(SubSubSubCategoryServices.GetAll(), "SubSubSubCategoryId", "SubSubSubCategoryName", subSubSubSubCategoryViewModel.SubSubSubCategoryId);
     return(View(subSubSubSubCategoryViewModel));
 }
コード例 #2
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");
        }
コード例 #3
0
        public void loadAll()
        {
            var CatgoryList = CategoryServices.GetAll();

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

            var SubCategoryList = SubCategoryServices.GetAll();

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

            var SubSubCategoryList = SubSubCategoryServices.GetAll();

            ViewBag.subSubCategoryList = new SelectList(SubSubCategoryList, "SubSubCategoryId", "SubSubCategoryName");
        }
コード例 #4
0
        // GET: SubSubCategory
        public ActionResult Index()
        {
            var data = SubSubCategoryServices.GetAll();

            return(View(data));
        }