public ActionResult View(string id) { if (IsAdmin) { vPrecios = new Business.Views.vPrecios(); } else { vPrecios = new Business.Views.vPrecios(base.UserContext.RolesCliente.ToList()); } try { DataTable datos = vPrecios.GetByID(id); vPrecios.Datos = datos; vPrecios.Id = id; string idString = id.ToString(); ViewBag.Archivos = archivoRepository.GetFiltered(x => x.Entity_Id == idString && x.Estado == true && x.TipoArchivoModulo.Tipo.ToLower().Trim().Equals(_ControllerName.ToLower().Trim()), x => x.TipoArchivoModulo).ToArray(); return(View("FormViewFichaString", vPrecios)); } catch (Exception ex) { SetMessage(ERROR, " ERROR: " + ex.Message); return(View("Index", vPrecios)); } }
public ActionResult GridViewAllPartial() { if (IsAdmin) { vPrecios = new Business.Views.vPrecios(); } else { vPrecios = new Business.Views.vPrecios(base.UserContext.RolesCliente.ToList()); } return(PartialView("_GridForViews", vPrecios)); }
public ActionResult Index() { if (IsAdmin) { vPrecios = new Business.Views.vPrecios(); } else { vPrecios = new Business.Views.vPrecios(base.UserContext.RolesCliente.ToList()); } ClearTempFolder(); return(View(vPrecios)); }
public ActionResult ExportXLS(GridViewExportedRowType exportRowType) { if (IsAdmin) { vPrecios = new Business.Views.vPrecios(); } else { vPrecios = new Business.Views.vPrecios(base.UserContext.RolesCliente.ToList()); } var setting = GridHelper.GetSettingExport(vPrecios.GetDynamicCollectionList(vPrecios.GetViewModel()), _ControllerName); setting.SettingsExport.ExportedRowType = exportRowType; // retornamos el excel al usuario return(GridViewExtension.ExportToXls(setting, vPrecios.GetViewModel(), string.Format("{0}s_{1}.{2}", typeof(vPrecios).Name, DateTime.Now.ToString("ddMMyyyy_HHmmss"), "xls"))); }