public ActionResult ComboBoxEmpresasFertilizantesPartial() { //var model = FTPresupuestoProvider.GetEmpresasFertilizantes(); var model = FTPresupuestoProvider.GetEmpresasByUserId(WebMatrix.WebData.WebSecurity.CurrentUserId); return(PartialView("_ComboBoxEmpresasFertilizantesPartial", model.ToList())); }
public ActionResult ComboEmpresasReporteGastosBoxPartial() { bool todos = false; if (Request.Params["todos"] != null) { if (Request.Params["todos"] == "1") { todos = true; } } var modelLista = FTPresupuestoProvider.GetEmpresasByUserId(WebMatrix.WebData.WebSecurity.CurrentUserId); var model = modelLista.ToList(); if (todos) { model.Add(new Models.Cat_Empresas { Clave_Empresa = 0, Desc_Empresa = "(TODAS)" }); } return(PartialView("_ComboEmpresasReporteGastosBoxPartial", model.OrderBy(x => x.Desc_Empresa).ToList())); }
public ActionResult ComboBoxEmpresasPartial() { //var model = db.Cat_EmpresasList.OrderBy(e => e.Desc_Empresa); //var model = FTPresupuestoProvider.GetEmpresas(); var model = FTPresupuestoProvider.GetEmpresasByUserId(WebMatrix.WebData.WebSecurity.CurrentUserId); return(PartialView("_ComboBoxEmpresasPartial", model.ToList())); }