public ActionResult AjaxForm() { var model = new Gallery_Video(); if (DoAction == ActionType.Edit) { model = _da.GetById(ArrId.FirstOrDefault()); } ViewBag.Action = DoAction; ViewBag.CategoryID = _categoryApi.GetAll(); ViewBag.lstsource = _sourceApi.GetList(); return(View(model)); }
public ActionResult Lista() { try { CategoryAPI api = new CategoryAPI(); var lista = api.GetAll(Util.Configuracao.PerfilSelecionadoLogado.Cliente.Id); return(View(lista)); } catch (Exception) { throw; } }
private void loadCategory(ProductViewModel model) { // Carrega categorias CategoryAPI categoryAPI = new CategoryAPI(); var lista = categoryAPI.GetAll(Util.Configuracao.PerfilSelecionadoLogado.Cliente.Id); model.CategoryList = new SelectList( lista .Select ( s => new ListItemModel() { Id = s.Id, Text = s.Name.ToUpper() } ), "Id", "Text", model.Id ); }
public ActionResult Index() { ViewBag.listCity = _cityApi.GetAll(); ViewBag.lstcate = _categoryApi.GetAll(); return(View()); }