Cambios endocumentos y tramites
This commit is contained in:
@@ -50,6 +50,7 @@ namespace SIG.Web.AppCode.Configuration
|
||||
public static IBitacoraService BitacoraService { get; private set; }
|
||||
public static IPasswordHasher PasswordHasher { get; private set; }
|
||||
public static IServicioDesarrolladores ServicioDesarrolladores { get; private set; }
|
||||
public static IServicioPortalCliente ServicioPortalCliente { get; private set; }
|
||||
public static ICaptchaService CaptchaService { get; private set; }
|
||||
public static IUserRepository UserRepository { get; private set; }
|
||||
private static IUserAdministrationRepository UserAdministrationRepository { get; set; }
|
||||
@@ -212,6 +213,13 @@ namespace SIG.Web.AppCode.Configuration
|
||||
PermissionService = new PermissionService(
|
||||
permissionRepository);
|
||||
ServicioConvenios = new ServicioConvenios(new RepositorioConvenios(DbExecutor), UserContext);
|
||||
ServicioPortalCliente = new ServicioPortalCliente(
|
||||
new RepositorioPortalCliente(DbExecutor),
|
||||
ServicioFraccionamiento,
|
||||
TramiteDocumentoService,
|
||||
TramiteSolicitudService,
|
||||
new AlmacenComprobantesConvenio(),
|
||||
UserContext);
|
||||
ServicioPagosConvenios = new ServicioPagosConvenios(
|
||||
new RepositorioPagosConvenios(DbExecutor),
|
||||
tramiteSolicitudRepository,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace SIG.Web.AppCode.Configuration
|
||||
@@ -127,6 +127,7 @@ namespace SIG.Web.AppCode.Configuration
|
||||
"~/Styles/PanelLateral.css",
|
||||
"~/Styles/DetalleEtapa.css",
|
||||
"~/Styles/DocumentosEtapa.css",
|
||||
"~/Styles/Archivos.css",
|
||||
"~/Styles/Estilos.css",
|
||||
"~/Styles/filtrosig.css",
|
||||
"~/Styles/scrollsig.css",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SIG.Web.AppCode.Models.Common;
|
||||
using SIG.Web.AppCode.Models.Documentos;
|
||||
@@ -78,6 +78,13 @@ namespace SIG.Web.AppCode.Contracts.Documentos
|
||||
bool actualizarFechas = false,
|
||||
int? cveFraccionamientoEtapa = null);
|
||||
|
||||
DbResult<TramiteDocumentoVencimientoResultModel> ActualizarFechaVencimiento(
|
||||
int cveFraccionamiento,
|
||||
int cveDocumentoSolicitud,
|
||||
DateTime? fechaVencimiento,
|
||||
int cveUsuarioEjecuta,
|
||||
string nombreDominio);
|
||||
|
||||
DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||
int developmentId,
|
||||
int documentRequestId,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using SIG.Web.AppCode.Models.Common;
|
||||
@@ -78,6 +78,13 @@ namespace SIG.Web.AppCode.Contracts.Documentos
|
||||
int cveUsuarioEjecuta,
|
||||
string nombreDominio);
|
||||
|
||||
DbResult<TramiteDocumentoVencimientoResultModel> ActualizarFechaVencimiento(
|
||||
int cveFraccionamiento,
|
||||
int cveDocumentoSolicitud,
|
||||
DateTime? fechaVencimiento,
|
||||
int cveUsuarioEjecuta,
|
||||
string nombreDominio);
|
||||
|
||||
DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||
int developmentId,
|
||||
int documentRequestId,
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace SIG.Web.AppCode.Contracts.Tramites
|
||||
DbResult<TramiteSolicitudStatusChangeModel> CambiarEstatus(
|
||||
ModeloCambioEstatusTramite cambioEstatus,
|
||||
int cveUsuarioEjecuta,
|
||||
string nombreDominio);
|
||||
string nombreDominio,
|
||||
bool validarPagosRequeridos = true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace SIG.Web.AppCode.Infrastructure.WebForms
|
||||
{
|
||||
public static class CargaArchivoWebHelper
|
||||
{
|
||||
public static void Configurar(
|
||||
HtmlInputHidden control,
|
||||
string extensionesPermitidas,
|
||||
int? tamanoMaximoMb,
|
||||
int maximoArchivos = 1,
|
||||
string mensaje = null)
|
||||
{
|
||||
if (control == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (control.Page != null && control.Page.Form != null)
|
||||
{
|
||||
control.Page.Form.Enctype = "multipart/form-data";
|
||||
}
|
||||
|
||||
control.Attributes["data-readmode"] = "none";
|
||||
control.Attributes["data-input-name"] = ObtenerNombreCampo(control);
|
||||
control.Attributes["data-maxfile"] = Math.Max(1, maximoArchivos)
|
||||
.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
if (tamanoMaximoMb.HasValue && tamanoMaximoMb.Value > 0)
|
||||
{
|
||||
control.Attributes["data-maxfilesize"] = tamanoMaximoMb.Value
|
||||
.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
control.Attributes.Remove("data-maxfilesize");
|
||||
}
|
||||
|
||||
string extensiones = NormalizarExtensiones(extensionesPermitidas);
|
||||
if (string.IsNullOrWhiteSpace(extensiones))
|
||||
{
|
||||
control.Attributes.Remove("data-acceptedfiles");
|
||||
}
|
||||
else
|
||||
{
|
||||
control.Attributes["data-acceptedfiles"] = extensiones;
|
||||
}
|
||||
|
||||
control.Attributes["data-message"] = string.IsNullOrWhiteSpace(mensaje)
|
||||
? "Arrastra aquí un archivo o haz clic para seleccionarlo."
|
||||
: mensaje.Trim();
|
||||
}
|
||||
|
||||
public static HttpPostedFile ObtenerArchivo(Page pagina, HtmlInputHidden control)
|
||||
{
|
||||
return ObtenerArchivos(pagina, control).FirstOrDefault();
|
||||
}
|
||||
public static List<HttpPostedFile> ObtenerArchivos( Page pagina, HtmlInputHidden control)
|
||||
{
|
||||
var archivos = new List<HttpPostedFile>();
|
||||
|
||||
if (pagina == null || control == null)
|
||||
{
|
||||
return archivos;
|
||||
}
|
||||
|
||||
string nombreCampo = ObtenerNombreCampo(control);
|
||||
HttpFileCollection archivosRequest = pagina.Request.Files;
|
||||
|
||||
for (int indice = 0; indice < archivosRequest.Count; indice++)
|
||||
{
|
||||
string nombreCampoArchivo = archivosRequest.GetKey(indice);
|
||||
|
||||
if (!string.Equals(
|
||||
nombreCampoArchivo,
|
||||
nombreCampo,
|
||||
StringComparison.Ordinal))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
HttpPostedFile archivo = archivosRequest[indice];
|
||||
|
||||
if (archivo != null && archivo.ContentLength > 0)
|
||||
{
|
||||
archivos.Add(archivo);
|
||||
}
|
||||
}
|
||||
|
||||
return archivos;
|
||||
}
|
||||
|
||||
public static string ObtenerNombreCampo(Control control)
|
||||
{
|
||||
if (control == null)
|
||||
{
|
||||
throw new ArgumentNullException("control");
|
||||
}
|
||||
|
||||
return control.ClientID + "_archivo";
|
||||
}
|
||||
|
||||
private static string NormalizarExtensiones(string extensiones)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(extensiones))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return string.Join(",",
|
||||
extensiones
|
||||
.Split(new[] { ',', ';', '|', ' ' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(extension => extension.Trim())
|
||||
.Where(extension => !string.IsNullOrWhiteSpace(extension))
|
||||
.Select(extension =>
|
||||
{
|
||||
if (extension.Contains("/"))
|
||||
{
|
||||
return extension;
|
||||
}
|
||||
|
||||
extension = extension.TrimStart('*');
|
||||
return extension.StartsWith(".", StringComparison.Ordinal)
|
||||
? extension
|
||||
: "." + extension;
|
||||
})
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace SIG.Web.AppCode.Models.Documentos
|
||||
@@ -168,6 +168,24 @@ namespace SIG.Web.AppCode.Models.Documentos
|
||||
public DateTime? FechaRevisionAnterior { get; set; }
|
||||
}
|
||||
|
||||
public sealed class TramiteDocumentoVencimientoResultModel
|
||||
{
|
||||
public int CveDocumentoSolicitud { get; set; }
|
||||
public int CveSolicitud { get; set; }
|
||||
public string Folio { get; set; }
|
||||
public int CveCliente { get; set; }
|
||||
public int CveFraccionamiento { get; set; }
|
||||
public int CveFraccionamientoEtapa { get; set; }
|
||||
public string Etapa { get; set; }
|
||||
public int CveTipoTramite { get; set; }
|
||||
public string TipoTramite { get; set; }
|
||||
public int CveTipoDocumento { get; set; }
|
||||
public string TipoDocumento { get; set; }
|
||||
public DateTime? FechaDocumento { get; set; }
|
||||
public DateTime? FechaVencimientoAnterior { get; set; }
|
||||
public DateTime? FechaVencimiento { get; set; }
|
||||
}
|
||||
|
||||
public sealed class TramiteDocumentoReviewResultModel
|
||||
{
|
||||
public int CveDocumentoSolicitud { get; set; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SIG.Web.AppCode.Models.Documentos;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace SIG.Web.AppCode.Models.Tramites
|
||||
public int CveEstatusSolicitud { get; set; }
|
||||
public string EstatusSolicitud { get; set; }
|
||||
public bool EsEstatusCliente { get; set; }
|
||||
public bool EsEstatusOk { get; set; }
|
||||
public DateTime? FechaInicio { get; set; }
|
||||
public DateTime? FechaAutorizacion { get; set; }
|
||||
public bool PuedeCambiarEstatus { get; set; }
|
||||
@@ -59,6 +60,7 @@ namespace SIG.Web.AppCode.Models.Tramites
|
||||
public int Orden { get; set; }
|
||||
public bool EsFinal { get; set; }
|
||||
public bool EsCliente { get; set; }
|
||||
public bool EsOK { get; set; }
|
||||
}
|
||||
|
||||
public sealed class TramiteSolicitudStatusChangeModel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using SIG.Web.AppCode.Contracts.Database;
|
||||
@@ -268,6 +268,28 @@ namespace SIG.Web.AppCode.Repositories.Documentos
|
||||
});
|
||||
}
|
||||
|
||||
public DbResult<TramiteDocumentoVencimientoResultModel> ActualizarFechaVencimiento(
|
||||
int cveFraccionamiento,
|
||||
int cveDocumentoSolicitud,
|
||||
DateTime? fechaVencimiento,
|
||||
int cveUsuarioEjecuta,
|
||||
string nombreDominio)
|
||||
{
|
||||
return QueryOne<TramiteDocumentoVencimientoResultModel>(
|
||||
"dbo.PA_Tramites_DocumentoSolicitudVencimientoUpdate",
|
||||
cveUsuarioEjecuta,
|
||||
nombreDominio,
|
||||
command =>
|
||||
{
|
||||
StoredProcedureCommand.AddInput(
|
||||
command, "@CveFraccionamiento", cveFraccionamiento, DbType.Int32);
|
||||
StoredProcedureCommand.AddInput(
|
||||
command, "@CveDocumentoSolicitud", cveDocumentoSolicitud, DbType.Int32);
|
||||
StoredProcedureCommand.AddInput(
|
||||
command, "@FechaVencimiento", fechaVencimiento, DbType.Date);
|
||||
});
|
||||
}
|
||||
|
||||
public DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||
int developmentId,
|
||||
int documentRequestId,
|
||||
|
||||
@@ -250,6 +250,7 @@ namespace SIG.Web.AppCode.Services.Clientes
|
||||
PuedeEnviarRevision =
|
||||
solicitud.PuedeCambiarEstatus &&
|
||||
solicitud.EsEstatusCliente &&
|
||||
!solicitud.EsEstatusOk &&
|
||||
documentosPendientes == 0 &&
|
||||
pagosPendientes == 0
|
||||
};
|
||||
@@ -303,6 +304,12 @@ namespace SIG.Web.AppCode.Services.Clientes
|
||||
"Existen recibos pendientes de pago.");
|
||||
}
|
||||
|
||||
if (!tramite.PuedeEnviarRevision)
|
||||
{
|
||||
return Fallo<TramiteSolicitudStatusChangeModel>(
|
||||
"El trámite ya no se encuentra en un estatus que pueda enviarse a revisión.");
|
||||
}
|
||||
|
||||
DbResult<ModeloContextoCambioEstatus> contexto =
|
||||
_servicioTramites.ObtenerContextoCambioEstatus(
|
||||
cveSolicitud,
|
||||
@@ -317,12 +324,29 @@ namespace SIG.Web.AppCode.Services.Clientes
|
||||
contexto.Exception);
|
||||
}
|
||||
|
||||
if (!contexto.Data.Solicitud.EsEstatusCliente || contexto.Data.Solicitud.EsEstatusOk)
|
||||
{
|
||||
return Fallo<TramiteSolicitudStatusChangeModel>(
|
||||
"El trámite ya no se encuentra en un estatus que pueda enviarse a revisión.");
|
||||
}
|
||||
|
||||
if (!contexto.Data.CveSiguienteEstatus.HasValue)
|
||||
{
|
||||
return Fallo<TramiteSolicitudStatusChangeModel>(
|
||||
"El trámite no tiene un siguiente estatus disponible para enviar a revisión.");
|
||||
}
|
||||
|
||||
TramiteSolicitudEstatusOptionModel estatusRevision =
|
||||
(contexto.Data.Estatus ?? new List<TramiteSolicitudEstatusOptionModel>())
|
||||
.FirstOrDefault(estatus =>
|
||||
estatus.CveEstatusSolicitud == contexto.Data.CveSiguienteEstatus.Value);
|
||||
|
||||
if (estatusRevision == null || !estatusRevision.EsCliente || !estatusRevision.EsOK)
|
||||
{
|
||||
return Fallo<TramiteSolicitudStatusChangeModel>(
|
||||
"El siguiente estatus no corresponde al envío a revisión configurado.");
|
||||
}
|
||||
|
||||
var cambio = new ModeloCambioEstatusTramite
|
||||
{
|
||||
CveSolicitud = cveSolicitud,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SIG.Web.AppCode.Models.Bitacora;
|
||||
using SIG.Web.AppCode.Models.Documentos;
|
||||
@@ -116,6 +116,30 @@ namespace SIG.Web.AppCode.Services.Documentos
|
||||
return auditEvent;
|
||||
}
|
||||
|
||||
public static ModeloRegistroBitacora ActualizarVencimiento(
|
||||
TramiteDocumentoVencimientoResultModel cambio)
|
||||
{
|
||||
ModeloRegistroBitacora evento = BaseEvent(
|
||||
cambio.CveDocumentoSolicitud,
|
||||
cambio.CveSolicitud,
|
||||
cambio.CveCliente,
|
||||
cambio.CveFraccionamiento,
|
||||
cambio.CveFraccionamientoEtapa,
|
||||
BitacoraTipoMovimiento.Editado,
|
||||
"Se actualizó la fecha de vencimiento del documento " +
|
||||
cambio.TipoDocumento + " de la etapa " + cambio.Etapa + ".");
|
||||
|
||||
evento.Campos = new List<BitacoraCampoEventoModel>
|
||||
{
|
||||
Field(
|
||||
"FechaVencimiento",
|
||||
cambio.FechaVencimientoAnterior,
|
||||
cambio.FechaVencimiento)
|
||||
};
|
||||
|
||||
return evento;
|
||||
}
|
||||
|
||||
public static ModeloRegistroBitacora Delete(
|
||||
TramiteDocumentoDeleteResultModel change)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -406,11 +406,17 @@ namespace SIG.Web.AppCode.Services.Documentos
|
||||
return Fail<TramiteDocumentoSaveResultModel>(validation);
|
||||
}
|
||||
|
||||
if (uploadContext.TieneVigencia && !fechaVencimiento.HasValue)
|
||||
if (!fechaDocumento.HasValue)
|
||||
{
|
||||
return Fail<TramiteDocumentoSaveResultModel>("Capture la fecha de vencimiento del documento.");
|
||||
return Fail<TramiteDocumentoSaveResultModel>(
|
||||
"Capture la fecha del documento.");
|
||||
}
|
||||
if (fechaDocumento.HasValue && fechaVencimiento.HasValue &&
|
||||
if (fechaDocumento.Value.Date > DateTime.Today)
|
||||
{
|
||||
return Fail<TramiteDocumentoSaveResultModel>(
|
||||
"La fecha del documento no puede ser posterior al día de hoy.");
|
||||
}
|
||||
if (fechaVencimiento.HasValue &&
|
||||
fechaVencimiento.Value.Date < fechaDocumento.Value.Date)
|
||||
{
|
||||
return Fail<TramiteDocumentoSaveResultModel>("El vencimiento no puede ser anterior a la fecha del documento.");
|
||||
@@ -585,6 +591,99 @@ namespace SIG.Web.AppCode.Services.Documentos
|
||||
}
|
||||
}
|
||||
|
||||
public DbResult<TramiteDocumentoVencimientoResultModel> ActualizarFechaVencimiento(
|
||||
int cveFraccionamiento,
|
||||
int cveDocumentoSolicitud,
|
||||
DateTime? fechaVencimiento,
|
||||
int cveUsuarioEjecuta,
|
||||
string nombreDominio)
|
||||
{
|
||||
UserSessionModel usuario = _contextoUsuario.GetCurrentUser();
|
||||
if (usuario == null || usuario.CveUsuario != cveUsuarioEjecuta)
|
||||
{
|
||||
return Fail<TramiteDocumentoVencimientoResultModel>(
|
||||
"La sesión del usuario no es válida.");
|
||||
}
|
||||
if (usuario.EsDesarrollador)
|
||||
{
|
||||
return Fail<TramiteDocumentoVencimientoResultModel>(
|
||||
"La fecha de vencimiento sólo puede ser modificada por Agua de Hermosillo.");
|
||||
}
|
||||
if (cveFraccionamiento <= 0 || cveDocumentoSolicitud <= 0)
|
||||
{
|
||||
return Fail<TramiteDocumentoVencimientoResultModel>(
|
||||
"Seleccione un documento válido.");
|
||||
}
|
||||
|
||||
DbResult<List<TramiteDocumentoSolicitudModel>> consulta = ListForDevelopment(
|
||||
cveFraccionamiento,
|
||||
null,
|
||||
null,
|
||||
cveUsuarioEjecuta,
|
||||
nombreDominio);
|
||||
if (!consulta.Success)
|
||||
{
|
||||
return CopyFailure<List<TramiteDocumentoSolicitudModel>, TramiteDocumentoVencimientoResultModel>(
|
||||
consulta,
|
||||
"No fue posible consultar el documento.");
|
||||
}
|
||||
|
||||
TramiteDocumentoSolicitudModel documento = (consulta.Data ?? new List<TramiteDocumentoSolicitudModel>())
|
||||
.FirstOrDefault(item => item.CveDocumentoSolicitud == cveDocumentoSolicitud);
|
||||
if (documento == null || !documento.TieneArchivo)
|
||||
{
|
||||
return Fail<TramiteDocumentoVencimientoResultModel>(
|
||||
"El documento ya no está disponible.");
|
||||
}
|
||||
if (fechaVencimiento.HasValue && documento.FechaDocumento.HasValue &&
|
||||
fechaVencimiento.Value.Date < documento.FechaDocumento.Value.Date)
|
||||
{
|
||||
return Fail<TramiteDocumentoVencimientoResultModel>(
|
||||
"El vencimiento no puede ser anterior a la fecha del documento.");
|
||||
}
|
||||
|
||||
using (var transaccion = new TransactionLogic(IsolationLevel.Serializable))
|
||||
{
|
||||
DbResult<TramiteDocumentoVencimientoResultModel> resultado =
|
||||
_repository.ActualizarFechaVencimiento(
|
||||
cveFraccionamiento,
|
||||
cveDocumentoSolicitud,
|
||||
fechaVencimiento,
|
||||
cveUsuarioEjecuta,
|
||||
nombreDominio);
|
||||
if (!resultado.Success || resultado.Data == null)
|
||||
{
|
||||
return resultado;
|
||||
}
|
||||
|
||||
DbResult<long> bitacora = _bitacoraService.RegistrarOperacion(
|
||||
ModeloOperacionBitacora.Crear(
|
||||
"ActualizarVencimientoDocumentoSolicitud",
|
||||
TramiteDocumentoBitacoraFactory.ActualizarVencimiento(resultado.Data)));
|
||||
if (!bitacora.Success)
|
||||
{
|
||||
return CopyFailure<long, TramiteDocumentoVencimientoResultModel>(
|
||||
bitacora,
|
||||
"No fue posible registrar el cambio.");
|
||||
}
|
||||
|
||||
DbResult<bool> proceso = ActualizarVencimientoEtapa(
|
||||
resultado.Data.CveFraccionamientoEtapa,
|
||||
cveUsuarioEjecuta,
|
||||
nombreDominio);
|
||||
if (!proceso.Success)
|
||||
{
|
||||
return DbResult<TramiteDocumentoVencimientoResultModel>.Fail(
|
||||
proceso.UserMessage,
|
||||
proceso.TechnicalMessage,
|
||||
proceso.Exception);
|
||||
}
|
||||
|
||||
transaccion.Commit();
|
||||
return resultado;
|
||||
}
|
||||
}
|
||||
|
||||
public DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||
int developmentId,
|
||||
int documentRequestId,
|
||||
@@ -607,6 +706,36 @@ namespace SIG.Web.AppCode.Services.Documentos
|
||||
"Capture la nota o motivo del rechazo.");
|
||||
}
|
||||
|
||||
if (approved)
|
||||
{
|
||||
DbResult<List<TramiteDocumentoSolicitudModel>> documentos = ListForDevelopment(
|
||||
developmentId,
|
||||
null,
|
||||
null,
|
||||
executingUser,
|
||||
domainName);
|
||||
if (!documentos.Success)
|
||||
{
|
||||
return CopyFailure<List<TramiteDocumentoSolicitudModel>, TramiteDocumentoReviewResultModel>(
|
||||
documentos,
|
||||
"No fue posible validar el documento.");
|
||||
}
|
||||
|
||||
TramiteDocumentoSolicitudModel documento =
|
||||
(documentos.Data ?? new List<TramiteDocumentoSolicitudModel>())
|
||||
.FirstOrDefault(item => item.CveDocumentoSolicitud == documentRequestId);
|
||||
if (documento == null)
|
||||
{
|
||||
return Fail<TramiteDocumentoReviewResultModel>(
|
||||
"El documento ya no está disponible.");
|
||||
}
|
||||
if (documento.TieneVigencia && !documento.FechaVencimiento.HasValue)
|
||||
{
|
||||
return Fail<TramiteDocumentoReviewResultModel>(
|
||||
"Capture la fecha de vencimiento antes de aprobar el documento.");
|
||||
}
|
||||
}
|
||||
|
||||
using (var transaction = new TransactionLogic())
|
||||
{
|
||||
DbResult<TramiteDocumentoReviewResultModel> result =
|
||||
|
||||
@@ -650,7 +650,8 @@ namespace SIG.Web.AppCode.Services.Tramites
|
||||
public DbResult<TramiteSolicitudStatusChangeModel> CambiarEstatus(
|
||||
ModeloCambioEstatusTramite cambioEstatus,
|
||||
int cveUsuarioEjecuta,
|
||||
string nombreDominio)
|
||||
string nombreDominio,
|
||||
bool validarPagosRequeridos = true)
|
||||
{
|
||||
UserSessionModel usuario = _contextoUsuario.GetCurrentUser();
|
||||
if (usuario == null || usuario.CveUsuario != cveUsuarioEjecuta)
|
||||
@@ -743,7 +744,8 @@ namespace SIG.Web.AppCode.Services.Tramites
|
||||
"Documentos", "Existen documentos requeridos pendientes de cargar.");
|
||||
}
|
||||
|
||||
if (contexto.Pagos.Any(pago => pago.EstaPendiente))
|
||||
if (validarPagosRequeridos &&
|
||||
contexto.Pagos.Any(pago => pago.EstaPendiente))
|
||||
{
|
||||
return RequisitosPendientes(
|
||||
"Pagos", "Existen pagos requeridos pendientes. Cancele y realice el pago por el flujo habitual.");
|
||||
|
||||
Binary file not shown.
@@ -36,7 +36,29 @@
|
||||
EmptyDataText="No tiene fraccionamientos activos."
|
||||
OnRowDataBound="EnlazarFila">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Etapa" HeaderText="Etapa" />
|
||||
<asp:TemplateField HeaderStyle-CssClass="sig-grid-columna-grupo"
|
||||
ItemStyle-CssClass="sig-grid-columna-grupo">
|
||||
<ItemTemplate>
|
||||
<div class="sig-cliente-desarrollo-cabecera">
|
||||
<div>
|
||||
<asp:HyperLink runat="server"
|
||||
Text='<%# Server.HtmlEncode(Convert.ToString(Eval("Fraccionamiento"))) %>'
|
||||
NavigateUrl='<%# UrlDetalleFraccionamiento(Eval("CveFraccionamiento")) %>' />
|
||||
<span class="sig-cliente-desarrollo-resumen">
|
||||
<%#: ResumenFraccionamiento(Container.DataItem) %>
|
||||
</span>
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn btn-circle btn-sm default sig-grid-alternar-grupo-accion sig-accion-icono"
|
||||
title="Mostrar u ocultar etapas" aria-label="Mostrar u ocultar etapas"
|
||||
aria-expanded="true">
|
||||
<i class="fa fa-chevron-up sig-grid-icono-agrupacion" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Etapa" HeaderText="Etapa"
|
||||
ItemStyle-CssClass="sig-grid-columna-dato-principal" />
|
||||
<asp:BoundField DataField="Hectareas" HeaderText="Hectáreas"
|
||||
DataFormatString="{0:N2}" />
|
||||
<asp:CheckBoxField DataField="Fideicomiso" HeaderText="Fideicomiso" />
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using SIG.Web.AppCode.Configuration;
|
||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||
@@ -44,65 +42,50 @@ namespace SIG.Web.Pages.Clientes
|
||||
argumentos.Row.CssClass = "sig-grid-grupo";
|
||||
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
||||
argumentos.Row.Attributes["data-sig-group-id"] = grupo;
|
||||
argumentos.Row.Attributes["data-sig-level"] = "2";
|
||||
for (int indiceCelda = 0; indiceCelda < argumentos.Row.Cells.Count; indiceCelda++)
|
||||
{
|
||||
string claseCelda = indiceCelda == 0
|
||||
? "sig-grid-columna-grupo"
|
||||
: "sig-grid-columna-normal";
|
||||
argumentos.Row.Cells[indiceCelda].CssClass =
|
||||
(argumentos.Row.Cells[indiceCelda].CssClass + " " + claseCelda).Trim();
|
||||
}
|
||||
|
||||
argumentos.Row.Attributes["data-sig-level"] = "2";
|
||||
argumentos.Row.Attributes["data-sig-expanded-default"] = "true";
|
||||
|
||||
int columnas = GvDesarrollos.Columns
|
||||
.Cast<DataControlField>()
|
||||
.Count(columna => columna.Visible);
|
||||
argumentos.Row.Cells.Clear();
|
||||
|
||||
var celda = new TableCell { ColumnSpan = columnas };
|
||||
var contenedor = new HtmlGenericControl("div");
|
||||
contenedor.Attributes["class"] =
|
||||
"sig-cliente-desarrollo-cabecera";
|
||||
|
||||
var informacion = new HtmlGenericControl("div");
|
||||
var enlace = new HyperLink
|
||||
{
|
||||
Text = fila.Fraccionamiento,
|
||||
NavigateUrl = ResolveUrl(
|
||||
"~/Pages/Clientes/FraccionamientoDetalle.aspx?id=" +
|
||||
fila.CveFraccionamiento.ToString(
|
||||
CultureInfo.InvariantCulture))
|
||||
};
|
||||
informacion.Controls.Add(enlace);
|
||||
|
||||
var resumen = new HtmlGenericControl("span");
|
||||
resumen.Attributes["class"] =
|
||||
"sig-cliente-desarrollo-resumen";
|
||||
resumen.InnerText = string.Format(
|
||||
CultureInfo.CurrentCulture,
|
||||
"{0} · {1} etapa(s)",
|
||||
fila.Estatus,
|
||||
fila.NumeroEtapas);
|
||||
informacion.Controls.Add(resumen);
|
||||
|
||||
var alternar = new HtmlGenericControl("button");
|
||||
alternar.Attributes["type"] = "button";
|
||||
alternar.Attributes["class"] =
|
||||
"btn btn-sm default sig-grid-alternar-grupo";
|
||||
alternar.Attributes["aria-expanded"] = "true";
|
||||
alternar.Attributes["title"] = "Mostrar u ocultar etapas";
|
||||
|
||||
var icono = new HtmlGenericControl("i");
|
||||
icono.Attributes["class"] =
|
||||
"fa fa-chevron-up sig-grid-icono-agrupacion";
|
||||
icono.Attributes["aria-hidden"] = "true";
|
||||
alternar.Controls.Add(icono);
|
||||
|
||||
contenedor.Controls.Add(informacion);
|
||||
contenedor.Controls.Add(alternar);
|
||||
celda.Controls.Add(contenedor);
|
||||
argumentos.Row.Cells.Add(celda);
|
||||
return;
|
||||
}
|
||||
|
||||
argumentos.Row.CssClass =
|
||||
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||
argumentos.Row.Attributes["data-sig-parent-group"] = grupo;
|
||||
argumentos.Row.Attributes["data-sig-level"] = "1";
|
||||
}
|
||||
|
||||
protected string UrlDetalleFraccionamiento(object clave)
|
||||
{
|
||||
return ResolveUrl("~/Pages/Clientes/FraccionamientoDetalle.aspx?id=") +
|
||||
Convert.ToInt32(clave).ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
protected string ResumenFraccionamiento(object objeto)
|
||||
{
|
||||
var fila = objeto as ModeloFilaDesarrollos;
|
||||
|
||||
if (fila == null || !fila.EsFraccionamiento)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.CurrentCulture,
|
||||
"{0} · {1} etapa(s)",
|
||||
fila.Estatus,
|
||||
fila.NumeroEtapas);
|
||||
}
|
||||
|
||||
private void Cargar()
|
||||
{
|
||||
var resultado = AppServices.ServicioPortalCliente.ListarDesarrollos(
|
||||
|
||||
@@ -10,12 +10,16 @@ namespace SIG.Web.Pages.Clientes
|
||||
{
|
||||
public partial class FraccionamientoDetalle : ClsPaginaBase
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
private int CveFraccionamientoActual
|
||||
{
|
||||
get { return (int?)ViewState["CveFraccionamientoActual"] ?? 0; }
|
||||
set { ViewState["CveFraccionamientoActual"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object origen, EventArgs argumentos)
|
||||
{
|
||||
if (IsPostBack)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Detalle de desarrollador" Language="C#" MasterPageFile="~/Site.master"
|
||||
<%@ Page Title="Detalle de desarrollador" Language="C#" MasterPageFile="~/Site.master"
|
||||
AutoEventWireup="true" CodeFile="DesarrolladorDetalle.aspx.cs"
|
||||
Inherits="SIG.Web.Pages.Desarrolladores.DesarrolladorDetalle" %>
|
||||
<%@ Register TagPrefix="sig" TagName="CapturaEtapas" Src="~/UserControl/CapturaEtapas.ascx" %>
|
||||
@@ -20,9 +20,23 @@
|
||||
.desarrollador-acciones {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.desarrollador-listado > tbody > tr.desarrollador-grupo > td {
|
||||
.desarrollador-listado > tbody > tr.desarrollador-grupo {
|
||||
position: relative;
|
||||
height: 50px;
|
||||
}
|
||||
.desarrollador-listado > tbody > tr.desarrollador-grupo > td:first-child {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
min-height: 50px;
|
||||
background: #edf4f8;
|
||||
padding: 10px 12px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.desarrollador-listado > tbody > tr.desarrollador-grupo > td.desarrollador-celda-oculta-grupo {
|
||||
display: none;
|
||||
}
|
||||
.desarrollador-cabecera {
|
||||
display: flex;
|
||||
@@ -207,11 +221,17 @@
|
||||
<asp:BoundField DataField="Hectareas" HeaderText="Hectáreas de la etapa" DataFormatString="{0:N2}" />
|
||||
<asp:CheckBoxField DataField="Fideicomiso" HeaderText="Fideicomiso" />
|
||||
<asp:CheckBoxField DataField="EsActivo" HeaderText="Activa" />
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones"
|
||||
HeaderStyle-CssClass="sig-columna-acciones"
|
||||
ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" Text="Ver etapa"
|
||||
<asp:LinkButton runat="server"
|
||||
CssClass="btn btn-circle btn-sm blue sig-accion-icono"
|
||||
CommandName="VerEtapa" CausesValidation="false"
|
||||
Visible='<%# !Convert.ToBoolean(Eval("EsFraccionamiento")) %>' />
|
||||
ToolTip="Ver etapa" aria-label="Ver etapa"
|
||||
Visible='<%# !Convert.ToBoolean(Eval("EsFraccionamiento")) %>'>
|
||||
<i class="fa fa-eye" aria-hidden="true"></i>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
@@ -16,6 +16,28 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
{
|
||||
public partial class DesarrolladorDetalle : ClsPaginaBase
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
private int CveClienteActual
|
||||
{
|
||||
get { return ViewState["CveClienteActual"] as int? ?? 0; }
|
||||
set { ViewState["CveClienteActual"] = value; }
|
||||
}
|
||||
|
||||
private int CveFraccionamientoEtapaActual
|
||||
{
|
||||
get { return ViewState["CveFraccionamientoEtapaActual"] as int? ?? 0; }
|
||||
set { ViewState["CveFraccionamientoEtapaActual"] = value; }
|
||||
}
|
||||
|
||||
private bool AsociadoCanadeviActual
|
||||
{
|
||||
get { return ViewState["AsociadoCanadeviActual"] as bool? ?? false; }
|
||||
set { ViewState["AsociadoCanadeviActual"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Fraccionamientos_FilaEnlazada(object origen, GridViewRowEventArgs argumentos)
|
||||
{
|
||||
if (argumentos.Row.RowType != DataControlRowType.DataRow)
|
||||
@@ -30,10 +52,11 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
if (desarrollo.EsFraccionamiento)
|
||||
{
|
||||
argumentos.Row.CssClass = "desarrollador-grupo";
|
||||
argumentos.Row.Cells[0].ColumnSpan = GvFraccionamientos.Columns.Count;
|
||||
for (int indice = 1; indice < argumentos.Row.Cells.Count; indice++)
|
||||
{
|
||||
argumentos.Row.Cells[indice].Visible = false;
|
||||
argumentos.Row.Cells[indice].CssClass =
|
||||
(argumentos.Row.Cells[indice].CssClass +
|
||||
" desarrollador-celda-oculta-grupo").Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,24 +119,6 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
}
|
||||
}
|
||||
|
||||
private int CveClienteActual
|
||||
{
|
||||
get { return ViewState["CveClienteActual"] as int? ?? 0; }
|
||||
set { ViewState["CveClienteActual"] = value; }
|
||||
}
|
||||
|
||||
private int CveFraccionamientoEtapaActual
|
||||
{
|
||||
get { return ViewState["CveFraccionamientoEtapaActual"] as int? ?? 0; }
|
||||
set { ViewState["CveFraccionamientoEtapaActual"] = value; }
|
||||
}
|
||||
|
||||
private bool AsociadoCanadeviActual
|
||||
{
|
||||
get { return ViewState["AsociadoCanadeviActual"] as bool? ?? false; }
|
||||
set { ViewState["AsociadoCanadeviActual"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object origen, EventArgs argumentos)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
|
||||
@@ -39,8 +39,9 @@
|
||||
<asp:TextBox ID="ReferenciaComprobante" runat="server" MaxLength="200" CssClass="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="ArchivoComprobante" Text="Comprobante (PDF, JPG o PNG; hasta 5 MB)" />
|
||||
<asp:FileUpload ID="ArchivoComprobante" runat="server" />
|
||||
<label>Comprobante (PDF, JPG o PNG; hasta 5 MB)</label>
|
||||
<input id="ArchivoComprobante" runat="server" type="hidden"
|
||||
class="ADSdropzoneLocal" />
|
||||
</div>
|
||||
<asp:LinkButton ID="EnviarComprobante" runat="server"
|
||||
CssClass="btn blue" CausesValidation="false"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.UI;
|
||||
@@ -12,6 +12,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
{
|
||||
public partial class PagoDetalle : ClsPaginaBase
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
private int CveObligacionActual
|
||||
{
|
||||
get { return (int?)ViewState["CveObligacionActual"] ?? 0; }
|
||||
@@ -27,6 +29,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object origen, EventArgs argumentos)
|
||||
{
|
||||
ScriptManager.GetCurrent(Page).RegisterPostBackControl(EnviarComprobante);
|
||||
@@ -135,6 +139,12 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
Alert(formas.UserMessage, TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
FechaComprobante.Text = DateTime.Today.ToString("yyyy-MM-dd");
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
ArchivoComprobante,
|
||||
".pdf,.jpg,.jpeg,.png",
|
||||
5,
|
||||
1,
|
||||
"Arrastra aquí el comprobante o haz clic para seleccionarlo.");
|
||||
var consulta = AppServices.ServicioPagosConvenios.ListarComprobantes(
|
||||
obligacion.CveSolicitudPago, CurrentUser.CveUsuario, CurrentUser.NombreDominio);
|
||||
Comprobantes.Columns[Comprobantes.Columns.Count - 1].Visible = PuedeAprobarComprobantes;
|
||||
@@ -152,7 +162,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
decimal importe;
|
||||
DateTime fecha;
|
||||
byte forma;
|
||||
if (!ArchivoComprobante.HasFile ||
|
||||
var archivoComprobante = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoComprobante);
|
||||
if (archivoComprobante == null ||
|
||||
!decimal.TryParse(ImporteComprobante.Text, NumberStyles.AllowDecimalPoint,
|
||||
CultureInfo.CurrentCulture, out importe) ||
|
||||
!DateTime.TryParseExact(FechaComprobante.Text, "yyyy-MM-dd",
|
||||
@@ -169,10 +180,10 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
Importe = importe,
|
||||
CveFormaPago = forma,
|
||||
Referencia = ReferenciaComprobante.Text.Trim(),
|
||||
NombreArchivo = ArchivoComprobante.FileName,
|
||||
TipoContenido = ArchivoComprobante.PostedFile.ContentType,
|
||||
TamanoBytes = ArchivoComprobante.PostedFile.ContentLength
|
||||
}, ArchivoComprobante.PostedFile.InputStream, CurrentUser.CveUsuario, CurrentUser.NombreDominio);
|
||||
NombreArchivo = archivoComprobante.FileName,
|
||||
TipoContenido = archivoComprobante.ContentType,
|
||||
TamanoBytes = archivoComprobante.ContentLength
|
||||
}, archivoComprobante.InputStream, CurrentUser.CveUsuario, CurrentUser.NombreDominio);
|
||||
if (!resultado.Success)
|
||||
{
|
||||
Alert(resultado.UserMessage, TipoMensaje.MsgAdvertencia);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Trámites" Language="C#" MasterPageFile="~/Site.master"
|
||||
<%@ Page Title="Trámites" Language="C#" MasterPageFile="~/Site.master"
|
||||
AutoEventWireup="true" CodeFile="Tramites.aspx.cs"
|
||||
Inherits="SIG.Web.Pages.Desarrolladores.Tramites" %>
|
||||
|
||||
@@ -27,9 +27,29 @@
|
||||
background-color: #dff0d8;
|
||||
}
|
||||
|
||||
.sig-tablero-tramites .sig-tramites-agrupacion > td {
|
||||
.sig-tablero-tramites .sig-tramites-columna-grupo {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sig-tablero-tramites .sig-tramites-agrupacion {
|
||||
position: relative;
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
.sig-tablero-tramites .sig-tramites-agrupacion > td.sig-tramites-columna-grupo {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
min-height: 42px;
|
||||
padding: 0;
|
||||
background: #eef3f7;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sig-tablero-tramites .sig-tramites-agrupacion > td.sig-tramites-columna-normal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sig-tramites-alternar-grupo {
|
||||
@@ -81,6 +101,15 @@
|
||||
OnRowCommand="GvTramites_Comando"
|
||||
EmptyDataText="No hay solicitudes para los filtros seleccionados.">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderStyle-CssClass="sig-tramites-columna-grupo"
|
||||
ItemStyle-CssClass="sig-tramites-columna-grupo">
|
||||
<ItemTemplate>
|
||||
<button type="button" class="sig-tramites-alternar-grupo" aria-expanded="true">
|
||||
<span><%#: Eval("Agrupacion") %></span>
|
||||
<i class="fa fa-chevron-up" aria-hidden="true"></i>
|
||||
</button>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" />
|
||||
<asp:BoundField DataField="Tramite" HeaderText="Trámite" />
|
||||
<asp:TemplateField HeaderText="Fraccionamiento · Etapa">
|
||||
@@ -98,7 +127,7 @@
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
||||
<asp:BoundField DataField="FechaInicio" HeaderText="Fecha inicio"
|
||||
DataFormatString="{0:dd/MM/yyyy}" />
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditarEstatus" runat="server"
|
||||
CssClass="btn btn-circle btn-sm blue"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using SIG.Web.AppCode.Configuration;
|
||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||
@@ -16,6 +15,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
{
|
||||
public partial class Tramites : ClsPaginaBase
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
private ModeloFiltroTableroTramites FiltrosTableroActuales
|
||||
{
|
||||
get
|
||||
@@ -43,6 +44,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnInit(EventArgs argumentos)
|
||||
{
|
||||
base.OnInit(argumentos);
|
||||
@@ -50,7 +53,7 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
|
||||
bool esCliente = CurrentUser.EsDesarrollador;
|
||||
PestanaSeguimientoCondiciones.Visible = !esCliente;
|
||||
GvTramites.Columns[0].Visible = !esCliente;
|
||||
GvTramites.Columns[1].Visible = !esCliente;
|
||||
CampoSoloBloqueados.Visible = !esCliente;
|
||||
|
||||
DdlAgrupacion.Items.Add(new ListItem(
|
||||
@@ -168,6 +171,15 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
}
|
||||
|
||||
var solicitud = (ModeloFilaTableroTramites)argumentos.Row.DataItem;
|
||||
for (int indiceCelda = 0; indiceCelda < argumentos.Row.Cells.Count; indiceCelda++)
|
||||
{
|
||||
string claseCelda = indiceCelda == 0
|
||||
? "sig-tramites-columna-grupo"
|
||||
: "sig-tramites-columna-normal";
|
||||
argumentos.Row.Cells[indiceCelda].CssClass =
|
||||
(argumentos.Row.Cells[indiceCelda].CssClass + " " + claseCelda).Trim();
|
||||
}
|
||||
|
||||
argumentos.Row.Attributes["data-cve-agrupacion"] =
|
||||
solicitud.CveAgrupacion.ToString(CultureInfo.InvariantCulture);
|
||||
argumentos.Row.Attributes["data-nivel"] =
|
||||
@@ -175,34 +187,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
||||
|
||||
if (solicitud.Nivel == 2)
|
||||
{
|
||||
int columnasVisibles = GvTramites.Columns
|
||||
.Cast<DataControlField>()
|
||||
.Count(columna => columna.Visible);
|
||||
|
||||
argumentos.Row.Cells.Clear();
|
||||
argumentos.Row.CssClass = "sig-tramites-agrupacion";
|
||||
|
||||
var celda = new TableCell
|
||||
{
|
||||
ColumnSpan = columnasVisibles
|
||||
};
|
||||
var boton = new HtmlGenericControl("button");
|
||||
boton.Attributes["type"] = "button";
|
||||
boton.Attributes["class"] = "sig-tramites-alternar-grupo";
|
||||
boton.Attributes["aria-expanded"] = "true";
|
||||
|
||||
var nombreGrupo = new HtmlGenericControl("span")
|
||||
{
|
||||
InnerText = solicitud.Agrupacion
|
||||
};
|
||||
var flecha = new HtmlGenericControl("i");
|
||||
flecha.Attributes["class"] = "fa fa-chevron-up";
|
||||
flecha.Attributes["aria-hidden"] = "true";
|
||||
|
||||
boton.Controls.Add(nombreGrupo);
|
||||
boton.Controls.Add(flecha);
|
||||
celda.Controls.Add(boton);
|
||||
argumentos.Row.Cells.Add(celda);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1185,16 +1185,15 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label>Archivo</label>
|
||||
<asp:FileUpload ID="ArchivoDocumento"
|
||||
runat="server"
|
||||
CssClass="form-control" />
|
||||
<input id="ArchivoDocumento" runat="server" type="hidden"
|
||||
class="ADSdropzoneLocal" />
|
||||
<span class="help-block">
|
||||
<asp:Literal ID="LitReglasCargaDocumento" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Fecha del documento (opcional)</label>
|
||||
<label>Fecha del documento</label>
|
||||
<asp:TextBox ID="TxtFechaDocumento"
|
||||
runat="server"
|
||||
CssClass="form-control"
|
||||
@@ -2016,9 +2015,8 @@
|
||||
Descargar plantilla
|
||||
</asp:HyperLink>
|
||||
|
||||
<asp:FileUpload ID="ArchivoLotes"
|
||||
runat="server"
|
||||
CssClass="form-control fraction-lot-upload" />
|
||||
<input id="ArchivoLotes" runat="server" type="hidden"
|
||||
class="ADSdropzoneLocal" />
|
||||
|
||||
<asp:Button ID="BtnImportarLotes"
|
||||
runat="server"
|
||||
|
||||
@@ -908,10 +908,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
return;
|
||||
}
|
||||
|
||||
if (CurrentUser.CveRol > 2)
|
||||
if (CurrentUser.EsDesarrollador)
|
||||
{
|
||||
Alert(
|
||||
"Sólo un superusuario puede rechazar documentos.",
|
||||
"La revisión de documentos corresponde a Agua de Hermosillo.",
|
||||
TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
@@ -938,7 +938,8 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ArchivoDocumento.HasFile || ArchivoDocumento.PostedFile == null)
|
||||
var archivoDocumento = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoDocumento);
|
||||
if (archivoDocumento == null)
|
||||
{
|
||||
MostrarValidacionCargaDocumento(
|
||||
"Seleccione el archivo que desea guardar.");
|
||||
@@ -959,10 +960,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
CveFraccionamientoActual,
|
||||
cveSolicitud,
|
||||
cveTipoDocumento,
|
||||
ArchivoDocumento.FileName,
|
||||
ArchivoDocumento.PostedFile.ContentType,
|
||||
ArchivoDocumento.PostedFile.InputStream,
|
||||
ArchivoDocumento.PostedFile.ContentLength,
|
||||
archivoDocumento.FileName,
|
||||
archivoDocumento.ContentType,
|
||||
archivoDocumento.InputStream,
|
||||
archivoDocumento.ContentLength,
|
||||
TxtComentarioClienteDocumento.Text,
|
||||
CurrentUser.CveUsuario,
|
||||
CurrentUser.NombreDominio,
|
||||
@@ -1430,7 +1431,8 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ArchivoLotes.HasFile)
|
||||
var archivoLotes = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoLotes);
|
||||
if (archivoLotes == null)
|
||||
{
|
||||
MostrarValidacionLote(
|
||||
"Seleccione la plantilla de Excel que desea cargar.");
|
||||
@@ -1439,10 +1441,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
|
||||
ResultadoExcelLotesFraccionamiento resultadoExcel =
|
||||
ExcelLotesFraccionamiento.Leer(
|
||||
ArchivoLotes.PostedFile.InputStream,
|
||||
ArchivoLotes.FileName,
|
||||
ArchivoLotes.PostedFile.ContentLength,
|
||||
ArchivoLotes.PostedFile.ContentType);
|
||||
archivoLotes.InputStream,
|
||||
archivoLotes.FileName,
|
||||
archivoLotes.ContentLength,
|
||||
archivoLotes.ContentType);
|
||||
|
||||
if (!resultadoExcel.Exitoso)
|
||||
{
|
||||
@@ -2011,9 +2013,15 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
}
|
||||
|
||||
LitReglasCargaDocumento.Text = Server.HtmlEncode(reglas);
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
ArchivoDocumento,
|
||||
contexto.ExtensionesPermitidas,
|
||||
contexto.TamanoMaximoMb,
|
||||
1);
|
||||
TxtComentarioClienteDocumento.Text =
|
||||
contexto.ComentarioClienteAnterior ?? string.Empty;
|
||||
TxtFechaDocumento.Text = FormatearFechaDocumento(contexto.FechaDocumentoAnterior);
|
||||
TxtFechaDocumento.Text = FormatearFechaDocumento(DateTime.Today);
|
||||
TxtFechaDocumento.Attributes["max"] = FormatearFechaDocumento(DateTime.Today);
|
||||
TxtVencimientoDocumento.Text = FormatearFechaDocumento(contexto.FechaVencimientoAnterior);
|
||||
OcultarMensajeCargaDocumento();
|
||||
UpModalCargaDocumento.Update();
|
||||
@@ -2025,10 +2033,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
bool aprobado,
|
||||
string nota)
|
||||
{
|
||||
if (CurrentUser.CveRol > 2)
|
||||
if (CurrentUser.EsDesarrollador)
|
||||
{
|
||||
Alert(
|
||||
"Sólo un superusuario puede aprobar o rechazar documentos.",
|
||||
"La revisión de documentos corresponde a Agua de Hermosillo.",
|
||||
TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
@@ -3111,6 +3119,12 @@ namespace SIG.Web.Pages.Fraccionamientos
|
||||
|
||||
CveFraccionamientoEtapaLotesActual = cveFraccionamientoEtapa;
|
||||
LitLoteEtapaNombre.Text = Server.HtmlEncode(etapaItem.Text);
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
ArchivoLotes,
|
||||
".xlsx",
|
||||
null,
|
||||
1,
|
||||
"Arrastra aquí la plantilla .xlsx o haz clic para seleccionarla.");
|
||||
LimpiarCapturaLote();
|
||||
UpLotesModal.Update();
|
||||
MostrarLoteModal();
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* custom.js
|
||||
* Cleaned for the new C# WebForms project.
|
||||
* Notes:
|
||||
@@ -1625,8 +1625,17 @@ function ADDropzoneLocal(txtid) {
|
||||
txt.attr('data-maxFile') || txt.attr('data-maxfile'),
|
||||
10);
|
||||
var acceptedFiles = txt.attr('data-acceptedfiles') || null;
|
||||
var modoLectura = (txt.attr('data-readmode') || 'text').toLowerCase();
|
||||
var nombreCampoArchivo = txt.attr('data-input-name') || null;
|
||||
var message = txt.attr('data-message') ||
|
||||
'Arrastra un archivo aquí o haz clic para seleccionarlo.';
|
||||
|
||||
if (nombreCampoArchivo) {
|
||||
txt.closest('form')
|
||||
.attr('enctype', 'multipart/form-data')
|
||||
.attr('encoding', 'multipart/form-data');
|
||||
}
|
||||
|
||||
var appendId = txt.attr('data-append');
|
||||
var dropId = txtid + '-drop';
|
||||
var existing = $('#' + dropId);
|
||||
@@ -1710,6 +1719,15 @@ function ADDropzoneLocal(txtid) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (modoLectura === 'none') {
|
||||
txt.trigger('adsdropzone:fileadded', [
|
||||
file,
|
||||
null,
|
||||
instance
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function (event) {
|
||||
@@ -1739,8 +1757,11 @@ function ADDropzoneLocal(txtid) {
|
||||
* archivo y los mismos eventos adsdropzone:* consumidos por la pantalla.
|
||||
* Si Dropzone está cargado en otra instalación, se usa normalmente.
|
||||
*/
|
||||
if (typeof Dropzone === 'undefined') {
|
||||
if (typeof Dropzone === 'undefined' || nombreCampoArchivo) {
|
||||
var input = $('<input type="file" style="display:none;" />');
|
||||
if (nombreCampoArchivo) {
|
||||
input.attr('name', nombreCampoArchivo);
|
||||
}
|
||||
if (acceptedFiles) {
|
||||
input.attr('accept', acceptedFiles);
|
||||
}
|
||||
@@ -1756,12 +1777,14 @@ function ADDropzoneLocal(txtid) {
|
||||
if (index >= 0) {
|
||||
this.files.splice(index, 1);
|
||||
}
|
||||
sincronizarInputFallback();
|
||||
renderFallback();
|
||||
txt.trigger('adsdropzone:fileremoved', [file, fallback]);
|
||||
},
|
||||
removeAllFiles: function () {
|
||||
var files = this.files.slice(0);
|
||||
this.files = [];
|
||||
sincronizarInputFallback();
|
||||
renderFallback();
|
||||
$.each(files, function (_, file) {
|
||||
txt.trigger('adsdropzone:fileremoved', [file, fallback]);
|
||||
@@ -1769,6 +1792,31 @@ function ADDropzoneLocal(txtid) {
|
||||
}
|
||||
};
|
||||
|
||||
function sincronizarInputFallback() {
|
||||
if (!nombreCampoArchivo) {
|
||||
return;
|
||||
}
|
||||
|
||||
var elemento = input.get(0);
|
||||
if (!elemento) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
var transferencia = new DataTransfer();
|
||||
$.each(fallback.files, function (_, file) {
|
||||
transferencia.items.add(file);
|
||||
});
|
||||
elemento.files = transferencia.files;
|
||||
} catch (ex) {
|
||||
/*
|
||||
* Navegadores antiguos pueden impedir asignar FileList.
|
||||
* En selección por clic el input conserva su FileList nativo;
|
||||
* el fallback por drag/drop requiere DataTransfer.
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
function renderFallback() {
|
||||
mydiv.find('.ADSdropzoneLocalFallbackPreview').remove();
|
||||
mydiv.find('.dz-message').toggle(fallback.files.length === 0);
|
||||
@@ -1817,16 +1865,33 @@ function ADDropzoneLocal(txtid) {
|
||||
}
|
||||
|
||||
fallback.files.push(file);
|
||||
sincronizarInputFallback();
|
||||
renderFallback();
|
||||
readFile(file, fallback);
|
||||
}
|
||||
|
||||
input.on('change', function () {
|
||||
var seleccionados = [];
|
||||
var files = this.files || [];
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
addFallbackFile(files[i]);
|
||||
var i;
|
||||
|
||||
for (i = 0; i < files.length; i++) {
|
||||
seleccionados.push(files[i]);
|
||||
}
|
||||
|
||||
if (!isNaN(maxFile) && maxFile === 1) {
|
||||
fallback.files = [];
|
||||
}
|
||||
|
||||
for (i = 0; i < seleccionados.length; i++) {
|
||||
addFallbackFile(seleccionados[i]);
|
||||
}
|
||||
|
||||
if (!nombreCampoArchivo) {
|
||||
this.value = '';
|
||||
} else {
|
||||
sincronizarInputFallback();
|
||||
}
|
||||
this.value = '';
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
40
SIG.Web/Styles/Archivos.css
Normal file
40
SIG.Web/Styles/Archivos.css
Normal file
@@ -0,0 +1,40 @@
|
||||
.ADSdropzoneLocalContainer {
|
||||
min-height: 118px;
|
||||
border: 2px dashed #c3ccd5;
|
||||
background: #ffffff;
|
||||
padding: 18px 12px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ADSdropzoneLocalContainer:focus {
|
||||
outline: 1px solid #3598dc;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.ADSdropzoneLocalContainer .dz-message {
|
||||
color: #6f7b86;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.ADSdropzoneLocalContainer.is-dragging {
|
||||
border-style: solid;
|
||||
background: #eef6fb;
|
||||
}
|
||||
|
||||
.ADSdropzoneLocalFallbackPreview {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background: #ffffff;
|
||||
border: 1px solid #d9dee4;
|
||||
}
|
||||
|
||||
.ADSdropzoneLocalFileName {
|
||||
margin-bottom: 8px;
|
||||
font-weight: 600;
|
||||
word-break: break-all;
|
||||
}
|
||||
@@ -1,6 +1,79 @@
|
||||
.sig-grid-agrupado .sig-grid-grupo > td { padding: 0; background: #eef5f9; }
|
||||
.sig-grid-agrupado .sig-grid-alternar-grupo { width: 100%; border: 0; background: transparent; padding: 10px 12px; text-align: left; font-weight: 600; }
|
||||
.sig-grid-agrupado .sig-grid-alternar-grupo .fa { float: right; margin-top: 3px; }
|
||||
.sig-grid-agrupado tr[data-sig-level="1"] > td:first-child { padding-left: 24px; }
|
||||
.sig-grid-agrupado tr[data-sig-level="2"] > td:first-child { padding-left: 42px; }
|
||||
.sig-grid-agrupado tr[data-sig-level="3"] > td:first-child { padding-left: 60px; }
|
||||
.sig-grid-agrupado .sig-grid-columna-grupo {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado tr.sig-grid-grupo {
|
||||
position: relative;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado tr.sig-grid-grupo > td.sig-grid-columna-grupo {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
min-height: 38px;
|
||||
padding: 0;
|
||||
background: #eef5f9;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado tr.sig-grid-grupo > td.sig-grid-columna-normal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado tr.sig-grid-fila-dato > td.sig-grid-columna-grupo {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado .sig-grid-alternar-grupo {
|
||||
width: 100%;
|
||||
min-height: 38px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
padding: 10px 12px;
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado .sig-grid-alternar-grupo .fa {
|
||||
float: right;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado tr[data-sig-level="1"] > td.sig-grid-columna-dato-principal {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado tr[data-sig-level="2"] > td.sig-grid-columna-dato-principal {
|
||||
padding-left: 42px;
|
||||
}
|
||||
|
||||
.sig-grid-agrupado tr[data-sig-level="3"] > td.sig-grid-columna-dato-principal {
|
||||
padding-left: 60px;
|
||||
}
|
||||
|
||||
.sig-columna-acciones {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sig-columna-acciones .btn {
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.sig-accion-icono {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.sig-accion-icono-redondo {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="false" CodeFile="DocumentosCliente.ascx.cs"
|
||||
<%@ Control Language="C#" AutoEventWireup="false" CodeFile="DocumentosCliente.ascx.cs"
|
||||
Inherits="SIG.Web.UserControl.Clientes.DocumentosCliente" %>
|
||||
|
||||
<asp:UpdatePanel ID="UpDocumentos" runat="server"
|
||||
@@ -21,14 +21,27 @@
|
||||
OnRowDataBound="EnlazarFila"
|
||||
OnRowCommand="ComandoDocumento">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Fraccionamiento" HeaderText="Fraccionamiento" />
|
||||
<asp:TemplateField HeaderStyle-CssClass="sig-grid-columna-grupo"
|
||||
ItemStyle-CssClass="sig-grid-columna-grupo">
|
||||
<ItemTemplate>
|
||||
<button type="button" class="sig-grid-alternar-grupo" aria-expanded="true">
|
||||
<span class="sig-grid-grupo-titulo"><%#: Eval("TituloGrupo") %></span>
|
||||
<i class="fa fa-chevron-up sig-grid-icono-agrupacion" aria-hidden="true"></i>
|
||||
</button>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Fraccionamiento" HeaderText="Fraccionamiento"
|
||||
ItemStyle-CssClass="sig-grid-columna-dato-principal" />
|
||||
<asp:BoundField DataField="Etapa" HeaderText="Etapa" />
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Documento" />
|
||||
<asp:BoundField DataField="TipoTramite" HeaderText="Trámite" />
|
||||
<asp:CheckBoxField DataField="EsRequerido" HeaderText="Requerido" />
|
||||
<asp:BoundField DataField="EstadoDocumento" HeaderText="Estado" />
|
||||
<asp:BoundField DataField="FechaVencimiento" HeaderText="Vencimiento"
|
||||
DataFormatString="{0:dd/MM/yyyy}" />
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones"
|
||||
HeaderStyle-CssClass="sig-columna-acciones"
|
||||
ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LnkVerDocumento" runat="server"
|
||||
CssClass="btn btn-sm default"
|
||||
@@ -38,12 +51,12 @@
|
||||
Ver
|
||||
</asp:HyperLink>
|
||||
<asp:LinkButton ID="BtnCargarDocumento" runat="server"
|
||||
CssClass="btn btn-sm blue"
|
||||
CssClass="btn btn-sm blue sig-accion-icono"
|
||||
CommandName="Cargar"
|
||||
CausesValidation="false"
|
||||
ToolTip="Cargar / renovar" aria-label="Cargar / renovar"
|
||||
Visible='<%# Convert.ToBoolean(Eval("PuedeCargar")) %>'>
|
||||
<i class="fa fa-upload" aria-hidden="true"></i>
|
||||
Cargar / renovar
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -118,10 +131,9 @@
|
||||
<div class="modal-body">
|
||||
<p><asp:Literal ID="ReglasArchivoDocumento" runat="server" Mode="Encode" /></p>
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="ArchivoDocumento"
|
||||
Text="Archivo" />
|
||||
<asp:FileUpload ID="ArchivoDocumento" runat="server"
|
||||
CssClass="form-control" />
|
||||
<label>Archivo</label>
|
||||
<input id="ArchivoDocumento" runat="server" type="hidden"
|
||||
class="ADSdropzoneLocal" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="FechaDocumento"
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using SIG.Web.AppCode.Configuration;
|
||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||
@@ -18,6 +17,8 @@ namespace SIG.Web.UserControl.Clientes
|
||||
{
|
||||
public partial class DocumentosCliente : System.Web.UI.UserControl
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
private UserSessionModel Usuario
|
||||
{
|
||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||
@@ -64,6 +65,8 @@ namespace SIG.Web.UserControl.Clientes
|
||||
set { ViewState["DocumentosActuales"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnInit(EventArgs argumentos)
|
||||
{
|
||||
base.OnInit(argumentos);
|
||||
@@ -157,6 +160,15 @@ namespace SIG.Web.UserControl.Clientes
|
||||
return;
|
||||
}
|
||||
|
||||
for (int indiceCelda = 0; indiceCelda < argumentos.Row.Cells.Count; indiceCelda++)
|
||||
{
|
||||
string claseCelda = indiceCelda == 0
|
||||
? "sig-grid-columna-grupo"
|
||||
: "sig-grid-columna-normal";
|
||||
argumentos.Row.Cells[indiceCelda].CssClass =
|
||||
(argumentos.Row.Cells[indiceCelda].CssClass + " " + claseCelda).Trim();
|
||||
}
|
||||
|
||||
argumentos.Row.Attributes["data-sig-level"] =
|
||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
@@ -173,33 +185,11 @@ namespace SIG.Web.UserControl.Clientes
|
||||
fila.ParentGroupId;
|
||||
}
|
||||
|
||||
int columnas = GvDocumentos.Columns
|
||||
.Cast<DataControlField>()
|
||||
.Count(columna => columna.Visible);
|
||||
|
||||
argumentos.Row.Cells.Clear();
|
||||
var celda = new TableCell { ColumnSpan = columnas };
|
||||
var boton = new HtmlGenericControl("button");
|
||||
boton.Attributes["type"] = "button";
|
||||
boton.Attributes["class"] = "sig-grid-alternar-grupo";
|
||||
boton.Attributes["aria-expanded"] = "true";
|
||||
|
||||
var titulo = new HtmlGenericControl("span");
|
||||
titulo.Attributes["class"] = "sig-grid-grupo-titulo";
|
||||
titulo.InnerText = fila.TituloGrupo;
|
||||
|
||||
var flecha = new HtmlGenericControl("i");
|
||||
flecha.Attributes["class"] =
|
||||
"fa fa-chevron-up sig-grid-icono-agrupacion";
|
||||
flecha.Attributes["aria-hidden"] = "true";
|
||||
|
||||
boton.Controls.Add(titulo);
|
||||
boton.Controls.Add(flecha);
|
||||
celda.Controls.Add(boton);
|
||||
argumentos.Row.Cells.Add(celda);
|
||||
return;
|
||||
}
|
||||
|
||||
argumentos.Row.CssClass =
|
||||
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||
argumentos.Row.Attributes["data-sig-parent-group"] =
|
||||
fila.ParentGroupId;
|
||||
@@ -282,8 +272,13 @@ namespace SIG.Web.UserControl.Clientes
|
||||
(contexto.Data.TamanoMaximoMb.HasValue
|
||||
? " · Máximo " + contexto.Data.TamanoMaximoMb + " MB"
|
||||
: string.Empty);
|
||||
FechaDocumento.Text = FormatearFecha(
|
||||
contexto.Data.FechaDocumentoAnterior);
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
ArchivoDocumento,
|
||||
contexto.Data.ExtensionesPermitidas,
|
||||
contexto.Data.TamanoMaximoMb,
|
||||
1);
|
||||
FechaDocumento.Text = FormatearFecha(DateTime.Today);
|
||||
FechaDocumento.Attributes["max"] = FormatearFecha(DateTime.Today);
|
||||
FechaVencimientoDocumento.Text = FormatearFecha(
|
||||
contexto.Data.FechaVencimientoAnterior);
|
||||
NotaDocumento.Text = contexto.Data.ComentarioClienteAnterior ?? string.Empty;
|
||||
@@ -297,8 +292,10 @@ namespace SIG.Web.UserControl.Clientes
|
||||
DateTime? fechaDocumento;
|
||||
DateTime? fechaVencimiento;
|
||||
|
||||
var archivo = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoDocumento);
|
||||
|
||||
if (DocumentoSeleccionado == null ||
|
||||
!ArchivoDocumento.HasFile ||
|
||||
archivo == null ||
|
||||
!LeerFecha(FechaDocumento.Text, out fechaDocumento) ||
|
||||
!LeerFecha(FechaVencimientoDocumento.Text, out fechaVencimiento))
|
||||
{
|
||||
@@ -312,10 +309,10 @@ namespace SIG.Web.UserControl.Clientes
|
||||
DocumentoSeleccionado.CveFraccionamiento,
|
||||
DocumentoSeleccionado.CveSolicitud,
|
||||
DocumentoSeleccionado.CveTipoDocumento,
|
||||
ArchivoDocumento.FileName,
|
||||
ArchivoDocumento.PostedFile.ContentType,
|
||||
ArchivoDocumento.PostedFile.InputStream,
|
||||
ArchivoDocumento.PostedFile.ContentLength,
|
||||
archivo.FileName,
|
||||
archivo.ContentType,
|
||||
archivo.InputStream,
|
||||
archivo.ContentLength,
|
||||
NotaDocumento.Text,
|
||||
usuario.CveUsuario,
|
||||
usuario.NombreDominio,
|
||||
@@ -724,6 +721,11 @@ namespace SIG.Web.UserControl.Clientes
|
||||
get { return Documento == null ? string.Empty : Documento.EstadoDocumento; }
|
||||
}
|
||||
|
||||
public bool EsRequerido
|
||||
{
|
||||
get { return Documento != null && Documento.EsRequerido; }
|
||||
}
|
||||
|
||||
public DateTime? FechaVencimiento
|
||||
{
|
||||
get { return Documento == null ? null : Documento.FechaVencimiento; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="false" CodeFile="PagosCliente.ascx.cs"
|
||||
<%@ Control Language="C#" AutoEventWireup="false" CodeFile="PagosCliente.ascx.cs"
|
||||
Inherits="SIG.Web.UserControl.Clientes.PagosCliente" %>
|
||||
|
||||
<asp:UpdatePanel ID="UpPagos" runat="server"
|
||||
@@ -21,7 +21,17 @@
|
||||
OnRowDataBound="EnlazarFila"
|
||||
OnRowCommand="ComandoPago">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Fraccionamiento" HeaderText="Fraccionamiento" />
|
||||
<asp:TemplateField HeaderStyle-CssClass="sig-grid-columna-grupo"
|
||||
ItemStyle-CssClass="sig-grid-columna-grupo">
|
||||
<ItemTemplate>
|
||||
<button type="button" class="sig-grid-alternar-grupo" aria-expanded="true">
|
||||
<span class="sig-grid-grupo-titulo"><%#: Eval("TituloGrupo") %></span>
|
||||
<i class="fa fa-chevron-up sig-grid-icono-agrupacion" aria-hidden="true"></i>
|
||||
</button>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Fraccionamiento" HeaderText="Fraccionamiento"
|
||||
ItemStyle-CssClass="sig-grid-columna-dato-principal" />
|
||||
<asp:BoundField DataField="Etapa" HeaderText="Etapa" />
|
||||
<asp:BoundField DataField="NumeroConvenio" HeaderText="Convenio" />
|
||||
<asp:TemplateField HeaderText="Concepto / recibos">
|
||||
@@ -47,7 +57,9 @@
|
||||
</asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones"
|
||||
HeaderStyle-CssClass="sig-columna-acciones"
|
||||
ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnPagar" runat="server"
|
||||
CssClass="btn btn-sm blue"
|
||||
@@ -146,10 +158,9 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="ArchivoPago"
|
||||
Text="Comprobante" />
|
||||
<asp:FileUpload ID="ArchivoPago" runat="server"
|
||||
CssClass="form-control" />
|
||||
<label>Comprobante</label>
|
||||
<input id="ArchivoPago" runat="server" type="hidden"
|
||||
class="ADSdropzoneLocal" />
|
||||
<span class="help-block">PDF, JPG o PNG; máximo 5 MB.</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,7 +256,7 @@
|
||||
Text='<%# Bind("ImporteAplicado", "{0:0.00}") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server"
|
||||
CssClass="btn btn-sm red"
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using SIG.Web.AppCode.Configuration;
|
||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||
@@ -17,6 +16,8 @@ namespace SIG.Web.UserControl.Clientes
|
||||
{
|
||||
public partial class PagosCliente : System.Web.UI.UserControl
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
private UserSessionModel Usuario
|
||||
{
|
||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||
@@ -64,6 +65,8 @@ namespace SIG.Web.UserControl.Clientes
|
||||
set { ViewState["RecibosDisponibles"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnInit(EventArgs argumentos)
|
||||
{
|
||||
base.OnInit(argumentos);
|
||||
@@ -157,6 +160,15 @@ namespace SIG.Web.UserControl.Clientes
|
||||
return;
|
||||
}
|
||||
|
||||
for (int indiceCelda = 0; indiceCelda < argumentos.Row.Cells.Count; indiceCelda++)
|
||||
{
|
||||
string claseCelda = indiceCelda == 0
|
||||
? "sig-grid-columna-grupo"
|
||||
: "sig-grid-columna-normal";
|
||||
argumentos.Row.Cells[indiceCelda].CssClass =
|
||||
(argumentos.Row.Cells[indiceCelda].CssClass + " " + claseCelda).Trim();
|
||||
}
|
||||
|
||||
argumentos.Row.Attributes["data-sig-level"] =
|
||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
@@ -173,33 +185,11 @@ namespace SIG.Web.UserControl.Clientes
|
||||
fila.ParentGroupId;
|
||||
}
|
||||
|
||||
int columnas = GvPagos.Columns
|
||||
.Cast<DataControlField>()
|
||||
.Count(columna => columna.Visible);
|
||||
|
||||
argumentos.Row.Cells.Clear();
|
||||
var celda = new TableCell { ColumnSpan = columnas };
|
||||
var boton = new HtmlGenericControl("button");
|
||||
boton.Attributes["type"] = "button";
|
||||
boton.Attributes["class"] = "sig-grid-alternar-grupo";
|
||||
boton.Attributes["aria-expanded"] = "true";
|
||||
|
||||
var titulo = new HtmlGenericControl("span");
|
||||
titulo.Attributes["class"] = "sig-grid-grupo-titulo";
|
||||
titulo.InnerText = fila.TituloGrupo;
|
||||
|
||||
var flecha = new HtmlGenericControl("i");
|
||||
flecha.Attributes["class"] =
|
||||
"fa fa-chevron-up sig-grid-icono-agrupacion";
|
||||
flecha.Attributes["aria-hidden"] = "true";
|
||||
|
||||
boton.Controls.Add(titulo);
|
||||
boton.Controls.Add(flecha);
|
||||
celda.Controls.Add(boton);
|
||||
argumentos.Row.Cells.Add(celda);
|
||||
return;
|
||||
}
|
||||
|
||||
argumentos.Row.CssClass =
|
||||
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||
argumentos.Row.Attributes["data-sig-parent-group"] =
|
||||
fila.ParentGroupId;
|
||||
@@ -322,6 +312,7 @@ namespace SIG.Web.UserControl.Clientes
|
||||
|
||||
decimal importePago;
|
||||
DateTime fechaPago;
|
||||
var archivoPago = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoPago);
|
||||
|
||||
if (!LeerDecimal(TxtImportePago.Text, out importePago) ||
|
||||
importePago <= 0m ||
|
||||
@@ -331,7 +322,7 @@ namespace SIG.Web.UserControl.Clientes
|
||||
CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.None,
|
||||
out fechaPago) ||
|
||||
!ArchivoPago.HasFile)
|
||||
archivoPago == null)
|
||||
{
|
||||
MostrarModal(ModalPagoConvenioCliente.ClientID);
|
||||
Avisar("Capture importe, fecha y comprobante del pago.");
|
||||
@@ -378,15 +369,15 @@ namespace SIG.Web.UserControl.Clientes
|
||||
Banco = TxtBancoPago.Text,
|
||||
NumeroOperacion = TxtNumeroOperacionPago.Text,
|
||||
Observaciones = TxtObservacionesPago.Text,
|
||||
NombreArchivo = ArchivoPago.FileName,
|
||||
TipoContenido = ArchivoPago.PostedFile.ContentType,
|
||||
TamanoBytes = ArchivoPago.PostedFile.ContentLength,
|
||||
NombreArchivo = archivoPago.FileName,
|
||||
TipoContenido = archivoPago.ContentType,
|
||||
TamanoBytes = archivoPago.ContentLength,
|
||||
Aplicaciones = aplicaciones
|
||||
};
|
||||
|
||||
var resultado = AppServices.ServicioPortalCliente.RegistrarPago(
|
||||
solicitud,
|
||||
ArchivoPago.PostedFile.InputStream,
|
||||
archivoPago.InputStream,
|
||||
usuario.CveUsuario,
|
||||
usuario.NombreDominio);
|
||||
|
||||
@@ -456,6 +447,12 @@ namespace SIG.Web.UserControl.Clientes
|
||||
TxtNumeroOperacionPago.Text = string.Empty;
|
||||
TxtObservacionesPago.Text = string.Empty;
|
||||
TxtImporteAplicarAgregar.Text = string.Empty;
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
ArchivoPago,
|
||||
".pdf,.jpg,.jpeg,.png",
|
||||
5,
|
||||
1,
|
||||
"Arrastra aquí el comprobante o haz clic para seleccionarlo.");
|
||||
|
||||
EnlazarAplicaciones();
|
||||
CargarComboRecibos();
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEnviarRevision" runat="server"
|
||||
CssClass="btn btn-sm blue"
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace SIG.Web.UserControl.Clientes
|
||||
{
|
||||
public event EventHandler Cambiado;
|
||||
|
||||
#region Propiedades
|
||||
|
||||
private UserSessionModel Usuario
|
||||
{
|
||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||
@@ -30,6 +32,8 @@ namespace SIG.Web.UserControl.Clientes
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void Cargar(int cveFraccionamiento)
|
||||
{
|
||||
CveFraccionamientoActual = cveFraccionamiento;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton
|
||||
ID="BtnDetalleConvenio"
|
||||
@@ -424,7 +424,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:PlaceHolder
|
||||
ID="PhAccionesConcepto"
|
||||
@@ -536,7 +536,17 @@
|
||||
EmptyDataText="El convenio no tiene conceptos."
|
||||
OnRowDataBound="EnlazarFilaDetalle">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="NumeroRecibo" HeaderText="Recibo" />
|
||||
<asp:TemplateField HeaderStyle-CssClass="sig-grid-columna-grupo"
|
||||
ItemStyle-CssClass="sig-grid-columna-grupo">
|
||||
<ItemTemplate>
|
||||
<button type="button" class="sig-grid-alternar-grupo" aria-expanded="true">
|
||||
<span class="sig-grid-grupo-titulo"><%#: Eval("TituloGrupo") %></span>
|
||||
<i class="fa fa-chevron-up sig-grid-icono-agrupacion" aria-hidden="true"></i>
|
||||
</button>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="NumeroRecibo" HeaderText="Recibo"
|
||||
ItemStyle-CssClass="sig-grid-columna-dato-principal" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="ImportePagado" HeaderText="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="SaldoPendiente" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using SIG.Web.AppCode.Configuration;
|
||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||
@@ -16,6 +15,8 @@ namespace SIG.Web.UserControl
|
||||
{
|
||||
public partial class ConveniosListado : System.Web.UI.UserControl
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
private UserSessionModel CurrentUser
|
||||
{
|
||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||
@@ -41,10 +42,12 @@ namespace SIG.Web.UserControl
|
||||
set { ViewState["ConceptosCaptura"] = value; }
|
||||
}
|
||||
|
||||
public event EventHandler Cambiado;
|
||||
|
||||
public bool MostrarAgregar { get; set; } = true;
|
||||
|
||||
#endregion
|
||||
|
||||
public event EventHandler Cambiado;
|
||||
|
||||
public void Cargar(FiltroConvenios filtro)
|
||||
{
|
||||
FiltroActual = filtro ?? new FiltroConvenios();
|
||||
@@ -936,6 +939,8 @@ namespace SIG.Web.UserControl
|
||||
}
|
||||
|
||||
argumentos.Row.CssClass = "sig-convenio-fila-parcialidad";
|
||||
argumentos.Row.CssClass =
|
||||
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||
argumentos.Row.Attributes["data-sig-parent-group"] =
|
||||
fila.ParentGroupId;
|
||||
@@ -1191,6 +1196,15 @@ namespace SIG.Web.UserControl
|
||||
return;
|
||||
}
|
||||
|
||||
for (int indiceCelda = 0; indiceCelda < argumentos.Row.Cells.Count; indiceCelda++)
|
||||
{
|
||||
string claseCelda = indiceCelda == 0
|
||||
? "sig-grid-columna-grupo"
|
||||
: "sig-grid-columna-normal";
|
||||
argumentos.Row.Cells[indiceCelda].CssClass =
|
||||
(argumentos.Row.Cells[indiceCelda].CssClass + " " + claseCelda).Trim();
|
||||
}
|
||||
|
||||
argumentos.Row.Attributes["data-sig-level"] =
|
||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
@@ -1202,48 +1216,17 @@ namespace SIG.Web.UserControl
|
||||
|
||||
if (!fila.EsGrupo)
|
||||
{
|
||||
argumentos.Row.CssClass =
|
||||
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||
return;
|
||||
}
|
||||
|
||||
int columnas = GvDetalle.Columns
|
||||
.Cast<DataControlField>()
|
||||
.Count(x => x.Visible);
|
||||
|
||||
argumentos.Row.Cells.Clear();
|
||||
argumentos.Row.CssClass = "sig-grid-grupo";
|
||||
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
||||
argumentos.Row.Attributes["data-sig-group-id"] = fila.GroupId;
|
||||
argumentos.Row.Attributes["data-sig-expanded-default"] =
|
||||
fila.AbiertoInicialmente ? "true" : "false";
|
||||
|
||||
var celda = new TableCell
|
||||
{
|
||||
ColumnSpan = columnas
|
||||
};
|
||||
|
||||
var boton = new HtmlGenericControl("button");
|
||||
boton.Attributes["type"] = "button";
|
||||
boton.Attributes["class"] = "sig-grid-alternar-grupo";
|
||||
boton.Attributes["aria-expanded"] =
|
||||
fila.AbiertoInicialmente ? "true" : "false";
|
||||
|
||||
var titulo = new HtmlGenericControl("span");
|
||||
titulo.Attributes["class"] = "sig-grid-grupo-titulo";
|
||||
titulo.InnerText = fila.TituloGrupo;
|
||||
|
||||
var flecha = new HtmlGenericControl("i");
|
||||
flecha.Attributes["class"] =
|
||||
"fa " +
|
||||
(fila.AbiertoInicialmente
|
||||
? "fa-chevron-up"
|
||||
: "fa-chevron-down");
|
||||
flecha.Attributes["aria-hidden"] = "true";
|
||||
|
||||
boton.Controls.Add(titulo);
|
||||
boton.Controls.Add(flecha);
|
||||
celda.Controls.Add(boton);
|
||||
argumentos.Row.Cells.Add(celda);
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
||||
@@ -62,10 +62,22 @@
|
||||
<asp:BoundField DataField="TipoTramite" HeaderText="Trámite" />
|
||||
<asp:BoundField DataField="EstatusSolicitud" HeaderText="Estatus" />
|
||||
<asp:BoundField DataField="FechaInicio" HeaderText="Fecha de inicio" />
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones"
|
||||
HeaderStyle-CssClass="sig-columna-acciones"
|
||||
ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnSeguimiento" runat="server" Text="Seguimiento"
|
||||
CommandName="Seguimiento" CssClass="btn btn-sm btn-primary" CausesValidation="false" />
|
||||
CommandName="Seguimiento" CssClass="btn btn-sm btn-primary" CausesValidation="false"
|
||||
Style="display:none" />
|
||||
<asp:LinkButton ID="BtnEnviarRevision" runat="server" Text="Enviar a revisión"
|
||||
CommandName="EnviarRevision" CssClass="btn btn-sm blue" CausesValidation="false"
|
||||
Visible='<%# MostrarAccionTramite(Container.DataItem, "EnviarRevision") %>' />
|
||||
<asp:LinkButton ID="BtnAutorizar" runat="server" Text="Autorizar"
|
||||
CommandName="Autorizar" CssClass="btn btn-sm green" CausesValidation="false"
|
||||
Visible='<%# MostrarAccionTramite(Container.DataItem, "RevisionAgua") %>' />
|
||||
<asp:LinkButton ID="BtnCancelarRevision" runat="server" Text="Cancelar"
|
||||
CommandName="CancelarRevision" CssClass="btn btn-sm red" CausesValidation="false"
|
||||
Visible='<%# MostrarAccionTramite(Container.DataItem, "RevisionAgua") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace SIG.Web.UserControl
|
||||
{
|
||||
private ModeloEtapaFraccionamiento _etapa;
|
||||
|
||||
#region Propiedades
|
||||
|
||||
private int CveEtapaActual
|
||||
{
|
||||
get { return (int?)ViewState["CveEtapaActual"] ?? 0; }
|
||||
@@ -37,6 +39,8 @@ namespace SIG.Web.UserControl
|
||||
|
||||
public event EventHandler Cambiado;
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object origen, EventArgs argumentos)
|
||||
{
|
||||
UcEstatus.ObtenerCondiciones = UcCondiciones.Capturar;
|
||||
@@ -353,20 +357,98 @@ namespace SIG.Web.UserControl
|
||||
return consulta.Data;
|
||||
}
|
||||
|
||||
protected bool MostrarAccionTramite(object fila, string accion)
|
||||
{
|
||||
var tramite = fila as TramiteSolicitudModel;
|
||||
if (tramite == null || CurrentUser == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (accion == "EnviarRevision")
|
||||
{
|
||||
return CurrentUser.EsDesarrollador &&
|
||||
tramite.PuedeCambiarEstatus &&
|
||||
tramite.EsEstatusCliente &&
|
||||
!tramite.EsEstatusOk;
|
||||
}
|
||||
|
||||
if (accion == "RevisionAgua")
|
||||
{
|
||||
return !CurrentUser.EsDesarrollador &&
|
||||
tramite.EsEstatusCliente &&
|
||||
tramite.EsEstatusOk;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void Tramites_Comando(object origen, GridViewCommandEventArgs argumentos)
|
||||
{
|
||||
if (_etapa == null || argumentos.CommandName != "Seguimiento")
|
||||
if (_etapa == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int cveSolicitud = ObtenerClaveFila(GvTramites, argumentos);
|
||||
if (cveSolicitud <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (argumentos.CommandName == "EnviarRevision")
|
||||
{
|
||||
if (CurrentUser == null || !CurrentUser.EsDesarrollador)
|
||||
{
|
||||
Avisar("El envío a revisión corresponde al desarrollador.");
|
||||
return;
|
||||
}
|
||||
|
||||
var resultado = AppServices.ServicioPortalCliente.EnviarRevision(
|
||||
cveSolicitud,
|
||||
_etapa.CveFraccionamiento,
|
||||
CurrentUser.CveUsuario,
|
||||
CurrentUser.NombreDominio);
|
||||
|
||||
if (!resultado.Success)
|
||||
{
|
||||
Avisar(resultado.UserMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
CargarTramites();
|
||||
CargarDocumentos();
|
||||
UpTramites.Update();
|
||||
UpDocumentos.Update();
|
||||
Alert("Trámite enviado a revisión.", TipoMensaje.ToastExito);
|
||||
return;
|
||||
}
|
||||
|
||||
if (argumentos.CommandName != "Seguimiento" &&
|
||||
argumentos.CommandName != "Autorizar" &&
|
||||
argumentos.CommandName != "CancelarRevision")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var contexto = ConsultarSolicitud(cveSolicitud);
|
||||
if (contexto == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((argumentos.CommandName == "Autorizar" ||
|
||||
argumentos.CommandName == "CancelarRevision") &&
|
||||
(CurrentUser == null || CurrentUser.EsDesarrollador ||
|
||||
!contexto.Solicitud.EsEstatusCliente ||
|
||||
!contexto.Solicitud.EsEstatusOk))
|
||||
{
|
||||
Avisar("El trámite ya no se encuentra pendiente de revisión por Agua de Hermosillo.");
|
||||
CargarTramites();
|
||||
UpTramites.Update();
|
||||
return;
|
||||
}
|
||||
|
||||
CveSolicitudActual = cveSolicitud;
|
||||
LitSolicitud.Text = contexto.Solicitud.Folio + " / " + contexto.Solicitud.TipoTramite;
|
||||
UcEstatus.Cargar(contexto);
|
||||
|
||||
@@ -417,7 +417,8 @@
|
||||
Text="Relacionar con"/>
|
||||
<asp:DropDownList ID="DocumentoCuestionario" runat="server" CssClass="form-control select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:FileUpload ID="ArchivosVisita" runat="server" AllowMultiple="true" />
|
||||
<input id="ArchivosVisita" runat="server" type="hidden"
|
||||
class="ADSdropzoneLocal" />
|
||||
<asp:LinkButton ID="CargarDocumentos"
|
||||
runat="server"
|
||||
CssClass="btn btn-primary"
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace SIG.Web.UserControl
|
||||
{
|
||||
public event EventHandler Cambiado;
|
||||
|
||||
#region Propiedades
|
||||
|
||||
public bool ComoPanel
|
||||
{
|
||||
get { return (bool?)ViewState["ComoPanel"] ?? true; }
|
||||
@@ -68,9 +70,17 @@ namespace SIG.Web.UserControl
|
||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnLoad(EventArgs argumentos)
|
||||
{
|
||||
base.OnLoad(argumentos);
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
ArchivosVisita,
|
||||
null,
|
||||
null,
|
||||
20,
|
||||
"Arrastra aquí documentos o fotografías o haz clic para seleccionarlos.");
|
||||
ScriptManager.GetCurrent(Page).RegisterPostBackControl(CargarDocumentos);
|
||||
if (Page.IsPostBack && CuestionarioActual != null)
|
||||
{
|
||||
@@ -728,7 +738,8 @@ namespace SIG.Web.UserControl
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (CveVisitaActual <= 0 || VisitaActual == null || !ArchivosVisita.HasFiles)
|
||||
List<HttpPostedFile> archivosVisita = CargaArchivoWebHelper.ObtenerArchivos(Page, ArchivosVisita);
|
||||
if (CveVisitaActual <= 0 || VisitaActual == null || archivosVisita.Count == 0)
|
||||
{
|
||||
Alert(CveVisitaActual <= 0 ? "Guarde primero la visita." : "Seleccione al menos un archivo.", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
@@ -737,7 +748,7 @@ namespace SIG.Web.UserControl
|
||||
int? cuestionario = int.TryParse(DocumentoCuestionario.SelectedValue, out clave) ? (int?)clave : null;
|
||||
int guardados = 0;
|
||||
var errores = new List<string>();
|
||||
foreach (HttpPostedFile archivo in ArchivosVisita.PostedFiles)
|
||||
foreach (HttpPostedFile archivo in archivosVisita)
|
||||
{
|
||||
var resultado = AppServices.ServicioVisitas.CargarDocumento(
|
||||
CveVisitaActual, cuestionario, archivo.FileName, archivo.ContentType,
|
||||
|
||||
@@ -19,8 +19,19 @@
|
||||
OnRowCommand="ComandoDocumento"
|
||||
EmptyDataText="No hay documentos para mostrar.">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Documento" />
|
||||
<asp:TemplateField HeaderStyle-CssClass="sig-grid-columna-grupo"
|
||||
ItemStyle-CssClass="sig-grid-columna-grupo">
|
||||
<ItemTemplate>
|
||||
<button type="button" class="sig-grid-alternar-grupo" aria-expanded="true">
|
||||
<span class="sig-grid-grupo-titulo"><%#: Eval("TituloGrupo") %></span>
|
||||
<i class="fa fa-chevron-up sig-grid-icono-agrupacion" aria-hidden="true"></i>
|
||||
</button>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Documento"
|
||||
ItemStyle-CssClass="sig-grid-columna-dato-principal" />
|
||||
<asp:BoundField DataField="Responsable" HeaderText="Responsable" />
|
||||
<asp:CheckBoxField DataField="EsRequerido" HeaderText="Requerido" />
|
||||
<asp:BoundField DataField="EstadoDocumento" HeaderText="Estado" />
|
||||
|
||||
<asp:TemplateField HeaderText="Aprobado">
|
||||
@@ -39,7 +50,9 @@
|
||||
|
||||
<asp:BoundField DataField="Nota" HeaderText="Nota / motivo" />
|
||||
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<asp:TemplateField HeaderText="Acciones"
|
||||
HeaderStyle-CssClass="sig-columna-acciones"
|
||||
ItemStyle-CssClass="sig-columna-acciones">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Text="Descargar" CssClass="btn btn-sm default"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "Descargar") %>'
|
||||
@@ -49,9 +62,12 @@
|
||||
CommandName="AdministrarGis" CausesValidation="false"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "AdministrarGis") %>' />
|
||||
|
||||
<asp:LinkButton runat="server" Text="Cargar / renovar" CommandName="Cargar"
|
||||
CssClass="btn btn-sm blue" CausesValidation="false"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "Cargar") %>' />
|
||||
<asp:LinkButton runat="server" CommandName="Cargar"
|
||||
CssClass="btn btn-sm blue sig-accion-icono" CausesValidation="false"
|
||||
ToolTip="Cargar / renovar" aria-label="Cargar / renovar"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "Cargar") %>'>
|
||||
<i class="fa fa-upload" aria-hidden="true"></i>
|
||||
</asp:LinkButton>
|
||||
|
||||
<asp:LinkButton runat="server" Text="Aprobar" CommandName="Aprobar"
|
||||
CssClass="btn btn-sm green" CausesValidation="false"
|
||||
@@ -61,6 +77,27 @@
|
||||
CssClass="btn btn-sm red" CausesValidation="false"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "CancelarDocumento") %>' />
|
||||
|
||||
<asp:LinkButton runat="server" CommandName="QuitarRequerido"
|
||||
CssClass="btn btn-circle btn-sm red sig-accion-icono" CausesValidation="false"
|
||||
ToolTip="Quitar requerido" aria-label="Quitar requerido"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "QuitarRequerido") %>'>
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
</asp:LinkButton>
|
||||
|
||||
<asp:LinkButton runat="server" CommandName="ActivarRequerido"
|
||||
CssClass="btn btn-circle btn-sm green sig-accion-icono" CausesValidation="false"
|
||||
ToolTip="Marcar como requerido" aria-label="Marcar como requerido"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "ActivarRequerido") %>'>
|
||||
<i class="fa fa-check" aria-hidden="true"></i>
|
||||
</asp:LinkButton>
|
||||
|
||||
<asp:LinkButton runat="server" CommandName="EditarVencimiento"
|
||||
CssClass="btn btn-circle btn-sm default sig-accion-icono" CausesValidation="false"
|
||||
ToolTip="Editar fecha de vencimiento" aria-label="Editar fecha de vencimiento"
|
||||
Visible='<%# MostrarAccion(Container.DataItem, "EditarVencimiento") %>'>
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
||||
</asp:LinkButton>
|
||||
|
||||
<asp:LinkButton runat="server" Text="Eliminar" CommandName="Eliminar"
|
||||
CssClass="btn btn-sm default" CausesValidation="false"
|
||||
OnClientClick="return confirm('¿Eliminar la versión vigente? Los trámites que la requieren quedarán pendientes.');"
|
||||
@@ -105,8 +142,9 @@
|
||||
<asp:Panel ID="CamposArchivo" runat="server">
|
||||
<p><asp:Literal ID="ReglasArchivo" runat="server" Mode="Encode" /></p>
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="Archivo" Text="Archivo" />
|
||||
<asp:FileUpload ID="Archivo" runat="server" CssClass="form-control" />
|
||||
<label>Archivo</label>
|
||||
<input id="Archivo" runat="server" type="hidden"
|
||||
class="ADSdropzoneLocal" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="FechaDocumento" Text="Fecha del documento" />
|
||||
@@ -118,6 +156,16 @@
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="CamposVencimiento" runat="server">
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="FechaVencimientoEdicion"
|
||||
Text="Fecha de vencimiento" />
|
||||
<asp:TextBox ID="FechaVencimientoEdicion" runat="server"
|
||||
TextMode="Date" CssClass="form-control" />
|
||||
<p class="help-block">Puede dejarla vacía. Si el documento requiere vigencia, deberá capturarla antes de aprobarlo.</p>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="CamposNota" runat="server">
|
||||
<asp:Label runat="server" AssociatedControlID="Nota" Text="Nota / motivo" />
|
||||
<asp:TextBox ID="Nota" runat="server" TextMode="MultiLine" Rows="3" CssClass="form-control" />
|
||||
@@ -130,6 +178,8 @@
|
||||
CausesValidation="false" OnClick="GuardarCarga" />
|
||||
<asp:Button ID="GuardarSolicitud" runat="server" Text="Solicitar" CssClass="btn blue"
|
||||
CausesValidation="false" OnClick="GuardarRequerimiento" />
|
||||
<asp:Button ID="GuardarVencimiento" runat="server" Text="Guardar vencimiento" CssClass="btn blue"
|
||||
CausesValidation="false" OnClick="GuardarFechaVencimiento" />
|
||||
<asp:Button ID="GuardarCancelacion" runat="server" Text="Cancelar documento" CssClass="btn red"
|
||||
CausesValidation="false" OnClick="CancelarDocumento" />
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using SIG.Web.AppCode.Configuration;
|
||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||
@@ -18,6 +17,8 @@ namespace SIG.Web.UserControl
|
||||
public event EventHandler Cambiado;
|
||||
public event EventHandler AdministrarGisSolicitado;
|
||||
|
||||
#region Propiedades
|
||||
|
||||
public int CveEtapaGis
|
||||
{
|
||||
get { return DocumentoSeleccionado == null ? 0 : DocumentoSeleccionado.CveFraccionamientoEtapa; }
|
||||
@@ -67,6 +68,8 @@ namespace SIG.Web.UserControl
|
||||
get { return DocumentosActuales.Count; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnInit(EventArgs argumentos)
|
||||
{
|
||||
base.OnInit(argumentos);
|
||||
@@ -213,6 +216,15 @@ namespace SIG.Web.UserControl
|
||||
return;
|
||||
}
|
||||
|
||||
for (int indiceCelda = 0; indiceCelda < argumentos.Row.Cells.Count; indiceCelda++)
|
||||
{
|
||||
string claseCelda = indiceCelda == 0
|
||||
? "sig-grid-columna-grupo"
|
||||
: "sig-grid-columna-normal";
|
||||
argumentos.Row.Cells[indiceCelda].CssClass =
|
||||
(argumentos.Row.Cells[indiceCelda].CssClass + " " + claseCelda).Trim();
|
||||
}
|
||||
|
||||
argumentos.Row.Attributes["data-sig-level"] =
|
||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
@@ -223,44 +235,17 @@ namespace SIG.Web.UserControl
|
||||
|
||||
if (!fila.EsGrupo)
|
||||
{
|
||||
argumentos.Row.CssClass =
|
||||
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||
return;
|
||||
}
|
||||
|
||||
int columnasVisibles = Documentos.Columns
|
||||
.Cast<DataControlField>()
|
||||
.Count(columna => columna.Visible);
|
||||
|
||||
argumentos.Row.Cells.Clear();
|
||||
argumentos.Row.CssClass = "sig-grid-grupo";
|
||||
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
||||
argumentos.Row.Attributes["data-sig-group-id"] = fila.GroupId;
|
||||
argumentos.Row.Attributes["data-sig-expanded-default"] =
|
||||
fila.AbiertoInicialmente ? "true" : "false";
|
||||
|
||||
var celda = new TableCell
|
||||
{
|
||||
ColumnSpan = columnasVisibles
|
||||
};
|
||||
|
||||
var boton = new HtmlGenericControl("button");
|
||||
boton.Attributes["type"] = "button";
|
||||
boton.Attributes["class"] = "sig-grid-alternar-grupo";
|
||||
boton.Attributes["aria-expanded"] = fila.AbiertoInicialmente ? "true" : "false";
|
||||
|
||||
var titulo = new HtmlGenericControl("span");
|
||||
titulo.Attributes["class"] = "sig-grid-grupo-titulo";
|
||||
titulo.InnerText = fila.TituloGrupo;
|
||||
|
||||
var flecha = new HtmlGenericControl("i");
|
||||
flecha.Attributes["class"] = "fa " +
|
||||
(fila.AbiertoInicialmente ? "fa-chevron-up" : "fa-chevron-down");
|
||||
flecha.Attributes["aria-hidden"] = "true";
|
||||
|
||||
boton.Controls.Add(titulo);
|
||||
boton.Controls.Add(flecha);
|
||||
celda.Controls.Add(boton);
|
||||
argumentos.Row.Cells.Add(celda);
|
||||
}
|
||||
|
||||
public sealed class FilaDocumentoEtapa
|
||||
@@ -303,6 +288,11 @@ namespace SIG.Web.UserControl
|
||||
get { return Documento == null ? string.Empty : Documento.EstadoDocumento; }
|
||||
}
|
||||
|
||||
public bool EsRequerido
|
||||
{
|
||||
get { return Documento != null && Documento.EsRequerido; }
|
||||
}
|
||||
|
||||
public string Nota
|
||||
{
|
||||
get { return Documento == null ? string.Empty : Documento.Nota; }
|
||||
@@ -401,6 +391,12 @@ namespace SIG.Web.UserControl
|
||||
case "Aprobar":
|
||||
case "CancelarDocumento":
|
||||
return documento.PuedeRevisar;
|
||||
case "QuitarRequerido":
|
||||
return Usuario != null && !Usuario.EsDesarrollador && documento.EsRequerido;
|
||||
case "ActivarRequerido":
|
||||
return Usuario != null && !Usuario.EsDesarrollador && !documento.EsRequerido;
|
||||
case "EditarVencimiento":
|
||||
return Usuario != null && !Usuario.EsDesarrollador && documento.TieneArchivo;
|
||||
case "Eliminar":
|
||||
return documento.TieneArchivo && documento.PuedeActualizarArchivo;
|
||||
default:
|
||||
@@ -455,6 +451,18 @@ namespace SIG.Web.UserControl
|
||||
return;
|
||||
}
|
||||
|
||||
if (argumentos.CommandName == "QuitarRequerido")
|
||||
{
|
||||
CambiarRequerido(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (argumentos.CommandName == "ActivarRequerido")
|
||||
{
|
||||
CambiarRequerido(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (argumentos.CommandName == "AdministrarGis")
|
||||
{
|
||||
if (AdministrarGisSolicitado != null)
|
||||
@@ -479,11 +487,31 @@ namespace SIG.Web.UserControl
|
||||
ConfigurarFormulario("Cargar", DocumentoSeleccionado.TipoDocumento);
|
||||
ReglasArchivo.Text = "Permitidos: " + contexto.Data.ExtensionesPermitidas +
|
||||
(contexto.Data.TamanoMaximoMb.HasValue ? " · Máximo " + contexto.Data.TamanoMaximoMb + " MB" : "");
|
||||
FechaDocumento.Text = FormatearFecha(contexto.Data.FechaDocumentoAnterior);
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
Archivo,
|
||||
contexto.Data.ExtensionesPermitidas,
|
||||
contexto.Data.TamanoMaximoMb,
|
||||
1);
|
||||
FechaDocumento.Text = FormatearFecha(DateTime.Today);
|
||||
FechaDocumento.Attributes["max"] = FormatearFecha(DateTime.Today);
|
||||
FechaVencimiento.Text = FormatearFecha(contexto.Data.FechaVencimientoAnterior);
|
||||
Nota.Text = contexto.Data.ComentarioClienteAnterior ?? string.Empty;
|
||||
MostrarFormulario();
|
||||
}
|
||||
else if (argumentos.CommandName == "EditarVencimiento")
|
||||
{
|
||||
if (Usuario == null || Usuario.EsDesarrollador)
|
||||
{
|
||||
Avisar("La fecha de vencimiento sólo puede ser editada por Agua de Hermosillo.");
|
||||
return;
|
||||
}
|
||||
|
||||
ConfigurarFormulario(
|
||||
"EditarVencimiento",
|
||||
"Fecha de vencimiento: " + DocumentoSeleccionado.TipoDocumento);
|
||||
FechaVencimientoEdicion.Text = FormatearFecha(DocumentoSeleccionado.FechaVencimiento);
|
||||
MostrarFormulario();
|
||||
}
|
||||
else if (argumentos.CommandName == "Aprobar")
|
||||
{
|
||||
Revisar(true);
|
||||
@@ -518,7 +546,8 @@ namespace SIG.Web.UserControl
|
||||
{
|
||||
DateTime? fecha;
|
||||
DateTime? vencimiento;
|
||||
if (DocumentoSeleccionado == null || !Archivo.HasFile ||
|
||||
var archivo = CargaArchivoWebHelper.ObtenerArchivo(Page, Archivo);
|
||||
if (DocumentoSeleccionado == null || archivo == null ||
|
||||
!LeerFecha(FechaDocumento.Text, out fecha) || !LeerFecha(FechaVencimiento.Text, out vencimiento))
|
||||
{
|
||||
MostrarFormulario();
|
||||
@@ -527,8 +556,8 @@ namespace SIG.Web.UserControl
|
||||
}
|
||||
var resultado = AppServices.TramiteDocumentoService.Upload(
|
||||
CveFraccionamientoActual, 0, DocumentoSeleccionado.CveTipoDocumento,
|
||||
Archivo.FileName, Archivo.PostedFile.ContentType, Archivo.PostedFile.InputStream,
|
||||
Archivo.PostedFile.ContentLength, Nota.Text, Usuario.CveUsuario, Usuario.NombreDominio,
|
||||
archivo.FileName, archivo.ContentType, archivo.InputStream,
|
||||
archivo.ContentLength, Nota.Text, Usuario.CveUsuario, Usuario.NombreDominio,
|
||||
fecha, vencimiento, DocumentoSeleccionado.CveFraccionamientoEtapa);
|
||||
if (!resultado.Success)
|
||||
{
|
||||
@@ -539,6 +568,39 @@ namespace SIG.Web.UserControl
|
||||
Terminar("Documento guardado; pendiente de revisión.");
|
||||
}
|
||||
|
||||
protected void GuardarFechaVencimiento(object origen, EventArgs argumentos)
|
||||
{
|
||||
if (DocumentoSeleccionado == null || Usuario == null || Usuario.EsDesarrollador)
|
||||
{
|
||||
Avisar("La fecha de vencimiento sólo puede ser editada por Agua de Hermosillo.");
|
||||
return;
|
||||
}
|
||||
|
||||
DateTime? fechaVencimiento;
|
||||
if (!LeerFecha(FechaVencimientoEdicion.Text, out fechaVencimiento))
|
||||
{
|
||||
MostrarFormulario();
|
||||
Avisar("Capture una fecha de vencimiento válida.");
|
||||
return;
|
||||
}
|
||||
|
||||
var resultado = AppServices.TramiteDocumentoService.ActualizarFechaVencimiento(
|
||||
CveFraccionamientoActual,
|
||||
DocumentoSeleccionado.CveDocumentoSolicitud,
|
||||
fechaVencimiento,
|
||||
Usuario.CveUsuario,
|
||||
Usuario.NombreDominio);
|
||||
|
||||
if (!resultado.Success)
|
||||
{
|
||||
MostrarFormulario();
|
||||
Avisar(resultado.UserMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
Terminar("Fecha de vencimiento actualizada.");
|
||||
}
|
||||
|
||||
protected void CancelarDocumento(object origen, EventArgs argumentos)
|
||||
{
|
||||
Revisar(false);
|
||||
@@ -688,17 +750,70 @@ namespace SIG.Web.UserControl
|
||||
Terminar("Requerimiento guardado.");
|
||||
}
|
||||
|
||||
private void CambiarRequerido(bool esRequerido)
|
||||
{
|
||||
if (DocumentoSeleccionado == null || Usuario == null || Usuario.EsDesarrollador)
|
||||
{
|
||||
Avisar("El cambio de requerido corresponde a Agua de Hermosillo.");
|
||||
return;
|
||||
}
|
||||
|
||||
var configuraciones = AppServices.TramiteDocumentoService.ListarConfiguracionSolicitud(
|
||||
CveFraccionamientoActual,
|
||||
DocumentoSeleccionado.CveSolicitud,
|
||||
Usuario.CveUsuario,
|
||||
Usuario.NombreDominio,
|
||||
DocumentoSeleccionado.CveFraccionamientoEtapa);
|
||||
|
||||
if (!configuraciones.Success)
|
||||
{
|
||||
Avisar(configuraciones.UserMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
SolicitudDocumentoConfiguracionModel configuracion =
|
||||
(configuraciones.Data ?? new List<SolicitudDocumentoConfiguracionModel>())
|
||||
.FirstOrDefault(documento =>
|
||||
documento.CveTipoDocumento == DocumentoSeleccionado.CveTipoDocumento);
|
||||
|
||||
if (configuracion == null)
|
||||
{
|
||||
Avisar("El requisito del documento ya no está disponible.");
|
||||
return;
|
||||
}
|
||||
|
||||
configuracion.EsRequerido = esRequerido;
|
||||
|
||||
var resultado = AppServices.TramiteDocumentoService.GuardarConfiguracionSolicitud(
|
||||
configuracion,
|
||||
Usuario.CveUsuario,
|
||||
Usuario.NombreDominio);
|
||||
|
||||
if (!resultado.Success)
|
||||
{
|
||||
Avisar(resultado.UserMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
Terminar(esRequerido
|
||||
? "Documento marcado como requerido."
|
||||
: "Documento marcado como no requerido.");
|
||||
}
|
||||
|
||||
private void ConfigurarFormulario(string accion, string titulo)
|
||||
{
|
||||
bool cargar = accion == "Cargar";
|
||||
bool solicitar = accion == "Solicitar";
|
||||
bool cancelar = accion == "CancelarDocumento";
|
||||
bool editarVencimiento = accion == "EditarVencimiento";
|
||||
TituloFormulario.Text = titulo;
|
||||
CamposArchivo.Visible = cargar;
|
||||
CamposSolicitud.Visible = solicitar;
|
||||
CamposVencimiento.Visible = editarVencimiento;
|
||||
CamposNota.Visible = cargar || cancelar;
|
||||
GuardarArchivo.Visible = cargar;
|
||||
GuardarSolicitud.Visible = solicitar;
|
||||
GuardarVencimiento.Visible = editarVencimiento;
|
||||
GuardarCancelacion.Visible = cancelar;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
<asp:Literal ID="DatosArchivo" runat="server" Mode="Encode" />
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="Archivo" Text="Archivo" />
|
||||
<asp:FileUpload ID="Archivo" runat="server" CssClass="form-control" />
|
||||
<label>Archivo</label>
|
||||
<input id="Archivo" runat="server" type="hidden" class="ADSdropzoneLocal" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<asp:Label runat="server" AssociatedControlID="FechaDocumento" Text="Fecha del documento" />
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace SIG.Web.UserControl
|
||||
public event EventHandler Cambiado;
|
||||
public event EventHandler MostrarSolicitado;
|
||||
|
||||
#region Propiedades
|
||||
|
||||
private int CveSolicitudActual
|
||||
{
|
||||
get { return (int?)ViewState["CveSolicitudActual"] ?? 0; }
|
||||
@@ -44,6 +46,8 @@ namespace SIG.Web.UserControl
|
||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void OnInit(EventArgs argumentos)
|
||||
{
|
||||
base.OnInit(argumentos);
|
||||
@@ -192,10 +196,15 @@ namespace SIG.Web.UserControl
|
||||
TramiteDocumentoUploadContextModel contexto = resultado.Data;
|
||||
DatosArchivo.Text = "Permitidos: " + contexto.ExtensionesPermitidas +
|
||||
(contexto.TamanoMaximoMb.HasValue ? " · Máximo " + contexto.TamanoMaximoMb + " MB" : "");
|
||||
FechaDocumento.Text = contexto.FechaDocumentoAnterior.HasValue
|
||||
? contexto.FechaDocumentoAnterior.Value.ToString("yyyy-MM-dd") : "";
|
||||
CargaArchivoWebHelper.Configurar(
|
||||
Archivo,
|
||||
contexto.ExtensionesPermitidas,
|
||||
contexto.TamanoMaximoMb,
|
||||
1);
|
||||
FechaDocumento.Text = DateTime.Today.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
|
||||
FechaDocumento.Attributes["max"] = DateTime.Today.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
|
||||
VencimientoDocumento.Text = contexto.FechaVencimientoAnterior.HasValue
|
||||
? contexto.FechaVencimientoAnterior.Value.ToString("yyyy-MM-dd") : "";
|
||||
? contexto.FechaVencimientoAnterior.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) : "";
|
||||
ComentarioDocumento.Text = contexto.ComentarioClienteAnterior ?? "";
|
||||
return true;
|
||||
}
|
||||
@@ -209,7 +218,8 @@ namespace SIG.Web.UserControl
|
||||
{
|
||||
DateTime? fecha;
|
||||
DateTime? vencimiento;
|
||||
if (!Archivo.HasFile || string.IsNullOrEmpty(TipoDocumento.SelectedValue))
|
||||
var archivo = CargaArchivoWebHelper.ObtenerArchivo(Page, Archivo);
|
||||
if (archivo == null || string.IsNullOrEmpty(TipoDocumento.SelectedValue))
|
||||
{
|
||||
MostrarDocumento();
|
||||
Avisar("Seleccione un documento y un archivo.");
|
||||
@@ -227,8 +237,8 @@ namespace SIG.Web.UserControl
|
||||
AppServices.TramiteDocumentoService.Upload(
|
||||
CveFraccionamientoActual, CveSolicitudActual,
|
||||
Convert.ToInt32(TipoDocumento.SelectedValue, CultureInfo.InvariantCulture),
|
||||
Archivo.FileName, Archivo.PostedFile.ContentType,
|
||||
Archivo.PostedFile.InputStream, Archivo.PostedFile.ContentLength,
|
||||
archivo.FileName, archivo.ContentType,
|
||||
archivo.InputStream, archivo.ContentLength,
|
||||
ComentarioDocumento.Text, Usuario.CveUsuario, Usuario.NombreDominio,
|
||||
fecha, vencimiento);
|
||||
if (!resultado.Success)
|
||||
|
||||
Reference in New Issue
Block a user