public ActionResult Index() { var item = _plataformaService.GetAll(); if (HttpExtensions.IsAjaxRequest(Request)) { return(PartialView(item)); } else { return(View(item)); } }
public ActionResult Edit(int?id) { var selectListItems = new SelectList(_plataformaService.GetAll(), "PlataformaId", "Nome").ToList(); selectListItems.Insert(selectListItems.Count(), new SelectListItem { Text = "Outros", Value = "99999" }); ViewBag.PlataformaId = selectListItems; var retorno = new PlataformaSenha(); retorno.Senha = id.HasValue ? _senhasService.GetById((int)id) : null; return(PartialView("_EditPartial", retorno)); }