public ActionResult Edit(SubSubCategoryViewModel subSubCategoryViewModel) { if (ModelState.IsValid) { SubSubCategoryServices.Update(subSubCategoryViewModel); return(RedirectToAction("Index")); } ViewBag.CategoryId = new SelectList(CategoryServices.GetAll(), "CategoryId", "CategoryName", subSubCategoryViewModel.CategoryId); ViewBag.SubCategoryId = new SelectList(SubCategoryServices.GetAll(), "SubCategoryId", "SubCategoryName", subSubCategoryViewModel.SubCategoryId); return(View(subSubCategoryViewModel)); }
//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"); }
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"); }
// GET: State public ActionResult Index() { var data = SubCategoryServices.GetAll(); return(View(data)); }