public ActionResult GridViewAllPartial()
        {
            if (IsAdmin)
            {
                vProductos = new Business.Views.vProductos();
            }
            else
            {
                vProductos = new Business.Views.vProductos(base.UserContext.RolesCliente.ToList());
            }

            ViewBag.Type = typeof(int);
            return(PartialView("_GridForViews", vProductos));
        }
        public ActionResult Index()
        {
            if (IsAdmin)
            {
                vProductos = new Business.Views.vProductos();
            }
            else
            {
                vProductos = new Business.Views.vProductos(base.UserContext.RolesCliente.ToList());
            }

            ClearTempFolder();
            return(View(vProductos));
        }
        public ActionResult ExportXLS(GridViewExportedRowType exportRowType)
        {
            if (IsAdmin)
            {
                vProductos = new Business.Views.vProductos();
            }
            else
            {
                vProductos = new Business.Views.vProductos(base.UserContext.RolesCliente.ToList());
            }

            var setting = GridHelper.GetSettingExport(vProductos.GetDynamicCollectionList(vProductos.GetViewModel()), _ControllerName);

            setting.SettingsExport.ExportedRowType = exportRowType;

            // retornamos el excel al usuario
            return(GridViewExtension.ExportToXls(setting, vProductos.GetViewModel(), string.Format("{0}s_{1}.{2}", typeof(vProductos).Name, DateTime.Now.ToString("ddMMyyyy_HHmmss"), "xls")));
        }
        public ActionResult View(string id)
        {
            if (IsAdmin)
            {
                vProductos = new Business.Views.vProductos();
            }
            else
            {
                vProductos = new Business.Views.vProductos(base.UserContext.RolesCliente.ToList());
            }

            DataTable datos = vProductos.GetByID(id);

            vProductos.Datos = datos;
            vProductos.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", vProductos));
        }
        private void ButtonNuevo_Click(object sender, EventArgs e)
        {
            vProductos ver = new vProductos(ProductosBLL.GetList(filtro));

            ver.Show();
        }