Пример #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");
        }
        public void loadAll()
        {
            SubCategoryViewModel objSubCategory = new SubCategoryViewModel();
            CategoryViewModel    objCategory    = new CategoryViewModel();
            int i = 0;

            var ProcurementTypeList = ProcrurementTypeServices.GetAll();

            ViewBag.ProcurementTypeList = new SelectList(ProcurementTypeList, "ProcurementTypeId", "ProcurementTypeName");

            var SuplierCompanyList = SupplierCompanyServices.GetAll();

            ViewBag.SuplierCompanyList = new SelectList(SuplierCompanyList, "SupplierCompanyId", "SupplierCompanyName");

            var Itemlist = ItemServices.GetAll();

            ViewBag.Itemlist = new SelectList(Itemlist, "ItemId", "ItemName");

            var CatgoryList = CategoryServices.GetAll(objCategory.CategoryId);

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

            var SubCategoryList = SubCategoryServices.GetDropDown(objSubCategory.SubCategoryId);

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

            var SubSubCategoryList = SubSubCategoryServices.GetDropDown(objSubCategory.SubCategoryId);

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

            var SubSubSubCategoryList = SubSubSubCategoryServices.GetDropDown(objSubCategory.SubCategoryId);

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

            var SubSubSubSubCategoryList = SubSubSubSubCategoryServices.GetDropDown(objSubCategory.SubCategoryId);

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

            var BrandList = BrandServices.GetAll(i);

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


            var ModelList = ModelServices.GetAll(i);

            ViewBag.ModelList = new SelectList(ModelList, "ModelId", "ModelName");

            var UnitList = UnitServices.GetAll(i);

            ViewBag.UnitList = new SelectList(UnitList, "UnitId", "UnitName");
        }
        // GET: Brand
        public ActionResult Index()
        {
            var data = BrandServices.GetAll();

            return(View(data));
        }
Пример #4
0
        public void loadBrand()
        {
            var BrandList = BrandServices.GetAll();

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