public ActionResult TrovaScheda(string Codice, string Descrizione, string Anagrafica) { List <SpScheda> schede = SpScheda.TrovaSchede(Codice, Descrizione, Anagrafica, true); if (schede.Count == 0) { return(Content("Nessuna scheda trovata")); } if (schede.Count == 1) { return(MostraScheda(schede[0])); } else { return(PartialView("MostraSchedeTrovatePartial", schede)); } }
public ActionResult LeggiSchedApriSchedaDaCodice(string Codice) { List <AreaProduzione> aree = MPIntranet.Business.AreaProduzione.EstraiListaAreeProduzione(); List <MPIntranetListItem> areeProduzione = aree.Select(x => new MPIntranetListItem(x.ToString(), x.Codice)).ToList(); areeProduzione.Insert(0, new MPIntranetListItem(string.Empty, string.Empty)); ViewData.Add("ddlAreaProduzione", areeProduzione); List <SpScheda> schede = SpScheda.TrovaSchede(Codice, string.Empty, string.Empty, true); if (schede.Count > 0) { ViewData.Add("IdSPScheda", schede[0].IdSPScheda); return(View("LeggiScheda")); } return(null); }