public ActionResult GetList(string id) { SetHeadCounters(); AgenteShoppingList agente = new AgenteShoppingList(); EVListSummary summ = agente.SelectListSummaryPorPublicIDRead(id); ViewBag.PublicID = id; JavaScriptSerializer serializer = new JavaScriptSerializer(); string itemArray = serializer.Serialize(summ.Items); EDVSummary edv = new EDVSummary(); edv.ItemArray = itemArray; edv.Summary = summ; if (summ.PublicID == id) { //Guardamos la shopping list en las de un usuario si se indica en la url agente.SaveListInMyListsIfProceed(this.Request, this.User.Identity, id); edv.IsShoppingListFree = agente.IsShoppingListFree(id); return(View("Summary", edv)); } else { return(View("Public", edv)); } }
public ActionResult Public(string id) { AgenteShoppingList agente = new AgenteShoppingList(); EVListSummary summ = agente.SelectListSummaryPorPublicIDRead(id); JavaScriptSerializer serializer = new JavaScriptSerializer(); string itemArray = serializer.Serialize(summ.Items); ViewBag.PublicID = id; EDVSummary edv = new EDVSummary(); edv.ItemArray = itemArray; edv.Summary = summ; return(View(edv)); }