public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_PlatillosApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_PlatillosPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_PlatillosApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Platilloss == null)
            {
                result.Detalle_Platilloss = new List <Detalle_Platillos>();
            }

            var data = result.Detalle_Platilloss.Select(m => new Detalle_PlatillosGridModel
            {
                Folio      = m.Folio
                , Cantidad = m.Cantidad
                , Unidad   = m.Unidad
                , IngredienteNombre_Ingrediente = (string)m.Ingrediente_Ingredientes.Nombre_Ingrediente
                , Unidad_SMAE        = m.Unidad_SMAE
                , Porciones          = m.Porciones
                , Texto_para_mostrar = m.Texto_para_mostrar
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_PlatillosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_PlatillosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #2
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_del_IndicioApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_del_IndicioPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_del_IndicioApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_del_Indicios == null)
            {
                result.Detalle_del_Indicios = new List <Detalle_del_Indicio>();
            }

            var data = result.Detalle_del_Indicios.Select(m => new Detalle_del_IndicioGridModel
            {
                Clave = m.Clave
                , Numero_de_Indicio       = m.Numero_de_Indicio
                , Nombre_del_Indicio      = m.Nombre_del_Indicio
                , Descripcion_del_Indicio = m.Descripcion_del_Indicio
                , Motivo               = m.Motivo
                , EstatusDescripcion   = (string)m.Estatus_Estatus_de_Indicio.Descripcion
                , Ubicacion_de_Indicio = m.Ubicacion_de_Indicio
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_del_IndicioList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_del_IndicioList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #3
0
        public void TestThat_ConvertWorksheetToHtml_WorksFine()
        {
            var converter = new ExcelConverter();
            var content   = converter.ConvertWorksheet(TESTFILE);

            File.WriteAllText(TESTFILE + ".html", content, Encoding.UTF8);
            Process.Start(TESTFILE + ".html");
        }
Beispiel #4
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Planes_AlimenticiosApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Planes_AlimenticiosPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Planes_AlimenticiosApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Planes_Alimenticioss == null)
            {
                result.Detalle_Planes_Alimenticioss = new List <Detalle_Planes_Alimenticios>();
            }

            var data = result.Detalle_Planes_Alimenticioss.Select(m => new Detalle_Planes_AlimenticiosGridModel
            {
                Folio = m.Folio
                , Tiempo_de_ComidaComida = (string)m.Tiempo_de_Comida_Tiempos_de_Comida.Comida
                , Numero_de_DiaDia       = (string)m.Numero_de_Dia_Dias_de_la_semana.Dia
                , Fecha = (m.Fecha == null ? string.Empty : Convert.ToDateTime(m.Fecha).ToString(ConfigurationProperty.DateFormat))
                , PlatilloNombre_de_Platillo = (string)m.Platillo_Platillos.Nombre_de_Platillo
                , Modificado = m.Modificado
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Planes_AlimenticiosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Planes_AlimenticiosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #5
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _ISpartan_RDM_Operations_DetailApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Spartan_RDM_Operations_DetailPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _ISpartan_RDM_Operations_DetailApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Spartan_RDM_Operations_Details == null)
            {
                result.Spartan_RDM_Operations_Details = new List <Spartan_RDM_Operations_Detail>();
            }

            var data = result.Spartan_RDM_Operations_Details.Select(m => new Spartan_RDM_Operations_DetailGridModel
            {
                DetailId = m.DetailId
                , Object_NameDescription = (string)m.Object_Name_Spartan_Object_ByPass.Description
                , Object_Label           = m.Object_Label
                , Order_Shown            = m.Order_Shown
                , Count_Query            = m.Count_Query
                , Query_Data             = m.Query_Data
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Spartan_RDM_Operations_DetailList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Spartan_RDM_Operations_DetailList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #6
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Aseguramiento_Artefactos_y_ExplosivosApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Aseguramiento_Artefactos_y_ExplosivosPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Aseguramiento_Artefactos_y_ExplosivosApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Aseguramiento_Artefactos_y_Explosivoss == null)
            {
                result.Detalle_Aseguramiento_Artefactos_y_Explosivoss = new List <Detalle_Aseguramiento_Artefactos_y_Explosivos>();
            }

            var data = result.Detalle_Aseguramiento_Artefactos_y_Explosivoss.Select(m => new Detalle_Aseguramiento_Artefactos_y_ExplosivosGridModel
            {
                Clave = m.Clave
                , Motivo_de_RegistroDescripcion = (string)m.Motivo_de_Registro_Motivo_de_Registro.Descripcion
                , ClasificacionDescripcion      = (string)m.Clasificacion_Clasificacion_de_Artefacto_y_Explosivo.Descripcion
                , Cantidad          = m.Cantidad
                , Lugar_de_Hallazgo = m.Lugar_de_Hallazgo
                , Observaciones     = m.Observaciones
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Aseguramiento_Artefactos_y_ExplosivosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Aseguramiento_Artefactos_y_ExplosivosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #7
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Titulos_MedicosApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Titulos_MedicosPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Titulos_MedicosApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Titulos_Medicoss == null)
            {
                result.Detalle_Titulos_Medicoss = new List <Detalle_Titulos_Medicos>();
            }

            var data = result.Detalle_Titulos_Medicoss.Select(m => new Detalle_Titulos_MedicosGridModel
            {
                Folio = m.Folio
                , Nombre_del_Titulo    = m.Nombre_del_Titulo
                , Institucion_Facultad = m.Institucion_Facultad
                , Fecha_de_Titulacion  = (m.Fecha_de_Titulacion == null ? string.Empty : Convert.ToDateTime(m.Fecha_de_Titulacion).ToString(ConfigurationProperty.DateFormat))
                , Numero_de_Cedula     = m.Numero_de_Cedula
                , Fecha_de_Expedicion  = (m.Fecha_de_Expedicion == null ? string.Empty : Convert.ToDateTime(m.Fecha_de_Expedicion).ToString(ConfigurationProperty.DateFormat))
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Titulos_MedicosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Titulos_MedicosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #8
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _ISpartan_BR_HistoryApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Spartan_BR_HistoryPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _ISpartan_BR_HistoryApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Spartan_BR_Historys == null)
            {
                result.Spartan_BR_Historys = new List <Spartan_BR_History>();
            }

            var data = result.Spartan_BR_Historys.Select(m => new Spartan_BR_HistoryGridModel
            {
                Key_History     = m.Key_History
                , Hour_Date     = m.Hour_Date
                , Time_elapsed  = m.Time_elapsed
                , Conditions    = m.Conditions
                , Actions_True  = m.Actions_True
                , Actions_False = m.Actions_False
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Spartan_BR_HistoryList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Spartan_BR_HistoryList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #9
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDatos_Bancarios_EspecialistasApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Datos_Bancarios_EspecialistasPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDatos_Bancarios_EspecialistasApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Datos_Bancarios_Especialistass == null)
            {
                result.Datos_Bancarios_Especialistass = new List <Datos_Bancarios_Especialistas>();
            }

            var data = result.Datos_Bancarios_Especialistass.Select(m => new Datos_Bancarios_EspecialistasGridModel
            {
                Folio                 = m.Folio
                , BancoNombre         = (string)m.Banco_Bancos.Nombre
                , CLABE_Interbancaria = m.CLABE_Interbancaria
                , Num_Cuenta          = m.Num_Cuenta
                , Nombre_del_Titular  = m.Nombre_del_Titular
                , Principal           = m.Principal
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Datos_Bancarios_EspecialistasList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Datos_Bancarios_EspecialistasList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #10
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _ISolicitud_de_Servicios_de_ApoyoApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Solicitud_de_Servicios_de_ApoyoPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _ISolicitud_de_Servicios_de_ApoyoApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Solicitud_de_Servicios_de_Apoyos == null)
            {
                result.Solicitud_de_Servicios_de_Apoyos = new List <Solicitud_de_Servicios_de_Apoyo>();
            }

            var data = result.Solicitud_de_Servicios_de_Apoyos.Select(m => new Solicitud_de_Servicios_de_ApoyoGridModel
            {
                Clave = m.Clave
                , Tipo_de_ServicioServicio = (string)m.Tipo_de_Servicio_Tipo_de_Servicio_de_Apoyo.Servicio
                , Dictamen    = m.Dictamen
                , Responsable = m.Responsable
                , Clave_MR    = m.Clave_MR
                , ComparecienteNombre_Completo = (string)m.Compareciente_Compareciente.Nombre_Completo
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Solicitud_de_Servicios_de_ApoyoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Solicitud_de_Servicios_de_ApoyoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #11
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_de_AmparoApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_de_AmparoPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_de_AmparoApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_de_Amparos == null)
            {
                result.Detalle_de_Amparos = new List <Detalle_de_Amparo>();
            }

            var data = result.Detalle_de_Amparos.Select(m => new Detalle_de_AmparoGridModel
            {
                Clave = m.Clave
                , Tipo_de_AmparoDescripcion = (string)m.Tipo_de_Amparo_Tipo_de_Amparo.Descripcion
                , Numero_de_Amparo          = m.Numero_de_Amparo
                , Fecha_Amparo = (m.Fecha_Amparo == null ? string.Empty : Convert.ToDateTime(m.Fecha_Amparo).ToString(ConfigurationProperty.DateFormat))
                , Entidad_que_Emitio_AmparoNombre = (string)m.Entidad_que_Emitio_Amparo_Estado.Nombre
                , ResolucionDescripcion           = (string)m.Resolucion_Tipo_de_Resolucion.Descripcion
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_de_AmparoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_de_AmparoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #12
0
        protected override void UpdateEditorAttributes()
        {
            if (_dctd != null)
            {
                //Disable all properties
                foreach (var property in Properties)
                {
                    property.SetIsBrowsable(false);
                }
                //Then enable
                GetProperty("UseWebScheduler").SetIsBrowsable(!ForPublication);
                GetProperty("TaskFolderName").SetIsBrowsable(!ForPublication);
                GetProperty("TaskFolderName").SetIsReadOnly(UseWebScheduler);

                GetProperty("DefaultCulture").SetIsBrowsable(!ForPublication);
                GetProperty("LogoName").SetIsBrowsable(!ForPublication);
                GetProperty("WebProductName").SetIsBrowsable(!ForPublication);
                GetProperty("LogDays").SetIsBrowsable(!ForPublication);
                GetProperty("CsvSeparator").SetIsBrowsable(!ForPublication);
                GetProperty("NumericFormat").SetIsBrowsable(!ForPublication);
                GetProperty("DateTimeFormat").SetIsBrowsable(!ForPublication);
                GetProperty("AuditEnabled").SetIsBrowsable(!ForPublication);
                GetProperty("AuditScript").SetIsBrowsable(!ForPublication);
                GetProperty("AuditScript").SetIsReadOnly(!AuditEnabled);

                GetProperty("InitScript").SetIsBrowsable(!ForPublication);
                GetProperty("CommonScripts").SetIsBrowsable(!ForPublication);
                //GetProperty("CommonScripts").SetDisplayName("Common Scripts: " + (_commonScripts.Count == 0 ? "None" : _commonScripts.Count.ToString() + " Items(s)"));
                GetProperty("ReportCreationScript").SetIsBrowsable(!ForPublication);
                GetProperty("IsLocal").SetIsBrowsable(!ForPublication);
                GetProperty("FileReplacePatterns").SetIsBrowsable(!ForPublication);
                GetProperty("CssFiles").SetIsBrowsable(!ForPublication);
                GetProperty("ScriptFiles").SetIsBrowsable(!ForPublication);

                GetProperty("PdfServer").SetIsBrowsable(!ForPublication);
                GetProperty("PdfServerPort").SetIsBrowsable(!ForPublication);
                GetProperty("PdfUseClient").SetIsBrowsable(!ForPublication);
                GetProperty("PdfServicePassword").SetIsBrowsable(!ForPublication);
                GetProperty("PdfWebServiceURL").SetIsBrowsable(!ForPublication);
                GetProperty("PdfUseWebService").SetIsBrowsable(!ForPublication);
                GetProperty("ExcelConverter").SetIsBrowsable(!ForPublication);
                GetProperty("PdfConverter").SetIsBrowsable(!ForPublication);
                GetProperty("HelperResetPDFConfigurations").SetIsBrowsable(!ForPublication);
                GetProperty("HelperResetExcelConfigurations").SetIsBrowsable(!ForPublication);
                if (!ForPublication)
                {
                    ExcelConverter.InitEditor();
                    PdfConverter.InitEditor();
                }

                GetProperty("WebNETCore").SetIsBrowsable(ForPublication);
                GetProperty("WebApplicationPoolName").SetIsBrowsable(ForPublication);
                GetProperty("WebApplicationName").SetIsBrowsable(ForPublication);
                GetProperty("WebPublicationDirectory").SetIsBrowsable(ForPublication);

                TypeDescriptor.Refresh(this);
            }
        }
Beispiel #13
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Solicitud_Historial_de_AsignacionesApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Solicitud_Historial_de_AsignacionesPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Solicitud_Historial_de_AsignacionesApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Solicitud_Historial_de_Asignacioness == null)
            {
                result.Detalle_Solicitud_Historial_de_Asignacioness = new List <Detalle_Solicitud_Historial_de_Asignaciones>();
            }

            var data = result.Detalle_Solicitud_Historial_de_Asignacioness.Select(m => new Detalle_Solicitud_Historial_de_AsignacionesGridModel
            {
                Folio                      = m.Folio
                , Fecha_cambio             = (m.Fecha_cambio == null ? string.Empty : Convert.ToDateTime(m.Fecha_cambio).ToString(ConfigurationProperty.DateFormat))
                , Hora_cambio              = m.Hora_cambio
                , UsuarioName              = (string)m.Usuario_Spartan_User.Name
                , Facilitador_AsignadoName = (string)m.Facilitador_Asignado_Spartan_User.Name
                , Motivo_de_cambio         = m.Motivo_de_cambio
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Solicitud_Historial_de_AsignacionesList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Solicitud_Historial_de_AsignacionesList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_de_PadecimientosApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_de_PadecimientosPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_de_PadecimientosApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_de_Padecimientoss == null)
            {
                result.Detalle_de_Padecimientoss = new List <Detalle_de_Padecimientos>();
            }

            var data = result.Detalle_de_Padecimientoss.Select(m => new Detalle_de_PadecimientosGridModel
            {
                Folio = m.Folio
                , PadecimientoDescripcion = (string)m.Padecimiento_Padecimientos.Descripcion
                , Tiempo_con_el_diagnosticoDescripcion = (string)m.Tiempo_con_el_diagnostico_Tiempo_Padecimiento.Descripcion
                , Intervencion_quirurgicaDescripcion   = (string)m.Intervencion_quirurgica_Respuesta_Logica.Descripcion
                , Tratamiento = m.Tratamiento
                , Estado_actualDescripcion = (string)m.Estado_actual_Estatus_Padecimiento.Descripcion
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_de_PadecimientosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_de_PadecimientosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #15
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _ILugar_de_DetencionApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Lugar_de_DetencionPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _ILugar_de_DetencionApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Lugar_de_Detencions == null)
            {
                result.Lugar_de_Detencions = new List <Lugar_de_Detencion>();
            }

            var data = result.Lugar_de_Detencions.Select(m => new Lugar_de_DetencionGridModel
            {
                Clave = m.Clave
                , Fecha_de_Detencion              = (m.Fecha_de_Detencion == null ? string.Empty : Convert.ToDateTime(m.Fecha_de_Detencion).ToString(ConfigurationProperty.DateFormat))
                , Municipio_de_DetencionNombre    = (string)m.Municipio_de_Detencion_Municipio.Nombre
                , CorporacionDescripcion          = (string)m.Corporacion_Corporacion.Descripcion
                , Suspension_Condicional          = m.Suspension_Condicional
                , Fecha_de_Suspension_Condicional = (m.Fecha_de_Suspension_Condicional == null ? string.Empty : Convert.ToDateTime(m.Fecha_de_Suspension_Condicional).ToString(ConfigurationProperty.DateFormat))
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Lugar_de_DetencionList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Lugar_de_DetencionList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #16
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDatos_Personales_Adicionales_Requerido_MASCApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Datos_Personales_Adicionales_Requerido_MASCPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDatos_Personales_Adicionales_Requerido_MASCApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Datos_Personales_Adicionales_Requerido_MASCs == null)
            {
                result.Datos_Personales_Adicionales_Requerido_MASCs = new List <Datos_Personales_Adicionales_Requerido_MASC>();
            }

            var data = result.Datos_Personales_Adicionales_Requerido_MASCs.Select(m => new Datos_Personales_Adicionales_Requerido_MASCGridModel
            {
                Clave = m.Clave
                , Correo_Electronico        = m.Correo_Electronico
                , Numero_Telefonico         = m.Numero_Telefonico
                , Redes_SocialesDescripcion = (string)m.Redes_Sociales_Redes_Sociales.Descripcion
                , Observaciones             = m.Observaciones
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Datos_Personales_Adicionales_Requerido_MASCList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Datos_Personales_Adicionales_Requerido_MASCList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
            protected override void Given()
            {
                _sut = new ExcelConverter();
                var pathToFile = Path.Combine("TestSupport", "Samples", "test.xls");

                _sourceStream = new FileStream(pathToFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

                _destinationFilePath = "result.csv";
            }
Beispiel #18
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _Idetalle_de_observaciones_mpiApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new detalle_de_observaciones_mpiPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _Idetalle_de_observaciones_mpiApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.detalle_de_observaciones_mpis == null)
            {
                result.detalle_de_observaciones_mpis = new List <detalle_de_observaciones_mpi>();
            }

            var data = result.detalle_de_observaciones_mpis.Select(m => new detalle_de_observaciones_mpiGridModel
            {
                clave           = m.clave
                , observaciones = m.observaciones
                , fecha         = (m.fecha == null ? string.Empty : Convert.ToDateTime(m.fecha).ToString(ConfigurationProperty.DateFormat))
                , hora          = m.hora
                , usuario_que_realiza_observacionName = (string)m.usuario_que_realiza_observacion_Spartan_User.Name
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "detalle_de_observaciones_mpiList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "detalle_de_observaciones_mpiList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #19
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IMR_Referenciados_Codigo_de_DescuentoApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new MR_Referenciados_Codigo_de_DescuentoPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IMR_Referenciados_Codigo_de_DescuentoApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.MR_Referenciados_Codigo_de_Descuentos == null)
            {
                result.MR_Referenciados_Codigo_de_Descuentos = new List <MR_Referenciados_Codigo_de_Descuento>();
            }

            var data = result.MR_Referenciados_Codigo_de_Descuentos.Select(m => new MR_Referenciados_Codigo_de_DescuentoGridModel
            {
                Folio = m.Folio
                , Tipo_de_usuarioDescripcion = (string)m.Tipo_de_usuario_Tipo_Paciente.Descripcion
                , UsuarioName         = (string)m.Usuario_Spartan_User.Name
                , Fecha_de_aplicacion = (m.Fecha_de_aplicacion == null ? string.Empty : Convert.ToDateTime(m.Fecha_de_aplicacion).ToString(ConfigurationProperty.DateFormat))
                , Descuento_Total     = m.Descuento_Total
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "MR_Referenciados_Codigo_de_DescuentoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "MR_Referenciados_Codigo_de_DescuentoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #20
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Bitacora_de_Canalizacion_MPIApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Bitacora_de_Canalizacion_MPIPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Bitacora_de_Canalizacion_MPIApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Bitacora_de_Canalizacion_MPIs == null)
            {
                result.Detalle_Bitacora_de_Canalizacion_MPIs = new List <Detalle_Bitacora_de_Canalizacion_MPI>();
            }

            var data = result.Detalle_Bitacora_de_Canalizacion_MPIs.Select(m => new Detalle_Bitacora_de_Canalizacion_MPIGridModel
            {
                Clave = m.Clave
                , Fecha_de_Cambio_de_Estatus         = (m.Fecha_de_Cambio_de_Estatus == null ? string.Empty : Convert.ToDateTime(m.Fecha_de_Cambio_de_Estatus).ToString(ConfigurationProperty.DateFormat))
                , Hora_de_Cambio_de_Estatus          = m.Hora_de_Cambio_de_Estatus
                , Estatus_InternoDescripcion         = (string)m.Estatus_Interno_Estatus_de_Expediente_Inicial.Descripcion
                , Estatus_de_CanalizacionDescripcion = (string)m.Estatus_de_Canalizacion_Estatus_Orientador.Descripcion
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Bitacora_de_Canalizacion_MPIList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Bitacora_de_Canalizacion_MPIList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #21
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _ISpartan_WorkFlow_StateApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Spartan_WorkFlow_StatePropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _ISpartan_WorkFlow_StateApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Spartan_WorkFlow_States == null)
            {
                result.Spartan_WorkFlow_States = new List <Spartan_WorkFlow_State>();
            }

            var data = result.Spartan_WorkFlow_States.Select(m => new Spartan_WorkFlow_StateGridModel
            {
                StateId      = m.StateId
                , State_Code = m.State_Code
                , Name       = m.Name
                , Value      = m.Value
                , Text       = m.Text
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Spartan_WorkFlow_StateList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Spartan_WorkFlow_StateList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #22
0
        public void ExcelConverter_Can_Read_Multiple_Sheets_From_A_Workbook()
        {
            var excelConverter = new ExcelConverter();
            var result1        = excelConverter.Read <MockExcelRow3>(this.xlsxTestResource);
            var result2        = excelConverter.Read <MockExcelRow4>(this.xlsxTestResource);

            Assert.Equal(10, result1.Count());
            Assert.Equal(4, result2.Count());
        }
Beispiel #23
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDashboard_Config_DetailApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Dashboard_Config_DetailPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDashboard_Config_DetailApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Dashboard_Config_Details == null)
            {
                result.Dashboard_Config_Details = new List <Dashboard_Config_Detail>();
            }

            var data = result.Dashboard_Config_Details.Select(m => new Dashboard_Config_DetailGridModel
            {
                Detail_Id      = m.Detail_Id
                , Report_Id    = m.Report_Id
                , Report_Name  = m.Report_Name
                , ConfigRow    = m.ConfigRow
                , ConfigColumn = m.ConfigColumn
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Dashboard_Config_DetailList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Dashboard_Config_DetailList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #24
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_de_Fotos_de_Emergencia_CCApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_de_Fotos_de_Emergencia_CCPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_de_Fotos_de_Emergencia_CCApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_de_Fotos_de_Emergencia_CCs == null)
            {
                result.Detalle_de_Fotos_de_Emergencia_CCs = new List <Detalle_de_Fotos_de_Emergencia_CC>();
            }

            var data = result.Detalle_de_Fotos_de_Emergencia_CCs.Select(m => new Detalle_de_Fotos_de_Emergencia_CCGridModel
            {
                Clave      = m.Clave
                , Fecha    = (m.Fecha == null ? string.Empty : Convert.ToDateTime(m.Fecha).ToString(ConfigurationProperty.DateFormat))
                , Hora     = m.Hora
                , Latitud  = m.Latitud
                , Longitud = m.Longitud
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_de_Fotos_de_Emergencia_CCList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_de_Fotos_de_Emergencia_CCList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #25
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_de_coincidencias_aApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_de_coincidencias_aPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_de_coincidencias_aApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_de_coincidencias_as == null)
            {
                result.Detalle_de_coincidencias_as = new List <Detalle_de_coincidencias_a>();
            }

            var data = result.Detalle_de_coincidencias_as.Select(m => new Detalle_de_coincidencias_aGridModel
            {
                Clave              = m.Clave
                , Nombre_Completo  = m.Nombre_Completo
                , Alias            = m.Alias
                , NUAT             = m.NUAT
                , Fuente_de_Origen = m.Fuente_de_Origen
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_de_coincidencias_aList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_de_coincidencias_aList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #26
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Secuencia_de_EjerciciosApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Secuencia_de_EjerciciosPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Secuencia_de_EjerciciosApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Secuencia_de_Ejercicioss == null)
            {
                result.Detalle_Secuencia_de_Ejercicioss = new List <Detalle_Secuencia_de_Ejercicios>();
            }

            var data = result.Detalle_Secuencia_de_Ejercicioss.Select(m => new Detalle_Secuencia_de_EjerciciosGridModel
            {
                Folio = m.Folio
                , Orden_del_EjercicioDescripcion         = (string)m.Orden_del_Ejercicio_Secuencia_de_Ejercicios_en_Rutinas.Descripcion
                , Tipo_de_EjercicioNombre_para_Secuencia = (string)m.Tipo_de_Ejercicio_Tipo_de_Ejercicio_Rutina.Nombre_para_Secuencia
                , EnfoqueDescripcion      = (string)m.Enfoque_Tipo_de_Enfoque_del_Ejercicio.Descripcion
                , Secuencia_del_Ejercicio = m.Secuencia_del_Ejercicio
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Secuencia_de_EjerciciosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Secuencia_de_EjerciciosList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #27
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Audiencia_Defensor_ImputadoApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Audiencia_Defensor_ImputadoPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Audiencia_Defensor_ImputadoApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Audiencia_Defensor_Imputados == null)
            {
                result.Detalle_Audiencia_Defensor_Imputados = new List <Detalle_Audiencia_Defensor_Imputado>();
            }

            var data = result.Detalle_Audiencia_Defensor_Imputados.Select(m => new Detalle_Audiencia_Defensor_ImputadoGridModel
            {
                Clave = m.Clave
                , Nombre_Del_ImputadoNombre_Completo_del_Tutor = (string)m.Nombre_Del_Imputado_Detalle_de_Imputado.Nombre_Completo_del_Tutor
                , Abogado            = m.Abogado
                , Cedula_Profesional = m.Cedula_Profesional
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Audiencia_Defensor_ImputadoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Audiencia_Defensor_ImputadoList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #28
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_de_Solicitante_en_Audiencias_JAApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_de_Solicitante_en_Audiencias_JAPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_de_Solicitante_en_Audiencias_JAApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_de_Solicitante_en_Audiencias_JAs == null)
            {
                result.Detalle_de_Solicitante_en_Audiencias_JAs = new List <Detalle_de_Solicitante_en_Audiencias_JA>();
            }

            var data = result.Detalle_de_Solicitante_en_Audiencias_JAs.Select(m => new Detalle_de_Solicitante_en_Audiencias_JAGridModel
            {
                Clave = m.Clave
                , NombreDescripcion = (string)m.Nombre_Audiencia_de_Control_Solicitud.Descripcion
                , Si = m.Si
                , Archivo_Adjunto = m.Archivo_Adjunto
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_de_Solicitante_en_Audiencias_JAList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_de_Solicitante_en_Audiencias_JAList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
Beispiel #29
0
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IOtros_NombresApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Otros_NombresPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IOtros_NombresApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Otros_Nombress == null)
            {
                result.Otros_Nombress = new List <Otros_Nombres>();
            }

            var data = result.Otros_Nombress.Select(m => new Otros_NombresGridModel
            {
                Clave              = m.Clave
                , Nombres          = m.Nombres
                , Apellido_Paterno = m.Apellido_Paterno
                , Apellido_Materno = m.Apellido_Materno
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Otros_NombresList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Otros_NombresList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }
        public void Export(string format, int pageIndex, int pageSize)
        {
            var exportFormatType = (ExportFormatType)Enum.Parse(
                typeof(ExportFormatType), format, true);

            if (!_tokenManager.GenerateToken())
            {
                return;
            }

            _IDetalle_Redes_Sociales_EspecialistaApiConsumer.SetAuthHeader(_tokenManager.Token);

            NameValueCollection filter = Request.QueryString;

            var configuration = new GridConfiguration()
            {
                OrderByClause = "", WhereClause = ""
            };

            if (filter != null)
            {
                configuration = GridQueryHelper.GetConfiguration(filter, new Detalle_Redes_Sociales_EspecialistaPropertyMapper());
            }

            pageSize = pageSize == 0 ? int.MaxValue : pageSize;

            var result = _IDetalle_Redes_Sociales_EspecialistaApiConsumer.ListaSelAll((pageIndex * pageSize) - pageSize + 1, pageSize, configuration.WhereClause, configuration.OrderByClause ?? "").Resource;

            if (result.Detalle_Redes_Sociales_Especialistas == null)
            {
                result.Detalle_Redes_Sociales_Especialistas = new List <Detalle_Redes_Sociales_Especialista>();
            }

            var data = result.Detalle_Redes_Sociales_Especialistas.Select(m => new Detalle_Redes_Sociales_EspecialistaGridModel
            {
                Folio = m.Folio
                , Red_SocialDescripcion = (string)m.Red_Social_Redes_sociales.Descripcion
                , URL       = m.URL
                , Principal = m.Principal
            }).ToList();

            switch (exportFormatType)
            {
            case ExportFormatType.PDF:
                PdfConverter.ExportToPdf(data.ToDataTable(), "Detalle_Redes_Sociales_EspecialistaList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.EXCEL:
                ExcelConverter.ExportToExcel(data.ToDataTable(), "Detalle_Redes_Sociales_EspecialistaList_" + DateTime.Now.ToString());
                break;

            case ExportFormatType.CSV:
                CsvConverter.ExportToCSV(data.ToDataTable(), "EmployeeList_" + DateTime.Now.ToString());
                break;
            }
        }