public IActionResult CooperantesPagina([FromBody] dynamic value)
        {
            try
            {
                int    pagina                = value.pagina != null ? (int)value.pagina : default(int);
                int    numerocooperantes     = value.numerocooperantes != null ? (int)value.numerocooperantes : default(int);
                string filtro_codigo         = value.filtro_codigo != null ? value.filtro_codigo : default(string);
                string filtro_nombre         = value.filtro_nombre != null ? (string)value.filtro_nombre : default(string);
                string filtro_usuario_creo   = value.filtro_usuario_creo != null ? (string)value.filtro_usuario_creo : default(string);
                string filtro_fecha_creacion = value.filtro_fecha_creacion != null ? (string)value.filtro_fecha_creacion : default(string);
                string columna_ordenada      = value.columna_ordenada != null ? (string)value.columna_ordenada : default(string);
                string orden_direccion       = value.orden_direccion != null ? (string)value.orden_direccion : default(string);

                List <Cooperante> cooperantes = CooperanteDAO.getCooperantesPagina(pagina, numerocooperantes, filtro_codigo,
                                                                                   filtro_nombre, filtro_usuario_creo, filtro_fecha_creacion, columna_ordenada, orden_direccion);

                if (cooperantes != null)
                {
                    List <stcooperante> stcooperantes = new List <stcooperante>();
                    foreach (Cooperante cooperante in cooperantes)
                    {
                        stcooperante temp = new stcooperante();
                        temp.codigo             = cooperante.codigo;
                        temp.descripcion        = cooperante.descripcion;
                        temp.estado             = cooperante.estado;
                        temp.fechaActualizacion = cooperante.fechaActualizacion != null?cooperante.fechaActualizacion.Value.ToString("dd/MM/yyyy H:mm:ss") : "";

                        temp.fechaCreacion    = cooperante.fechaCreacion.ToString("dd/MM/yyyy H:mm:ss");
                        temp.nombre           = cooperante.nombre;
                        temp.siglas           = cooperante.siglas;
                        temp.usuarioActualizo = cooperante.usuarioActualizo;
                        temp.usuarioCreo      = cooperante.usuarioCreo;
                        stcooperantes.Add(temp);
                    }

                    return(Ok(new { success = true, cooperantes = stcooperantes }));
                }
                else
                {
                    return(Ok(new { success = false }));
                }
            }
            catch (Exception e)
            {
                CLogger.write("5", "CooperanteController.class", e);
                return(BadRequest(500));
            }
        }
        public IActionResult Cooperantes()
        {
            try
            {
                List <Cooperante> cooperantes = CooperanteDAO.getCooperantes();

                if (cooperantes != null)
                {
                    List <stcooperante> stcooperantes = new List <stcooperante>();
                    foreach (Cooperante cooperante in cooperantes)
                    {
                        stcooperante temp = new stcooperante();
                        temp.codigo             = cooperante.codigo;
                        temp.descripcion        = cooperante.descripcion;
                        temp.estado             = cooperante.estado;
                        temp.fechaActualizacion = cooperante.fechaActualizacion != null?cooperante.fechaActualizacion.Value.ToString("dd/MM/yyyy H:mm:ss") : "";

                        temp.fechaCreacion    = cooperante.fechaCreacion.ToString("dd/MM/yyyy H:mm:ss");
                        temp.nombre           = cooperante.nombre;
                        temp.usuarioActualizo = cooperante.usuarioActualizo;
                        temp.usuarioCreo      = cooperante.usuarioCreo;
                        stcooperantes.Add(temp);
                    }

                    return(Ok(new { success = true, cooperantes = stcooperantes }));
                }
                else
                {
                    return(Ok(new { success = false }));
                }
            }
            catch (Exception e)
            {
                CLogger.write("1", "CooperanteController.class", e);
                return(BadRequest(500));
            }
        }