示例#1
0
        public ActionResult ExportXLS(GridViewExportedRowType exportRowType)
        {
            var setting = GridHelper.GetSettingExport(vIndustrias.GetDynamicCollectionList(vIndustrias.GetViewModel()), _ControllerName);

            setting.SettingsExport.ExportedRowType = exportRowType;

            // retornamos el excel al usuario
            return(GridViewExtension.ExportToXls(setting, vIndustrias.GetViewModel(), string.Format("{0}s_{1}.{2}", typeof(vIndustrias).Name, DateTime.Now.ToString("ddMMyyyy_HHmmss"), "xls")));
        }
示例#2
0
        public virtual ActionResult ExportXLS(GridViewExportedRowType exportRowType)
        {
            var setting = GridHelper.GetSettingExport(typeof(TEntity), _ControllerName);
            var rep     = new CRM.Common.RepositoryDomain.Repository <TEntity, Int32>(new Business.Contexts.ConfigurationContext());

            setting.SettingsExport.ExportedRowType = exportRowType;

            // retornamos el excel al usuario
            return(GridViewExtension.ExportToXls(setting, rep.GetAll().ToList(), string.Format("{0}s_{1}.{2}", typeof(TEntity).Name, DateTime.Now.ToString("ddMMyyyy_HHmmss"), "xls")));
        }
        public ActionResult ExportXLS(GridViewExportedRowType exportRowType)
        {
            vacontecimientos.Datos = (DataTable)Session["ListadoAcontecimientos"];
            var setting = GridHelper.GetSettingExport(vacontecimientos.GetDynamicCollectionList(vacontecimientos.Datos), _ControllerName);

            setting.SettingsExport.ExportedRowType = exportRowType;
            //setting.SettingsExport.ExportSelectedRowsOnly =
            // retornamos el excel al usuario
            return(GridViewExtension.ExportToXls(setting, vacontecimientos.Datos, string.Format("{0}s_{1}.{2}", "Acontemiento", DateTime.Now.ToString("ddMMyyyy_HHmmss"), "xls")));
        }
        public ActionResult ExportXLS(GridViewExportedRowType exportRowType)
        {
            vContactosSinFoto = vContactosSinFoto.GetByUserRol(base.UserContext.RolesCliente.ToList());


            var setting = GridHelper.GetSettingExport(vContactosSinFoto.GetDynamicCollectionList(vContactosSinFoto.Datos), _ControllerName);

            setting.SettingsExport.ExportedRowType = exportRowType;

            // retornamos el excel al usuario
            return(GridViewExtension.ExportToXls(setting, vContactosSinFoto.Datos, string.Format("{0}s_{1}.{2}", typeof(vContactos).Name, DateTime.Now.ToString("ddMMyyyy_HHmmss"), "xls")));
        }
        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")));
        }