public ActionResult Edit() { MainApplication model = new MainApplication(); model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail); model.modulelist = _iIModuleService.getAllModules(); model.CompanyCode = CompanyCode; model.CompanyName = CompanyName; model.FinancialYear = FinancialYear; model.CatalogueList = _CatalogueService.GetAll(); model.ItemCategoryList = _CategoryService.GetAllItemCategories(); return(View(model)); }
public IActionResult GetAll(long?limit, long?offset) { limit ??= long.MaxValue; offset ??= 0; var result = catalogueService.GetAll(limit.Value, offset.Value); if (User.Identity.IsAuthenticated) { return(View("AdminList", result.Select(i => new ItemViewModel(i)).ToList())); } return(View("List", new CatalogueViewModel { Items = result, Order = new Order { } })); }