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 IBitacoraService BitacoraService { get; private set; }
|
||||||
public static IPasswordHasher PasswordHasher { get; private set; }
|
public static IPasswordHasher PasswordHasher { get; private set; }
|
||||||
public static IServicioDesarrolladores ServicioDesarrolladores { 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 ICaptchaService CaptchaService { get; private set; }
|
||||||
public static IUserRepository UserRepository { get; private set; }
|
public static IUserRepository UserRepository { get; private set; }
|
||||||
private static IUserAdministrationRepository UserAdministrationRepository { get; set; }
|
private static IUserAdministrationRepository UserAdministrationRepository { get; set; }
|
||||||
@@ -212,6 +213,13 @@ namespace SIG.Web.AppCode.Configuration
|
|||||||
PermissionService = new PermissionService(
|
PermissionService = new PermissionService(
|
||||||
permissionRepository);
|
permissionRepository);
|
||||||
ServicioConvenios = new ServicioConvenios(new RepositorioConvenios(DbExecutor), UserContext);
|
ServicioConvenios = new ServicioConvenios(new RepositorioConvenios(DbExecutor), UserContext);
|
||||||
|
ServicioPortalCliente = new ServicioPortalCliente(
|
||||||
|
new RepositorioPortalCliente(DbExecutor),
|
||||||
|
ServicioFraccionamiento,
|
||||||
|
TramiteDocumentoService,
|
||||||
|
TramiteSolicitudService,
|
||||||
|
new AlmacenComprobantesConvenio(),
|
||||||
|
UserContext);
|
||||||
ServicioPagosConvenios = new ServicioPagosConvenios(
|
ServicioPagosConvenios = new ServicioPagosConvenios(
|
||||||
new RepositorioPagosConvenios(DbExecutor),
|
new RepositorioPagosConvenios(DbExecutor),
|
||||||
tramiteSolicitudRepository,
|
tramiteSolicitudRepository,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Web.Optimization;
|
using System.Web.Optimization;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
|
||||||
namespace SIG.Web.AppCode.Configuration
|
namespace SIG.Web.AppCode.Configuration
|
||||||
@@ -127,6 +127,7 @@ namespace SIG.Web.AppCode.Configuration
|
|||||||
"~/Styles/PanelLateral.css",
|
"~/Styles/PanelLateral.css",
|
||||||
"~/Styles/DetalleEtapa.css",
|
"~/Styles/DetalleEtapa.css",
|
||||||
"~/Styles/DocumentosEtapa.css",
|
"~/Styles/DocumentosEtapa.css",
|
||||||
|
"~/Styles/Archivos.css",
|
||||||
"~/Styles/Estilos.css",
|
"~/Styles/Estilos.css",
|
||||||
"~/Styles/filtrosig.css",
|
"~/Styles/filtrosig.css",
|
||||||
"~/Styles/scrollsig.css",
|
"~/Styles/scrollsig.css",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SIG.Web.AppCode.Models.Common;
|
using SIG.Web.AppCode.Models.Common;
|
||||||
using SIG.Web.AppCode.Models.Documentos;
|
using SIG.Web.AppCode.Models.Documentos;
|
||||||
@@ -78,6 +78,13 @@ namespace SIG.Web.AppCode.Contracts.Documentos
|
|||||||
bool actualizarFechas = false,
|
bool actualizarFechas = false,
|
||||||
int? cveFraccionamientoEtapa = null);
|
int? cveFraccionamientoEtapa = null);
|
||||||
|
|
||||||
|
DbResult<TramiteDocumentoVencimientoResultModel> ActualizarFechaVencimiento(
|
||||||
|
int cveFraccionamiento,
|
||||||
|
int cveDocumentoSolicitud,
|
||||||
|
DateTime? fechaVencimiento,
|
||||||
|
int cveUsuarioEjecuta,
|
||||||
|
string nombreDominio);
|
||||||
|
|
||||||
DbResult<TramiteDocumentoReviewResultModel> Review(
|
DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||||
int developmentId,
|
int developmentId,
|
||||||
int documentRequestId,
|
int documentRequestId,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using SIG.Web.AppCode.Models.Common;
|
using SIG.Web.AppCode.Models.Common;
|
||||||
@@ -78,6 +78,13 @@ namespace SIG.Web.AppCode.Contracts.Documentos
|
|||||||
int cveUsuarioEjecuta,
|
int cveUsuarioEjecuta,
|
||||||
string nombreDominio);
|
string nombreDominio);
|
||||||
|
|
||||||
|
DbResult<TramiteDocumentoVencimientoResultModel> ActualizarFechaVencimiento(
|
||||||
|
int cveFraccionamiento,
|
||||||
|
int cveDocumentoSolicitud,
|
||||||
|
DateTime? fechaVencimiento,
|
||||||
|
int cveUsuarioEjecuta,
|
||||||
|
string nombreDominio);
|
||||||
|
|
||||||
DbResult<TramiteDocumentoReviewResultModel> Review(
|
DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||||
int developmentId,
|
int developmentId,
|
||||||
int documentRequestId,
|
int documentRequestId,
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ namespace SIG.Web.AppCode.Contracts.Tramites
|
|||||||
DbResult<TramiteSolicitudStatusChangeModel> CambiarEstatus(
|
DbResult<TramiteSolicitudStatusChangeModel> CambiarEstatus(
|
||||||
ModeloCambioEstatusTramite cambioEstatus,
|
ModeloCambioEstatusTramite cambioEstatus,
|
||||||
int cveUsuarioEjecuta,
|
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;
|
using System.IO;
|
||||||
|
|
||||||
namespace SIG.Web.AppCode.Models.Documentos
|
namespace SIG.Web.AppCode.Models.Documentos
|
||||||
@@ -168,6 +168,24 @@ namespace SIG.Web.AppCode.Models.Documentos
|
|||||||
public DateTime? FechaRevisionAnterior { get; set; }
|
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 sealed class TramiteDocumentoReviewResultModel
|
||||||
{
|
{
|
||||||
public int CveDocumentoSolicitud { get; set; }
|
public int CveDocumentoSolicitud { get; set; }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SIG.Web.AppCode.Models.Documentos;
|
using SIG.Web.AppCode.Models.Documentos;
|
||||||
|
|
||||||
@@ -44,6 +44,7 @@ namespace SIG.Web.AppCode.Models.Tramites
|
|||||||
public int CveEstatusSolicitud { get; set; }
|
public int CveEstatusSolicitud { get; set; }
|
||||||
public string EstatusSolicitud { get; set; }
|
public string EstatusSolicitud { get; set; }
|
||||||
public bool EsEstatusCliente { get; set; }
|
public bool EsEstatusCliente { get; set; }
|
||||||
|
public bool EsEstatusOk { get; set; }
|
||||||
public DateTime? FechaInicio { get; set; }
|
public DateTime? FechaInicio { get; set; }
|
||||||
public DateTime? FechaAutorizacion { get; set; }
|
public DateTime? FechaAutorizacion { get; set; }
|
||||||
public bool PuedeCambiarEstatus { get; set; }
|
public bool PuedeCambiarEstatus { get; set; }
|
||||||
@@ -59,6 +60,7 @@ namespace SIG.Web.AppCode.Models.Tramites
|
|||||||
public int Orden { get; set; }
|
public int Orden { get; set; }
|
||||||
public bool EsFinal { get; set; }
|
public bool EsFinal { get; set; }
|
||||||
public bool EsCliente { get; set; }
|
public bool EsCliente { get; set; }
|
||||||
|
public bool EsOK { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class TramiteSolicitudStatusChangeModel
|
public sealed class TramiteSolicitudStatusChangeModel
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using SIG.Web.AppCode.Contracts.Database;
|
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(
|
public DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||||
int developmentId,
|
int developmentId,
|
||||||
int documentRequestId,
|
int documentRequestId,
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ namespace SIG.Web.AppCode.Services.Clientes
|
|||||||
PuedeEnviarRevision =
|
PuedeEnviarRevision =
|
||||||
solicitud.PuedeCambiarEstatus &&
|
solicitud.PuedeCambiarEstatus &&
|
||||||
solicitud.EsEstatusCliente &&
|
solicitud.EsEstatusCliente &&
|
||||||
|
!solicitud.EsEstatusOk &&
|
||||||
documentosPendientes == 0 &&
|
documentosPendientes == 0 &&
|
||||||
pagosPendientes == 0
|
pagosPendientes == 0
|
||||||
};
|
};
|
||||||
@@ -303,6 +304,12 @@ namespace SIG.Web.AppCode.Services.Clientes
|
|||||||
"Existen recibos pendientes de pago.");
|
"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 =
|
DbResult<ModeloContextoCambioEstatus> contexto =
|
||||||
_servicioTramites.ObtenerContextoCambioEstatus(
|
_servicioTramites.ObtenerContextoCambioEstatus(
|
||||||
cveSolicitud,
|
cveSolicitud,
|
||||||
@@ -317,12 +324,29 @@ namespace SIG.Web.AppCode.Services.Clientes
|
|||||||
contexto.Exception);
|
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)
|
if (!contexto.Data.CveSiguienteEstatus.HasValue)
|
||||||
{
|
{
|
||||||
return Fallo<TramiteSolicitudStatusChangeModel>(
|
return Fallo<TramiteSolicitudStatusChangeModel>(
|
||||||
"El trámite no tiene un siguiente estatus disponible para enviar a revisión.");
|
"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
|
var cambio = new ModeloCambioEstatusTramite
|
||||||
{
|
{
|
||||||
CveSolicitud = cveSolicitud,
|
CveSolicitud = cveSolicitud,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SIG.Web.AppCode.Models.Bitacora;
|
using SIG.Web.AppCode.Models.Bitacora;
|
||||||
using SIG.Web.AppCode.Models.Documentos;
|
using SIG.Web.AppCode.Models.Documentos;
|
||||||
@@ -116,6 +116,30 @@ namespace SIG.Web.AppCode.Services.Documentos
|
|||||||
return auditEvent;
|
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(
|
public static ModeloRegistroBitacora Delete(
|
||||||
TramiteDocumentoDeleteResultModel change)
|
TramiteDocumentoDeleteResultModel change)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -406,11 +406,17 @@ namespace SIG.Web.AppCode.Services.Documentos
|
|||||||
return Fail<TramiteDocumentoSaveResultModel>(validation);
|
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)
|
fechaVencimiento.Value.Date < fechaDocumento.Value.Date)
|
||||||
{
|
{
|
||||||
return Fail<TramiteDocumentoSaveResultModel>("El vencimiento no puede ser anterior a la fecha del documento.");
|
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(
|
public DbResult<TramiteDocumentoReviewResultModel> Review(
|
||||||
int developmentId,
|
int developmentId,
|
||||||
int documentRequestId,
|
int documentRequestId,
|
||||||
@@ -607,6 +706,36 @@ namespace SIG.Web.AppCode.Services.Documentos
|
|||||||
"Capture la nota o motivo del rechazo.");
|
"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())
|
using (var transaction = new TransactionLogic())
|
||||||
{
|
{
|
||||||
DbResult<TramiteDocumentoReviewResultModel> result =
|
DbResult<TramiteDocumentoReviewResultModel> result =
|
||||||
|
|||||||
@@ -650,7 +650,8 @@ namespace SIG.Web.AppCode.Services.Tramites
|
|||||||
public DbResult<TramiteSolicitudStatusChangeModel> CambiarEstatus(
|
public DbResult<TramiteSolicitudStatusChangeModel> CambiarEstatus(
|
||||||
ModeloCambioEstatusTramite cambioEstatus,
|
ModeloCambioEstatusTramite cambioEstatus,
|
||||||
int cveUsuarioEjecuta,
|
int cveUsuarioEjecuta,
|
||||||
string nombreDominio)
|
string nombreDominio,
|
||||||
|
bool validarPagosRequeridos = true)
|
||||||
{
|
{
|
||||||
UserSessionModel usuario = _contextoUsuario.GetCurrentUser();
|
UserSessionModel usuario = _contextoUsuario.GetCurrentUser();
|
||||||
if (usuario == null || usuario.CveUsuario != cveUsuarioEjecuta)
|
if (usuario == null || usuario.CveUsuario != cveUsuarioEjecuta)
|
||||||
@@ -743,7 +744,8 @@ namespace SIG.Web.AppCode.Services.Tramites
|
|||||||
"Documentos", "Existen documentos requeridos pendientes de cargar.");
|
"Documentos", "Existen documentos requeridos pendientes de cargar.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contexto.Pagos.Any(pago => pago.EstaPendiente))
|
if (validarPagosRequeridos &&
|
||||||
|
contexto.Pagos.Any(pago => pago.EstaPendiente))
|
||||||
{
|
{
|
||||||
return RequisitosPendientes(
|
return RequisitosPendientes(
|
||||||
"Pagos", "Existen pagos requeridos pendientes. Cancele y realice el pago por el flujo habitual.");
|
"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."
|
EmptyDataText="No tiene fraccionamientos activos."
|
||||||
OnRowDataBound="EnlazarFila">
|
OnRowDataBound="EnlazarFila">
|
||||||
<Columns>
|
<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"
|
<asp:BoundField DataField="Hectareas" HeaderText="Hectáreas"
|
||||||
DataFormatString="{0:N2}" />
|
DataFormatString="{0:N2}" />
|
||||||
<asp:CheckBoxField DataField="Fideicomiso" HeaderText="Fideicomiso" />
|
<asp:CheckBoxField DataField="Fideicomiso" HeaderText="Fideicomiso" />
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using SIG.Web.AppCode.Configuration;
|
using SIG.Web.AppCode.Configuration;
|
||||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||||
@@ -44,65 +42,50 @@ namespace SIG.Web.Pages.Clientes
|
|||||||
argumentos.Row.CssClass = "sig-grid-grupo";
|
argumentos.Row.CssClass = "sig-grid-grupo";
|
||||||
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
||||||
argumentos.Row.Attributes["data-sig-group-id"] = grupo;
|
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";
|
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;
|
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-item-row"] = "1";
|
||||||
argumentos.Row.Attributes["data-sig-parent-group"] = grupo;
|
argumentos.Row.Attributes["data-sig-parent-group"] = grupo;
|
||||||
argumentos.Row.Attributes["data-sig-level"] = "1";
|
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()
|
private void Cargar()
|
||||||
{
|
{
|
||||||
var resultado = AppServices.ServicioPortalCliente.ListarDesarrollos(
|
var resultado = AppServices.ServicioPortalCliente.ListarDesarrollos(
|
||||||
|
|||||||
@@ -10,12 +10,16 @@ namespace SIG.Web.Pages.Clientes
|
|||||||
{
|
{
|
||||||
public partial class FraccionamientoDetalle : ClsPaginaBase
|
public partial class FraccionamientoDetalle : ClsPaginaBase
|
||||||
{
|
{
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private int CveFraccionamientoActual
|
private int CveFraccionamientoActual
|
||||||
{
|
{
|
||||||
get { return (int?)ViewState["CveFraccionamientoActual"] ?? 0; }
|
get { return (int?)ViewState["CveFraccionamientoActual"] ?? 0; }
|
||||||
set { ViewState["CveFraccionamientoActual"] = value; }
|
set { ViewState["CveFraccionamientoActual"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object origen, EventArgs argumentos)
|
protected void Page_Load(object origen, EventArgs argumentos)
|
||||||
{
|
{
|
||||||
if (IsPostBack)
|
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"
|
AutoEventWireup="true" CodeFile="DesarrolladorDetalle.aspx.cs"
|
||||||
Inherits="SIG.Web.Pages.Desarrolladores.DesarrolladorDetalle" %>
|
Inherits="SIG.Web.Pages.Desarrolladores.DesarrolladorDetalle" %>
|
||||||
<%@ Register TagPrefix="sig" TagName="CapturaEtapas" Src="~/UserControl/CapturaEtapas.ascx" %>
|
<%@ Register TagPrefix="sig" TagName="CapturaEtapas" Src="~/UserControl/CapturaEtapas.ascx" %>
|
||||||
@@ -20,9 +20,23 @@
|
|||||||
.desarrollador-acciones {
|
.desarrollador-acciones {
|
||||||
margin-bottom: 15px;
|
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;
|
background: #edf4f8;
|
||||||
padding: 10px 12px;
|
padding: 10px 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.desarrollador-listado > tbody > tr.desarrollador-grupo > td.desarrollador-celda-oculta-grupo {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
.desarrollador-cabecera {
|
.desarrollador-cabecera {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -207,11 +221,17 @@
|
|||||||
<asp:BoundField DataField="Hectareas" HeaderText="Hectáreas de la etapa" DataFormatString="{0:N2}" />
|
<asp:BoundField DataField="Hectareas" HeaderText="Hectáreas de la etapa" DataFormatString="{0:N2}" />
|
||||||
<asp:CheckBoxField DataField="Fideicomiso" HeaderText="Fideicomiso" />
|
<asp:CheckBoxField DataField="Fideicomiso" HeaderText="Fideicomiso" />
|
||||||
<asp:CheckBoxField DataField="EsActivo" HeaderText="Activa" />
|
<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>
|
<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"
|
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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
@@ -16,6 +16,28 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
{
|
{
|
||||||
public partial class DesarrolladorDetalle : ClsPaginaBase
|
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)
|
protected void Fraccionamientos_FilaEnlazada(object origen, GridViewRowEventArgs argumentos)
|
||||||
{
|
{
|
||||||
if (argumentos.Row.RowType != DataControlRowType.DataRow)
|
if (argumentos.Row.RowType != DataControlRowType.DataRow)
|
||||||
@@ -30,10 +52,11 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
if (desarrollo.EsFraccionamiento)
|
if (desarrollo.EsFraccionamiento)
|
||||||
{
|
{
|
||||||
argumentos.Row.CssClass = "desarrollador-grupo";
|
argumentos.Row.CssClass = "desarrollador-grupo";
|
||||||
argumentos.Row.Cells[0].ColumnSpan = GvFraccionamientos.Columns.Count;
|
|
||||||
for (int indice = 1; indice < argumentos.Row.Cells.Count; indice++)
|
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)
|
protected void Page_Load(object origen, EventArgs argumentos)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
|
|||||||
@@ -39,8 +39,9 @@
|
|||||||
<asp:TextBox ID="ReferenciaComprobante" runat="server" MaxLength="200" CssClass="form-control" />
|
<asp:TextBox ID="ReferenciaComprobante" runat="server" MaxLength="200" CssClass="form-control" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="ArchivoComprobante" Text="Comprobante (PDF, JPG o PNG; hasta 5 MB)" />
|
<label>Comprobante (PDF, JPG o PNG; hasta 5 MB)</label>
|
||||||
<asp:FileUpload ID="ArchivoComprobante" runat="server" />
|
<input id="ArchivoComprobante" runat="server" type="hidden"
|
||||||
|
class="ADSdropzoneLocal" />
|
||||||
</div>
|
</div>
|
||||||
<asp:LinkButton ID="EnviarComprobante" runat="server"
|
<asp:LinkButton ID="EnviarComprobante" runat="server"
|
||||||
CssClass="btn blue" CausesValidation="false"
|
CssClass="btn blue" CausesValidation="false"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
@@ -12,6 +12,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
{
|
{
|
||||||
public partial class PagoDetalle : ClsPaginaBase
|
public partial class PagoDetalle : ClsPaginaBase
|
||||||
{
|
{
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private int CveObligacionActual
|
private int CveObligacionActual
|
||||||
{
|
{
|
||||||
get { return (int?)ViewState["CveObligacionActual"] ?? 0; }
|
get { return (int?)ViewState["CveObligacionActual"] ?? 0; }
|
||||||
@@ -27,6 +29,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object origen, EventArgs argumentos)
|
protected void Page_Load(object origen, EventArgs argumentos)
|
||||||
{
|
{
|
||||||
ScriptManager.GetCurrent(Page).RegisterPostBackControl(EnviarComprobante);
|
ScriptManager.GetCurrent(Page).RegisterPostBackControl(EnviarComprobante);
|
||||||
@@ -135,6 +139,12 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
Alert(formas.UserMessage, TipoMensaje.MsgAdvertencia);
|
Alert(formas.UserMessage, TipoMensaje.MsgAdvertencia);
|
||||||
}
|
}
|
||||||
FechaComprobante.Text = DateTime.Today.ToString("yyyy-MM-dd");
|
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(
|
var consulta = AppServices.ServicioPagosConvenios.ListarComprobantes(
|
||||||
obligacion.CveSolicitudPago, CurrentUser.CveUsuario, CurrentUser.NombreDominio);
|
obligacion.CveSolicitudPago, CurrentUser.CveUsuario, CurrentUser.NombreDominio);
|
||||||
Comprobantes.Columns[Comprobantes.Columns.Count - 1].Visible = PuedeAprobarComprobantes;
|
Comprobantes.Columns[Comprobantes.Columns.Count - 1].Visible = PuedeAprobarComprobantes;
|
||||||
@@ -152,7 +162,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
decimal importe;
|
decimal importe;
|
||||||
DateTime fecha;
|
DateTime fecha;
|
||||||
byte forma;
|
byte forma;
|
||||||
if (!ArchivoComprobante.HasFile ||
|
var archivoComprobante = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoComprobante);
|
||||||
|
if (archivoComprobante == null ||
|
||||||
!decimal.TryParse(ImporteComprobante.Text, NumberStyles.AllowDecimalPoint,
|
!decimal.TryParse(ImporteComprobante.Text, NumberStyles.AllowDecimalPoint,
|
||||||
CultureInfo.CurrentCulture, out importe) ||
|
CultureInfo.CurrentCulture, out importe) ||
|
||||||
!DateTime.TryParseExact(FechaComprobante.Text, "yyyy-MM-dd",
|
!DateTime.TryParseExact(FechaComprobante.Text, "yyyy-MM-dd",
|
||||||
@@ -169,10 +180,10 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
Importe = importe,
|
Importe = importe,
|
||||||
CveFormaPago = forma,
|
CveFormaPago = forma,
|
||||||
Referencia = ReferenciaComprobante.Text.Trim(),
|
Referencia = ReferenciaComprobante.Text.Trim(),
|
||||||
NombreArchivo = ArchivoComprobante.FileName,
|
NombreArchivo = archivoComprobante.FileName,
|
||||||
TipoContenido = ArchivoComprobante.PostedFile.ContentType,
|
TipoContenido = archivoComprobante.ContentType,
|
||||||
TamanoBytes = ArchivoComprobante.PostedFile.ContentLength
|
TamanoBytes = archivoComprobante.ContentLength
|
||||||
}, ArchivoComprobante.PostedFile.InputStream, CurrentUser.CveUsuario, CurrentUser.NombreDominio);
|
}, archivoComprobante.InputStream, CurrentUser.CveUsuario, CurrentUser.NombreDominio);
|
||||||
if (!resultado.Success)
|
if (!resultado.Success)
|
||||||
{
|
{
|
||||||
Alert(resultado.UserMessage, TipoMensaje.MsgAdvertencia);
|
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"
|
AutoEventWireup="true" CodeFile="Tramites.aspx.cs"
|
||||||
Inherits="SIG.Web.Pages.Desarrolladores.Tramites" %>
|
Inherits="SIG.Web.Pages.Desarrolladores.Tramites" %>
|
||||||
|
|
||||||
@@ -27,9 +27,29 @@
|
|||||||
background-color: #dff0d8;
|
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;
|
padding: 0;
|
||||||
background: #eef3f7;
|
background: #eef3f7;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-tablero-tramites .sig-tramites-agrupacion > td.sig-tramites-columna-normal {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sig-tramites-alternar-grupo {
|
.sig-tramites-alternar-grupo {
|
||||||
@@ -81,6 +101,15 @@
|
|||||||
OnRowCommand="GvTramites_Comando"
|
OnRowCommand="GvTramites_Comando"
|
||||||
EmptyDataText="No hay solicitudes para los filtros seleccionados.">
|
EmptyDataText="No hay solicitudes para los filtros seleccionados.">
|
||||||
<Columns>
|
<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="Cliente" HeaderText="Cliente" />
|
||||||
<asp:BoundField DataField="Tramite" HeaderText="Trámite" />
|
<asp:BoundField DataField="Tramite" HeaderText="Trámite" />
|
||||||
<asp:TemplateField HeaderText="Fraccionamiento · Etapa">
|
<asp:TemplateField HeaderText="Fraccionamiento · Etapa">
|
||||||
@@ -98,7 +127,7 @@
|
|||||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
||||||
<asp:BoundField DataField="FechaInicio" HeaderText="Fecha inicio"
|
<asp:BoundField DataField="FechaInicio" HeaderText="Fecha inicio"
|
||||||
DataFormatString="{0:dd/MM/yyyy}" />
|
DataFormatString="{0:dd/MM/yyyy}" />
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="BtnEditarEstatus" runat="server"
|
<asp:LinkButton ID="BtnEditarEstatus" runat="server"
|
||||||
CssClass="btn btn-circle btn-sm blue"
|
CssClass="btn btn-circle btn-sm blue"
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using SIG.Web.AppCode.Configuration;
|
using SIG.Web.AppCode.Configuration;
|
||||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||||
@@ -16,6 +15,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
{
|
{
|
||||||
public partial class Tramites : ClsPaginaBase
|
public partial class Tramites : ClsPaginaBase
|
||||||
{
|
{
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private ModeloFiltroTableroTramites FiltrosTableroActuales
|
private ModeloFiltroTableroTramites FiltrosTableroActuales
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -43,6 +44,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected override void OnInit(EventArgs argumentos)
|
protected override void OnInit(EventArgs argumentos)
|
||||||
{
|
{
|
||||||
base.OnInit(argumentos);
|
base.OnInit(argumentos);
|
||||||
@@ -50,7 +53,7 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
|
|
||||||
bool esCliente = CurrentUser.EsDesarrollador;
|
bool esCliente = CurrentUser.EsDesarrollador;
|
||||||
PestanaSeguimientoCondiciones.Visible = !esCliente;
|
PestanaSeguimientoCondiciones.Visible = !esCliente;
|
||||||
GvTramites.Columns[0].Visible = !esCliente;
|
GvTramites.Columns[1].Visible = !esCliente;
|
||||||
CampoSoloBloqueados.Visible = !esCliente;
|
CampoSoloBloqueados.Visible = !esCliente;
|
||||||
|
|
||||||
DdlAgrupacion.Items.Add(new ListItem(
|
DdlAgrupacion.Items.Add(new ListItem(
|
||||||
@@ -168,6 +171,15 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
}
|
}
|
||||||
|
|
||||||
var solicitud = (ModeloFilaTableroTramites)argumentos.Row.DataItem;
|
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"] =
|
argumentos.Row.Attributes["data-cve-agrupacion"] =
|
||||||
solicitud.CveAgrupacion.ToString(CultureInfo.InvariantCulture);
|
solicitud.CveAgrupacion.ToString(CultureInfo.InvariantCulture);
|
||||||
argumentos.Row.Attributes["data-nivel"] =
|
argumentos.Row.Attributes["data-nivel"] =
|
||||||
@@ -175,34 +187,8 @@ namespace SIG.Web.Pages.Desarrolladores
|
|||||||
|
|
||||||
if (solicitud.Nivel == 2)
|
if (solicitud.Nivel == 2)
|
||||||
{
|
{
|
||||||
int columnasVisibles = GvTramites.Columns
|
|
||||||
.Cast<DataControlField>()
|
|
||||||
.Count(columna => columna.Visible);
|
|
||||||
|
|
||||||
argumentos.Row.Cells.Clear();
|
|
||||||
argumentos.Row.CssClass = "sig-tramites-agrupacion";
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1185,16 +1185,15 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Archivo</label>
|
<label>Archivo</label>
|
||||||
<asp:FileUpload ID="ArchivoDocumento"
|
<input id="ArchivoDocumento" runat="server" type="hidden"
|
||||||
runat="server"
|
class="ADSdropzoneLocal" />
|
||||||
CssClass="form-control" />
|
|
||||||
<span class="help-block">
|
<span class="help-block">
|
||||||
<asp:Literal ID="LitReglasCargaDocumento" runat="server" />
|
<asp:Literal ID="LitReglasCargaDocumento" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Fecha del documento (opcional)</label>
|
<label>Fecha del documento</label>
|
||||||
<asp:TextBox ID="TxtFechaDocumento"
|
<asp:TextBox ID="TxtFechaDocumento"
|
||||||
runat="server"
|
runat="server"
|
||||||
CssClass="form-control"
|
CssClass="form-control"
|
||||||
@@ -2016,9 +2015,8 @@
|
|||||||
Descargar plantilla
|
Descargar plantilla
|
||||||
</asp:HyperLink>
|
</asp:HyperLink>
|
||||||
|
|
||||||
<asp:FileUpload ID="ArchivoLotes"
|
<input id="ArchivoLotes" runat="server" type="hidden"
|
||||||
runat="server"
|
class="ADSdropzoneLocal" />
|
||||||
CssClass="form-control fraction-lot-upload" />
|
|
||||||
|
|
||||||
<asp:Button ID="BtnImportarLotes"
|
<asp:Button ID="BtnImportarLotes"
|
||||||
runat="server"
|
runat="server"
|
||||||
|
|||||||
@@ -908,10 +908,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentUser.CveRol > 2)
|
if (CurrentUser.EsDesarrollador)
|
||||||
{
|
{
|
||||||
Alert(
|
Alert(
|
||||||
"Sólo un superusuario puede rechazar documentos.",
|
"La revisión de documentos corresponde a Agua de Hermosillo.",
|
||||||
TipoMensaje.MsgAdvertencia);
|
TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -938,7 +938,8 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ArchivoDocumento.HasFile || ArchivoDocumento.PostedFile == null)
|
var archivoDocumento = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoDocumento);
|
||||||
|
if (archivoDocumento == null)
|
||||||
{
|
{
|
||||||
MostrarValidacionCargaDocumento(
|
MostrarValidacionCargaDocumento(
|
||||||
"Seleccione el archivo que desea guardar.");
|
"Seleccione el archivo que desea guardar.");
|
||||||
@@ -959,10 +960,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
CveFraccionamientoActual,
|
CveFraccionamientoActual,
|
||||||
cveSolicitud,
|
cveSolicitud,
|
||||||
cveTipoDocumento,
|
cveTipoDocumento,
|
||||||
ArchivoDocumento.FileName,
|
archivoDocumento.FileName,
|
||||||
ArchivoDocumento.PostedFile.ContentType,
|
archivoDocumento.ContentType,
|
||||||
ArchivoDocumento.PostedFile.InputStream,
|
archivoDocumento.InputStream,
|
||||||
ArchivoDocumento.PostedFile.ContentLength,
|
archivoDocumento.ContentLength,
|
||||||
TxtComentarioClienteDocumento.Text,
|
TxtComentarioClienteDocumento.Text,
|
||||||
CurrentUser.CveUsuario,
|
CurrentUser.CveUsuario,
|
||||||
CurrentUser.NombreDominio,
|
CurrentUser.NombreDominio,
|
||||||
@@ -1430,7 +1431,8 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ArchivoLotes.HasFile)
|
var archivoLotes = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoLotes);
|
||||||
|
if (archivoLotes == null)
|
||||||
{
|
{
|
||||||
MostrarValidacionLote(
|
MostrarValidacionLote(
|
||||||
"Seleccione la plantilla de Excel que desea cargar.");
|
"Seleccione la plantilla de Excel que desea cargar.");
|
||||||
@@ -1439,10 +1441,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
|
|
||||||
ResultadoExcelLotesFraccionamiento resultadoExcel =
|
ResultadoExcelLotesFraccionamiento resultadoExcel =
|
||||||
ExcelLotesFraccionamiento.Leer(
|
ExcelLotesFraccionamiento.Leer(
|
||||||
ArchivoLotes.PostedFile.InputStream,
|
archivoLotes.InputStream,
|
||||||
ArchivoLotes.FileName,
|
archivoLotes.FileName,
|
||||||
ArchivoLotes.PostedFile.ContentLength,
|
archivoLotes.ContentLength,
|
||||||
ArchivoLotes.PostedFile.ContentType);
|
archivoLotes.ContentType);
|
||||||
|
|
||||||
if (!resultadoExcel.Exitoso)
|
if (!resultadoExcel.Exitoso)
|
||||||
{
|
{
|
||||||
@@ -2011,9 +2013,15 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
}
|
}
|
||||||
|
|
||||||
LitReglasCargaDocumento.Text = Server.HtmlEncode(reglas);
|
LitReglasCargaDocumento.Text = Server.HtmlEncode(reglas);
|
||||||
|
CargaArchivoWebHelper.Configurar(
|
||||||
|
ArchivoDocumento,
|
||||||
|
contexto.ExtensionesPermitidas,
|
||||||
|
contexto.TamanoMaximoMb,
|
||||||
|
1);
|
||||||
TxtComentarioClienteDocumento.Text =
|
TxtComentarioClienteDocumento.Text =
|
||||||
contexto.ComentarioClienteAnterior ?? string.Empty;
|
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);
|
TxtVencimientoDocumento.Text = FormatearFechaDocumento(contexto.FechaVencimientoAnterior);
|
||||||
OcultarMensajeCargaDocumento();
|
OcultarMensajeCargaDocumento();
|
||||||
UpModalCargaDocumento.Update();
|
UpModalCargaDocumento.Update();
|
||||||
@@ -2025,10 +2033,10 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
bool aprobado,
|
bool aprobado,
|
||||||
string nota)
|
string nota)
|
||||||
{
|
{
|
||||||
if (CurrentUser.CveRol > 2)
|
if (CurrentUser.EsDesarrollador)
|
||||||
{
|
{
|
||||||
Alert(
|
Alert(
|
||||||
"Sólo un superusuario puede aprobar o rechazar documentos.",
|
"La revisión de documentos corresponde a Agua de Hermosillo.",
|
||||||
TipoMensaje.MsgAdvertencia);
|
TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3111,6 +3119,12 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
|
|
||||||
CveFraccionamientoEtapaLotesActual = cveFraccionamientoEtapa;
|
CveFraccionamientoEtapaLotesActual = cveFraccionamientoEtapa;
|
||||||
LitLoteEtapaNombre.Text = Server.HtmlEncode(etapaItem.Text);
|
LitLoteEtapaNombre.Text = Server.HtmlEncode(etapaItem.Text);
|
||||||
|
CargaArchivoWebHelper.Configurar(
|
||||||
|
ArchivoLotes,
|
||||||
|
".xlsx",
|
||||||
|
null,
|
||||||
|
1,
|
||||||
|
"Arrastra aquí la plantilla .xlsx o haz clic para seleccionarla.");
|
||||||
LimpiarCapturaLote();
|
LimpiarCapturaLote();
|
||||||
UpLotesModal.Update();
|
UpLotesModal.Update();
|
||||||
MostrarLoteModal();
|
MostrarLoteModal();
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* custom.js
|
* custom.js
|
||||||
* Cleaned for the new C# WebForms project.
|
* Cleaned for the new C# WebForms project.
|
||||||
* Notes:
|
* Notes:
|
||||||
@@ -1625,8 +1625,17 @@ function ADDropzoneLocal(txtid) {
|
|||||||
txt.attr('data-maxFile') || txt.attr('data-maxfile'),
|
txt.attr('data-maxFile') || txt.attr('data-maxfile'),
|
||||||
10);
|
10);
|
||||||
var acceptedFiles = txt.attr('data-acceptedfiles') || null;
|
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') ||
|
var message = txt.attr('data-message') ||
|
||||||
'Arrastra un archivo aquí o haz clic para seleccionarlo.';
|
'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 appendId = txt.attr('data-append');
|
||||||
var dropId = txtid + '-drop';
|
var dropId = txtid + '-drop';
|
||||||
var existing = $('#' + dropId);
|
var existing = $('#' + dropId);
|
||||||
@@ -1710,6 +1719,15 @@ function ADDropzoneLocal(txtid) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (modoLectura === 'none') {
|
||||||
|
txt.trigger('adsdropzone:fileadded', [
|
||||||
|
file,
|
||||||
|
null,
|
||||||
|
instance
|
||||||
|
]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
|
|
||||||
reader.onload = function (event) {
|
reader.onload = function (event) {
|
||||||
@@ -1739,8 +1757,11 @@ function ADDropzoneLocal(txtid) {
|
|||||||
* archivo y los mismos eventos adsdropzone:* consumidos por la pantalla.
|
* archivo y los mismos eventos adsdropzone:* consumidos por la pantalla.
|
||||||
* Si Dropzone está cargado en otra instalación, se usa normalmente.
|
* 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;" />');
|
var input = $('<input type="file" style="display:none;" />');
|
||||||
|
if (nombreCampoArchivo) {
|
||||||
|
input.attr('name', nombreCampoArchivo);
|
||||||
|
}
|
||||||
if (acceptedFiles) {
|
if (acceptedFiles) {
|
||||||
input.attr('accept', acceptedFiles);
|
input.attr('accept', acceptedFiles);
|
||||||
}
|
}
|
||||||
@@ -1756,12 +1777,14 @@ function ADDropzoneLocal(txtid) {
|
|||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
this.files.splice(index, 1);
|
this.files.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
sincronizarInputFallback();
|
||||||
renderFallback();
|
renderFallback();
|
||||||
txt.trigger('adsdropzone:fileremoved', [file, fallback]);
|
txt.trigger('adsdropzone:fileremoved', [file, fallback]);
|
||||||
},
|
},
|
||||||
removeAllFiles: function () {
|
removeAllFiles: function () {
|
||||||
var files = this.files.slice(0);
|
var files = this.files.slice(0);
|
||||||
this.files = [];
|
this.files = [];
|
||||||
|
sincronizarInputFallback();
|
||||||
renderFallback();
|
renderFallback();
|
||||||
$.each(files, function (_, file) {
|
$.each(files, function (_, file) {
|
||||||
txt.trigger('adsdropzone:fileremoved', [file, fallback]);
|
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() {
|
function renderFallback() {
|
||||||
mydiv.find('.ADSdropzoneLocalFallbackPreview').remove();
|
mydiv.find('.ADSdropzoneLocalFallbackPreview').remove();
|
||||||
mydiv.find('.dz-message').toggle(fallback.files.length === 0);
|
mydiv.find('.dz-message').toggle(fallback.files.length === 0);
|
||||||
@@ -1817,16 +1865,33 @@ function ADDropzoneLocal(txtid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fallback.files.push(file);
|
fallback.files.push(file);
|
||||||
|
sincronizarInputFallback();
|
||||||
renderFallback();
|
renderFallback();
|
||||||
readFile(file, fallback);
|
readFile(file, fallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
input.on('change', function () {
|
input.on('change', function () {
|
||||||
|
var seleccionados = [];
|
||||||
var files = this.files || [];
|
var files = this.files || [];
|
||||||
for (var i = 0; i < files.length; i++) {
|
var i;
|
||||||
addFallbackFile(files[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-columna-grupo {
|
||||||
.sig-grid-agrupado .sig-grid-alternar-grupo { width: 100%; border: 0; background: transparent; padding: 10px 12px; text-align: left; font-weight: 600; }
|
display: none;
|
||||||
.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.sig-grid-grupo {
|
||||||
.sig-grid-agrupado tr[data-sig-level="3"] > td:first-child { padding-left: 60px; }
|
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" %>
|
Inherits="SIG.Web.UserControl.Clientes.DocumentosCliente" %>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpDocumentos" runat="server"
|
<asp:UpdatePanel ID="UpDocumentos" runat="server"
|
||||||
@@ -21,14 +21,27 @@
|
|||||||
OnRowDataBound="EnlazarFila"
|
OnRowDataBound="EnlazarFila"
|
||||||
OnRowCommand="ComandoDocumento">
|
OnRowCommand="ComandoDocumento">
|
||||||
<Columns>
|
<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="Etapa" HeaderText="Etapa" />
|
||||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Documento" />
|
<asp:BoundField DataField="TipoDocumento" HeaderText="Documento" />
|
||||||
<asp:BoundField DataField="TipoTramite" HeaderText="Trámite" />
|
<asp:BoundField DataField="TipoTramite" HeaderText="Trámite" />
|
||||||
|
<asp:CheckBoxField DataField="EsRequerido" HeaderText="Requerido" />
|
||||||
<asp:BoundField DataField="EstadoDocumento" HeaderText="Estado" />
|
<asp:BoundField DataField="EstadoDocumento" HeaderText="Estado" />
|
||||||
<asp:BoundField DataField="FechaVencimiento" HeaderText="Vencimiento"
|
<asp:BoundField DataField="FechaVencimiento" HeaderText="Vencimiento"
|
||||||
DataFormatString="{0:dd/MM/yyyy}" />
|
DataFormatString="{0:dd/MM/yyyy}" />
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Acciones"
|
||||||
|
HeaderStyle-CssClass="sig-columna-acciones"
|
||||||
|
ItemStyle-CssClass="sig-columna-acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="LnkVerDocumento" runat="server"
|
<asp:HyperLink ID="LnkVerDocumento" runat="server"
|
||||||
CssClass="btn btn-sm default"
|
CssClass="btn btn-sm default"
|
||||||
@@ -38,12 +51,12 @@
|
|||||||
Ver
|
Ver
|
||||||
</asp:HyperLink>
|
</asp:HyperLink>
|
||||||
<asp:LinkButton ID="BtnCargarDocumento" runat="server"
|
<asp:LinkButton ID="BtnCargarDocumento" runat="server"
|
||||||
CssClass="btn btn-sm blue"
|
CssClass="btn btn-sm blue sig-accion-icono"
|
||||||
CommandName="Cargar"
|
CommandName="Cargar"
|
||||||
CausesValidation="false"
|
CausesValidation="false"
|
||||||
|
ToolTip="Cargar / renovar" aria-label="Cargar / renovar"
|
||||||
Visible='<%# Convert.ToBoolean(Eval("PuedeCargar")) %>'>
|
Visible='<%# Convert.ToBoolean(Eval("PuedeCargar")) %>'>
|
||||||
<i class="fa fa-upload" aria-hidden="true"></i>
|
<i class="fa fa-upload" aria-hidden="true"></i>
|
||||||
Cargar / renovar
|
|
||||||
</asp:LinkButton>
|
</asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -118,10 +131,9 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><asp:Literal ID="ReglasArchivoDocumento" runat="server" Mode="Encode" /></p>
|
<p><asp:Literal ID="ReglasArchivoDocumento" runat="server" Mode="Encode" /></p>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="ArchivoDocumento"
|
<label>Archivo</label>
|
||||||
Text="Archivo" />
|
<input id="ArchivoDocumento" runat="server" type="hidden"
|
||||||
<asp:FileUpload ID="ArchivoDocumento" runat="server"
|
class="ADSdropzoneLocal" />
|
||||||
CssClass="form-control" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="FechaDocumento"
|
<asp:Label runat="server" AssociatedControlID="FechaDocumento"
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using SIG.Web.AppCode.Configuration;
|
using SIG.Web.AppCode.Configuration;
|
||||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||||
@@ -18,6 +17,8 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
{
|
{
|
||||||
public partial class DocumentosCliente : System.Web.UI.UserControl
|
public partial class DocumentosCliente : System.Web.UI.UserControl
|
||||||
{
|
{
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private UserSessionModel Usuario
|
private UserSessionModel Usuario
|
||||||
{
|
{
|
||||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||||
@@ -64,6 +65,8 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
set { ViewState["DocumentosActuales"] = value; }
|
set { ViewState["DocumentosActuales"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected override void OnInit(EventArgs argumentos)
|
protected override void OnInit(EventArgs argumentos)
|
||||||
{
|
{
|
||||||
base.OnInit(argumentos);
|
base.OnInit(argumentos);
|
||||||
@@ -157,6 +160,15 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
return;
|
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"] =
|
argumentos.Row.Attributes["data-sig-level"] =
|
||||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
@@ -173,33 +185,11 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
fila.ParentGroupId;
|
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;
|
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-item-row"] = "1";
|
||||||
argumentos.Row.Attributes["data-sig-parent-group"] =
|
argumentos.Row.Attributes["data-sig-parent-group"] =
|
||||||
fila.ParentGroupId;
|
fila.ParentGroupId;
|
||||||
@@ -282,8 +272,13 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
(contexto.Data.TamanoMaximoMb.HasValue
|
(contexto.Data.TamanoMaximoMb.HasValue
|
||||||
? " · Máximo " + contexto.Data.TamanoMaximoMb + " MB"
|
? " · Máximo " + contexto.Data.TamanoMaximoMb + " MB"
|
||||||
: string.Empty);
|
: string.Empty);
|
||||||
FechaDocumento.Text = FormatearFecha(
|
CargaArchivoWebHelper.Configurar(
|
||||||
contexto.Data.FechaDocumentoAnterior);
|
ArchivoDocumento,
|
||||||
|
contexto.Data.ExtensionesPermitidas,
|
||||||
|
contexto.Data.TamanoMaximoMb,
|
||||||
|
1);
|
||||||
|
FechaDocumento.Text = FormatearFecha(DateTime.Today);
|
||||||
|
FechaDocumento.Attributes["max"] = FormatearFecha(DateTime.Today);
|
||||||
FechaVencimientoDocumento.Text = FormatearFecha(
|
FechaVencimientoDocumento.Text = FormatearFecha(
|
||||||
contexto.Data.FechaVencimientoAnterior);
|
contexto.Data.FechaVencimientoAnterior);
|
||||||
NotaDocumento.Text = contexto.Data.ComentarioClienteAnterior ?? string.Empty;
|
NotaDocumento.Text = contexto.Data.ComentarioClienteAnterior ?? string.Empty;
|
||||||
@@ -297,8 +292,10 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
DateTime? fechaDocumento;
|
DateTime? fechaDocumento;
|
||||||
DateTime? fechaVencimiento;
|
DateTime? fechaVencimiento;
|
||||||
|
|
||||||
|
var archivo = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoDocumento);
|
||||||
|
|
||||||
if (DocumentoSeleccionado == null ||
|
if (DocumentoSeleccionado == null ||
|
||||||
!ArchivoDocumento.HasFile ||
|
archivo == null ||
|
||||||
!LeerFecha(FechaDocumento.Text, out fechaDocumento) ||
|
!LeerFecha(FechaDocumento.Text, out fechaDocumento) ||
|
||||||
!LeerFecha(FechaVencimientoDocumento.Text, out fechaVencimiento))
|
!LeerFecha(FechaVencimientoDocumento.Text, out fechaVencimiento))
|
||||||
{
|
{
|
||||||
@@ -312,10 +309,10 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
DocumentoSeleccionado.CveFraccionamiento,
|
DocumentoSeleccionado.CveFraccionamiento,
|
||||||
DocumentoSeleccionado.CveSolicitud,
|
DocumentoSeleccionado.CveSolicitud,
|
||||||
DocumentoSeleccionado.CveTipoDocumento,
|
DocumentoSeleccionado.CveTipoDocumento,
|
||||||
ArchivoDocumento.FileName,
|
archivo.FileName,
|
||||||
ArchivoDocumento.PostedFile.ContentType,
|
archivo.ContentType,
|
||||||
ArchivoDocumento.PostedFile.InputStream,
|
archivo.InputStream,
|
||||||
ArchivoDocumento.PostedFile.ContentLength,
|
archivo.ContentLength,
|
||||||
NotaDocumento.Text,
|
NotaDocumento.Text,
|
||||||
usuario.CveUsuario,
|
usuario.CveUsuario,
|
||||||
usuario.NombreDominio,
|
usuario.NombreDominio,
|
||||||
@@ -724,6 +721,11 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
get { return Documento == null ? string.Empty : Documento.EstadoDocumento; }
|
get { return Documento == null ? string.Empty : Documento.EstadoDocumento; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool EsRequerido
|
||||||
|
{
|
||||||
|
get { return Documento != null && Documento.EsRequerido; }
|
||||||
|
}
|
||||||
|
|
||||||
public DateTime? FechaVencimiento
|
public DateTime? FechaVencimiento
|
||||||
{
|
{
|
||||||
get { return Documento == null ? null : Documento.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" %>
|
Inherits="SIG.Web.UserControl.Clientes.PagosCliente" %>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpPagos" runat="server"
|
<asp:UpdatePanel ID="UpPagos" runat="server"
|
||||||
@@ -21,7 +21,17 @@
|
|||||||
OnRowDataBound="EnlazarFila"
|
OnRowDataBound="EnlazarFila"
|
||||||
OnRowCommand="ComandoPago">
|
OnRowCommand="ComandoPago">
|
||||||
<Columns>
|
<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="Etapa" HeaderText="Etapa" />
|
||||||
<asp:BoundField DataField="NumeroConvenio" HeaderText="Convenio" />
|
<asp:BoundField DataField="NumeroConvenio" HeaderText="Convenio" />
|
||||||
<asp:TemplateField HeaderText="Concepto / recibos">
|
<asp:TemplateField HeaderText="Concepto / recibos">
|
||||||
@@ -47,7 +57,9 @@
|
|||||||
</asp:HyperLink>
|
</asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Acciones"
|
||||||
|
HeaderStyle-CssClass="sig-columna-acciones"
|
||||||
|
ItemStyle-CssClass="sig-columna-acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="BtnPagar" runat="server"
|
<asp:LinkButton ID="BtnPagar" runat="server"
|
||||||
CssClass="btn btn-sm blue"
|
CssClass="btn btn-sm blue"
|
||||||
@@ -146,10 +158,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="ArchivoPago"
|
<label>Comprobante</label>
|
||||||
Text="Comprobante" />
|
<input id="ArchivoPago" runat="server" type="hidden"
|
||||||
<asp:FileUpload ID="ArchivoPago" runat="server"
|
class="ADSdropzoneLocal" />
|
||||||
CssClass="form-control" />
|
|
||||||
<span class="help-block">PDF, JPG o PNG; máximo 5 MB.</span>
|
<span class="help-block">PDF, JPG o PNG; máximo 5 MB.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -245,7 +256,7 @@
|
|||||||
Text='<%# Bind("ImporteAplicado", "{0:0.00}") %>' />
|
Text='<%# Bind("ImporteAplicado", "{0:0.00}") %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton runat="server"
|
<asp:LinkButton runat="server"
|
||||||
CssClass="btn btn-sm red"
|
CssClass="btn btn-sm red"
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using SIG.Web.AppCode.Configuration;
|
using SIG.Web.AppCode.Configuration;
|
||||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||||
@@ -17,6 +16,8 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
{
|
{
|
||||||
public partial class PagosCliente : System.Web.UI.UserControl
|
public partial class PagosCliente : System.Web.UI.UserControl
|
||||||
{
|
{
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private UserSessionModel Usuario
|
private UserSessionModel Usuario
|
||||||
{
|
{
|
||||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||||
@@ -64,6 +65,8 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
set { ViewState["RecibosDisponibles"] = value; }
|
set { ViewState["RecibosDisponibles"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected override void OnInit(EventArgs argumentos)
|
protected override void OnInit(EventArgs argumentos)
|
||||||
{
|
{
|
||||||
base.OnInit(argumentos);
|
base.OnInit(argumentos);
|
||||||
@@ -157,6 +160,15 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
return;
|
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"] =
|
argumentos.Row.Attributes["data-sig-level"] =
|
||||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
@@ -173,33 +185,11 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
fila.ParentGroupId;
|
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;
|
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-item-row"] = "1";
|
||||||
argumentos.Row.Attributes["data-sig-parent-group"] =
|
argumentos.Row.Attributes["data-sig-parent-group"] =
|
||||||
fila.ParentGroupId;
|
fila.ParentGroupId;
|
||||||
@@ -322,6 +312,7 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
|
|
||||||
decimal importePago;
|
decimal importePago;
|
||||||
DateTime fechaPago;
|
DateTime fechaPago;
|
||||||
|
var archivoPago = CargaArchivoWebHelper.ObtenerArchivo(Page, ArchivoPago);
|
||||||
|
|
||||||
if (!LeerDecimal(TxtImportePago.Text, out importePago) ||
|
if (!LeerDecimal(TxtImportePago.Text, out importePago) ||
|
||||||
importePago <= 0m ||
|
importePago <= 0m ||
|
||||||
@@ -331,7 +322,7 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
DateTimeStyles.None,
|
DateTimeStyles.None,
|
||||||
out fechaPago) ||
|
out fechaPago) ||
|
||||||
!ArchivoPago.HasFile)
|
archivoPago == null)
|
||||||
{
|
{
|
||||||
MostrarModal(ModalPagoConvenioCliente.ClientID);
|
MostrarModal(ModalPagoConvenioCliente.ClientID);
|
||||||
Avisar("Capture importe, fecha y comprobante del pago.");
|
Avisar("Capture importe, fecha y comprobante del pago.");
|
||||||
@@ -378,15 +369,15 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
Banco = TxtBancoPago.Text,
|
Banco = TxtBancoPago.Text,
|
||||||
NumeroOperacion = TxtNumeroOperacionPago.Text,
|
NumeroOperacion = TxtNumeroOperacionPago.Text,
|
||||||
Observaciones = TxtObservacionesPago.Text,
|
Observaciones = TxtObservacionesPago.Text,
|
||||||
NombreArchivo = ArchivoPago.FileName,
|
NombreArchivo = archivoPago.FileName,
|
||||||
TipoContenido = ArchivoPago.PostedFile.ContentType,
|
TipoContenido = archivoPago.ContentType,
|
||||||
TamanoBytes = ArchivoPago.PostedFile.ContentLength,
|
TamanoBytes = archivoPago.ContentLength,
|
||||||
Aplicaciones = aplicaciones
|
Aplicaciones = aplicaciones
|
||||||
};
|
};
|
||||||
|
|
||||||
var resultado = AppServices.ServicioPortalCliente.RegistrarPago(
|
var resultado = AppServices.ServicioPortalCliente.RegistrarPago(
|
||||||
solicitud,
|
solicitud,
|
||||||
ArchivoPago.PostedFile.InputStream,
|
archivoPago.InputStream,
|
||||||
usuario.CveUsuario,
|
usuario.CveUsuario,
|
||||||
usuario.NombreDominio);
|
usuario.NombreDominio);
|
||||||
|
|
||||||
@@ -456,6 +447,12 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
TxtNumeroOperacionPago.Text = string.Empty;
|
TxtNumeroOperacionPago.Text = string.Empty;
|
||||||
TxtObservacionesPago.Text = string.Empty;
|
TxtObservacionesPago.Text = string.Empty;
|
||||||
TxtImporteAplicarAgregar.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();
|
EnlazarAplicaciones();
|
||||||
CargarComboRecibos();
|
CargarComboRecibos();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="BtnEnviarRevision" runat="server"
|
<asp:LinkButton ID="BtnEnviarRevision" runat="server"
|
||||||
CssClass="btn btn-sm blue"
|
CssClass="btn btn-sm blue"
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
{
|
{
|
||||||
public event EventHandler Cambiado;
|
public event EventHandler Cambiado;
|
||||||
|
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private UserSessionModel Usuario
|
private UserSessionModel Usuario
|
||||||
{
|
{
|
||||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||||
@@ -30,6 +32,8 @@ namespace SIG.Web.UserControl.Clientes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void Cargar(int cveFraccionamiento)
|
public void Cargar(int cveFraccionamiento)
|
||||||
{
|
{
|
||||||
CveFraccionamientoActual = cveFraccionamiento;
|
CveFraccionamientoActual = cveFraccionamiento;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton
|
<asp:LinkButton
|
||||||
ID="BtnDetalleConvenio"
|
ID="BtnDetalleConvenio"
|
||||||
@@ -424,7 +424,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Acciones" HeaderStyle-CssClass="sig-columna-acciones" ItemStyle-CssClass="sig-columna-acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:PlaceHolder
|
<asp:PlaceHolder
|
||||||
ID="PhAccionesConcepto"
|
ID="PhAccionesConcepto"
|
||||||
@@ -536,7 +536,17 @@
|
|||||||
EmptyDataText="El convenio no tiene conceptos."
|
EmptyDataText="El convenio no tiene conceptos."
|
||||||
OnRowDataBound="EnlazarFilaDetalle">
|
OnRowDataBound="EnlazarFilaDetalle">
|
||||||
<Columns>
|
<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="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="ImportePagado" HeaderText="Pagado" 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" />
|
<asp:BoundField DataField="SaldoPendiente" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using System.Globalization;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using SIG.Web.AppCode.Configuration;
|
using SIG.Web.AppCode.Configuration;
|
||||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||||
@@ -16,6 +15,8 @@ namespace SIG.Web.UserControl
|
|||||||
{
|
{
|
||||||
public partial class ConveniosListado : System.Web.UI.UserControl
|
public partial class ConveniosListado : System.Web.UI.UserControl
|
||||||
{
|
{
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private UserSessionModel CurrentUser
|
private UserSessionModel CurrentUser
|
||||||
{
|
{
|
||||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||||
@@ -41,10 +42,12 @@ namespace SIG.Web.UserControl
|
|||||||
set { ViewState["ConceptosCaptura"] = value; }
|
set { ViewState["ConceptosCaptura"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler Cambiado;
|
|
||||||
|
|
||||||
public bool MostrarAgregar { get; set; } = true;
|
public bool MostrarAgregar { get; set; } = true;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public event EventHandler Cambiado;
|
||||||
|
|
||||||
public void Cargar(FiltroConvenios filtro)
|
public void Cargar(FiltroConvenios filtro)
|
||||||
{
|
{
|
||||||
FiltroActual = filtro ?? new FiltroConvenios();
|
FiltroActual = filtro ?? new FiltroConvenios();
|
||||||
@@ -936,6 +939,8 @@ namespace SIG.Web.UserControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
argumentos.Row.CssClass = "sig-convenio-fila-parcialidad";
|
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-item-row"] = "1";
|
||||||
argumentos.Row.Attributes["data-sig-parent-group"] =
|
argumentos.Row.Attributes["data-sig-parent-group"] =
|
||||||
fila.ParentGroupId;
|
fila.ParentGroupId;
|
||||||
@@ -1191,6 +1196,15 @@ namespace SIG.Web.UserControl
|
|||||||
return;
|
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"] =
|
argumentos.Row.Attributes["data-sig-level"] =
|
||||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
@@ -1202,48 +1216,17 @@ namespace SIG.Web.UserControl
|
|||||||
|
|
||||||
if (!fila.EsGrupo)
|
if (!fila.EsGrupo)
|
||||||
{
|
{
|
||||||
|
argumentos.Row.CssClass =
|
||||||
|
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int columnas = GvDetalle.Columns
|
|
||||||
.Cast<DataControlField>()
|
|
||||||
.Count(x => x.Visible);
|
|
||||||
|
|
||||||
argumentos.Row.Cells.Clear();
|
|
||||||
argumentos.Row.CssClass = "sig-grid-grupo";
|
argumentos.Row.CssClass = "sig-grid-grupo";
|
||||||
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
||||||
argumentos.Row.Attributes["data-sig-group-id"] = fila.GroupId;
|
argumentos.Row.Attributes["data-sig-group-id"] = fila.GroupId;
|
||||||
argumentos.Row.Attributes["data-sig-expanded-default"] =
|
argumentos.Row.Attributes["data-sig-expanded-default"] =
|
||||||
fila.AbiertoInicialmente ? "true" : "false";
|
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]
|
[Serializable]
|
||||||
|
|||||||
@@ -62,10 +62,22 @@
|
|||||||
<asp:BoundField DataField="TipoTramite" HeaderText="Trámite" />
|
<asp:BoundField DataField="TipoTramite" HeaderText="Trámite" />
|
||||||
<asp:BoundField DataField="EstatusSolicitud" HeaderText="Estatus" />
|
<asp:BoundField DataField="EstatusSolicitud" HeaderText="Estatus" />
|
||||||
<asp:BoundField DataField="FechaInicio" HeaderText="Fecha de inicio" />
|
<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>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="BtnSeguimiento" runat="server" Text="Seguimiento"
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ namespace SIG.Web.UserControl
|
|||||||
{
|
{
|
||||||
private ModeloEtapaFraccionamiento _etapa;
|
private ModeloEtapaFraccionamiento _etapa;
|
||||||
|
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private int CveEtapaActual
|
private int CveEtapaActual
|
||||||
{
|
{
|
||||||
get { return (int?)ViewState["CveEtapaActual"] ?? 0; }
|
get { return (int?)ViewState["CveEtapaActual"] ?? 0; }
|
||||||
@@ -37,6 +39,8 @@ namespace SIG.Web.UserControl
|
|||||||
|
|
||||||
public event EventHandler Cambiado;
|
public event EventHandler Cambiado;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object origen, EventArgs argumentos)
|
protected void Page_Load(object origen, EventArgs argumentos)
|
||||||
{
|
{
|
||||||
UcEstatus.ObtenerCondiciones = UcCondiciones.Capturar;
|
UcEstatus.ObtenerCondiciones = UcCondiciones.Capturar;
|
||||||
@@ -353,20 +357,98 @@ namespace SIG.Web.UserControl
|
|||||||
return consulta.Data;
|
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)
|
protected void Tramites_Comando(object origen, GridViewCommandEventArgs argumentos)
|
||||||
{
|
{
|
||||||
if (_etapa == null || argumentos.CommandName != "Seguimiento")
|
if (_etapa == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cveSolicitud = ObtenerClaveFila(GvTramites, argumentos);
|
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);
|
var contexto = ConsultarSolicitud(cveSolicitud);
|
||||||
if (contexto == null)
|
if (contexto == null)
|
||||||
{
|
{
|
||||||
return;
|
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;
|
CveSolicitudActual = cveSolicitud;
|
||||||
LitSolicitud.Text = contexto.Solicitud.Folio + " / " + contexto.Solicitud.TipoTramite;
|
LitSolicitud.Text = contexto.Solicitud.Folio + " / " + contexto.Solicitud.TipoTramite;
|
||||||
UcEstatus.Cargar(contexto);
|
UcEstatus.Cargar(contexto);
|
||||||
|
|||||||
@@ -417,7 +417,8 @@
|
|||||||
Text="Relacionar con"/>
|
Text="Relacionar con"/>
|
||||||
<asp:DropDownList ID="DocumentoCuestionario" runat="server" CssClass="form-control select2me"></asp:DropDownList>
|
<asp:DropDownList ID="DocumentoCuestionario" runat="server" CssClass="form-control select2me"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<asp:FileUpload ID="ArchivosVisita" runat="server" AllowMultiple="true" />
|
<input id="ArchivosVisita" runat="server" type="hidden"
|
||||||
|
class="ADSdropzoneLocal" />
|
||||||
<asp:LinkButton ID="CargarDocumentos"
|
<asp:LinkButton ID="CargarDocumentos"
|
||||||
runat="server"
|
runat="server"
|
||||||
CssClass="btn btn-primary"
|
CssClass="btn btn-primary"
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace SIG.Web.UserControl
|
|||||||
{
|
{
|
||||||
public event EventHandler Cambiado;
|
public event EventHandler Cambiado;
|
||||||
|
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
public bool ComoPanel
|
public bool ComoPanel
|
||||||
{
|
{
|
||||||
get { return (bool?)ViewState["ComoPanel"] ?? true; }
|
get { return (bool?)ViewState["ComoPanel"] ?? true; }
|
||||||
@@ -68,9 +70,17 @@ namespace SIG.Web.UserControl
|
|||||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected override void OnLoad(EventArgs argumentos)
|
protected override void OnLoad(EventArgs argumentos)
|
||||||
{
|
{
|
||||||
base.OnLoad(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);
|
ScriptManager.GetCurrent(Page).RegisterPostBackControl(CargarDocumentos);
|
||||||
if (Page.IsPostBack && CuestionarioActual != null)
|
if (Page.IsPostBack && CuestionarioActual != null)
|
||||||
{
|
{
|
||||||
@@ -728,7 +738,8 @@ namespace SIG.Web.UserControl
|
|||||||
{
|
{
|
||||||
return;
|
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);
|
Alert(CveVisitaActual <= 0 ? "Guarde primero la visita." : "Seleccione al menos un archivo.", TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
@@ -737,7 +748,7 @@ namespace SIG.Web.UserControl
|
|||||||
int? cuestionario = int.TryParse(DocumentoCuestionario.SelectedValue, out clave) ? (int?)clave : null;
|
int? cuestionario = int.TryParse(DocumentoCuestionario.SelectedValue, out clave) ? (int?)clave : null;
|
||||||
int guardados = 0;
|
int guardados = 0;
|
||||||
var errores = new List<string>();
|
var errores = new List<string>();
|
||||||
foreach (HttpPostedFile archivo in ArchivosVisita.PostedFiles)
|
foreach (HttpPostedFile archivo in archivosVisita)
|
||||||
{
|
{
|
||||||
var resultado = AppServices.ServicioVisitas.CargarDocumento(
|
var resultado = AppServices.ServicioVisitas.CargarDocumento(
|
||||||
CveVisitaActual, cuestionario, archivo.FileName, archivo.ContentType,
|
CveVisitaActual, cuestionario, archivo.FileName, archivo.ContentType,
|
||||||
|
|||||||
@@ -19,8 +19,19 @@
|
|||||||
OnRowCommand="ComandoDocumento"
|
OnRowCommand="ComandoDocumento"
|
||||||
EmptyDataText="No hay documentos para mostrar.">
|
EmptyDataText="No hay documentos para mostrar.">
|
||||||
<Columns>
|
<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:BoundField DataField="Responsable" HeaderText="Responsable" />
|
||||||
|
<asp:CheckBoxField DataField="EsRequerido" HeaderText="Requerido" />
|
||||||
<asp:BoundField DataField="EstadoDocumento" HeaderText="Estado" />
|
<asp:BoundField DataField="EstadoDocumento" HeaderText="Estado" />
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Aprobado">
|
<asp:TemplateField HeaderText="Aprobado">
|
||||||
@@ -39,7 +50,9 @@
|
|||||||
|
|
||||||
<asp:BoundField DataField="Nota" HeaderText="Nota / motivo" />
|
<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>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" Text="Descargar" CssClass="btn btn-sm default"
|
<asp:HyperLink runat="server" Text="Descargar" CssClass="btn btn-sm default"
|
||||||
Visible='<%# MostrarAccion(Container.DataItem, "Descargar") %>'
|
Visible='<%# MostrarAccion(Container.DataItem, "Descargar") %>'
|
||||||
@@ -49,9 +62,12 @@
|
|||||||
CommandName="AdministrarGis" CausesValidation="false"
|
CommandName="AdministrarGis" CausesValidation="false"
|
||||||
Visible='<%# MostrarAccion(Container.DataItem, "AdministrarGis") %>' />
|
Visible='<%# MostrarAccion(Container.DataItem, "AdministrarGis") %>' />
|
||||||
|
|
||||||
<asp:LinkButton runat="server" Text="Cargar / renovar" CommandName="Cargar"
|
<asp:LinkButton runat="server" CommandName="Cargar"
|
||||||
CssClass="btn btn-sm blue" CausesValidation="false"
|
CssClass="btn btn-sm blue sig-accion-icono" CausesValidation="false"
|
||||||
Visible='<%# MostrarAccion(Container.DataItem, "Cargar") %>' />
|
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"
|
<asp:LinkButton runat="server" Text="Aprobar" CommandName="Aprobar"
|
||||||
CssClass="btn btn-sm green" CausesValidation="false"
|
CssClass="btn btn-sm green" CausesValidation="false"
|
||||||
@@ -61,6 +77,27 @@
|
|||||||
CssClass="btn btn-sm red" CausesValidation="false"
|
CssClass="btn btn-sm red" CausesValidation="false"
|
||||||
Visible='<%# MostrarAccion(Container.DataItem, "CancelarDocumento") %>' />
|
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"
|
<asp:LinkButton runat="server" Text="Eliminar" CommandName="Eliminar"
|
||||||
CssClass="btn btn-sm default" CausesValidation="false"
|
CssClass="btn btn-sm default" CausesValidation="false"
|
||||||
OnClientClick="return confirm('¿Eliminar la versión vigente? Los trámites que la requieren quedarán pendientes.');"
|
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">
|
<asp:Panel ID="CamposArchivo" runat="server">
|
||||||
<p><asp:Literal ID="ReglasArchivo" runat="server" Mode="Encode" /></p>
|
<p><asp:Literal ID="ReglasArchivo" runat="server" Mode="Encode" /></p>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="Archivo" Text="Archivo" />
|
<label>Archivo</label>
|
||||||
<asp:FileUpload ID="Archivo" runat="server" CssClass="form-control" />
|
<input id="Archivo" runat="server" type="hidden"
|
||||||
|
class="ADSdropzoneLocal" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="FechaDocumento" Text="Fecha del documento" />
|
<asp:Label runat="server" AssociatedControlID="FechaDocumento" Text="Fecha del documento" />
|
||||||
@@ -118,6 +156,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</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:Panel ID="CamposNota" runat="server">
|
||||||
<asp:Label runat="server" AssociatedControlID="Nota" Text="Nota / motivo" />
|
<asp:Label runat="server" AssociatedControlID="Nota" Text="Nota / motivo" />
|
||||||
<asp:TextBox ID="Nota" runat="server" TextMode="MultiLine" Rows="3" CssClass="form-control" />
|
<asp:TextBox ID="Nota" runat="server" TextMode="MultiLine" Rows="3" CssClass="form-control" />
|
||||||
@@ -130,6 +178,8 @@
|
|||||||
CausesValidation="false" OnClick="GuardarCarga" />
|
CausesValidation="false" OnClick="GuardarCarga" />
|
||||||
<asp:Button ID="GuardarSolicitud" runat="server" Text="Solicitar" CssClass="btn blue"
|
<asp:Button ID="GuardarSolicitud" runat="server" Text="Solicitar" CssClass="btn blue"
|
||||||
CausesValidation="false" OnClick="GuardarRequerimiento" />
|
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"
|
<asp:Button ID="GuardarCancelacion" runat="server" Text="Cancelar documento" CssClass="btn red"
|
||||||
CausesValidation="false" OnClick="CancelarDocumento" />
|
CausesValidation="false" OnClick="CancelarDocumento" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using SIG.Web.AppCode.Configuration;
|
using SIG.Web.AppCode.Configuration;
|
||||||
using SIG.Web.AppCode.Infrastructure.WebForms;
|
using SIG.Web.AppCode.Infrastructure.WebForms;
|
||||||
@@ -18,6 +17,8 @@ namespace SIG.Web.UserControl
|
|||||||
public event EventHandler Cambiado;
|
public event EventHandler Cambiado;
|
||||||
public event EventHandler AdministrarGisSolicitado;
|
public event EventHandler AdministrarGisSolicitado;
|
||||||
|
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
public int CveEtapaGis
|
public int CveEtapaGis
|
||||||
{
|
{
|
||||||
get { return DocumentoSeleccionado == null ? 0 : DocumentoSeleccionado.CveFraccionamientoEtapa; }
|
get { return DocumentoSeleccionado == null ? 0 : DocumentoSeleccionado.CveFraccionamientoEtapa; }
|
||||||
@@ -67,6 +68,8 @@ namespace SIG.Web.UserControl
|
|||||||
get { return DocumentosActuales.Count; }
|
get { return DocumentosActuales.Count; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected override void OnInit(EventArgs argumentos)
|
protected override void OnInit(EventArgs argumentos)
|
||||||
{
|
{
|
||||||
base.OnInit(argumentos);
|
base.OnInit(argumentos);
|
||||||
@@ -213,6 +216,15 @@ namespace SIG.Web.UserControl
|
|||||||
return;
|
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"] =
|
argumentos.Row.Attributes["data-sig-level"] =
|
||||||
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
fila.Nivel.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
@@ -223,44 +235,17 @@ namespace SIG.Web.UserControl
|
|||||||
|
|
||||||
if (!fila.EsGrupo)
|
if (!fila.EsGrupo)
|
||||||
{
|
{
|
||||||
|
argumentos.Row.CssClass =
|
||||||
|
(argumentos.Row.CssClass + " sig-grid-fila-dato").Trim();
|
||||||
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
argumentos.Row.Attributes["data-sig-item-row"] = "1";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int columnasVisibles = Documentos.Columns
|
|
||||||
.Cast<DataControlField>()
|
|
||||||
.Count(columna => columna.Visible);
|
|
||||||
|
|
||||||
argumentos.Row.Cells.Clear();
|
|
||||||
argumentos.Row.CssClass = "sig-grid-grupo";
|
argumentos.Row.CssClass = "sig-grid-grupo";
|
||||||
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
argumentos.Row.Attributes["data-sig-group-row"] = "1";
|
||||||
argumentos.Row.Attributes["data-sig-group-id"] = fila.GroupId;
|
argumentos.Row.Attributes["data-sig-group-id"] = fila.GroupId;
|
||||||
argumentos.Row.Attributes["data-sig-expanded-default"] =
|
argumentos.Row.Attributes["data-sig-expanded-default"] =
|
||||||
fila.AbiertoInicialmente ? "true" : "false";
|
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
|
public sealed class FilaDocumentoEtapa
|
||||||
@@ -303,6 +288,11 @@ namespace SIG.Web.UserControl
|
|||||||
get { return Documento == null ? string.Empty : Documento.EstadoDocumento; }
|
get { return Documento == null ? string.Empty : Documento.EstadoDocumento; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool EsRequerido
|
||||||
|
{
|
||||||
|
get { return Documento != null && Documento.EsRequerido; }
|
||||||
|
}
|
||||||
|
|
||||||
public string Nota
|
public string Nota
|
||||||
{
|
{
|
||||||
get { return Documento == null ? string.Empty : Documento.Nota; }
|
get { return Documento == null ? string.Empty : Documento.Nota; }
|
||||||
@@ -401,6 +391,12 @@ namespace SIG.Web.UserControl
|
|||||||
case "Aprobar":
|
case "Aprobar":
|
||||||
case "CancelarDocumento":
|
case "CancelarDocumento":
|
||||||
return documento.PuedeRevisar;
|
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":
|
case "Eliminar":
|
||||||
return documento.TieneArchivo && documento.PuedeActualizarArchivo;
|
return documento.TieneArchivo && documento.PuedeActualizarArchivo;
|
||||||
default:
|
default:
|
||||||
@@ -455,6 +451,18 @@ namespace SIG.Web.UserControl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argumentos.CommandName == "QuitarRequerido")
|
||||||
|
{
|
||||||
|
CambiarRequerido(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argumentos.CommandName == "ActivarRequerido")
|
||||||
|
{
|
||||||
|
CambiarRequerido(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (argumentos.CommandName == "AdministrarGis")
|
if (argumentos.CommandName == "AdministrarGis")
|
||||||
{
|
{
|
||||||
if (AdministrarGisSolicitado != null)
|
if (AdministrarGisSolicitado != null)
|
||||||
@@ -479,11 +487,31 @@ namespace SIG.Web.UserControl
|
|||||||
ConfigurarFormulario("Cargar", DocumentoSeleccionado.TipoDocumento);
|
ConfigurarFormulario("Cargar", DocumentoSeleccionado.TipoDocumento);
|
||||||
ReglasArchivo.Text = "Permitidos: " + contexto.Data.ExtensionesPermitidas +
|
ReglasArchivo.Text = "Permitidos: " + contexto.Data.ExtensionesPermitidas +
|
||||||
(contexto.Data.TamanoMaximoMb.HasValue ? " · Máximo " + contexto.Data.TamanoMaximoMb + " MB" : "");
|
(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);
|
FechaVencimiento.Text = FormatearFecha(contexto.Data.FechaVencimientoAnterior);
|
||||||
Nota.Text = contexto.Data.ComentarioClienteAnterior ?? string.Empty;
|
Nota.Text = contexto.Data.ComentarioClienteAnterior ?? string.Empty;
|
||||||
MostrarFormulario();
|
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")
|
else if (argumentos.CommandName == "Aprobar")
|
||||||
{
|
{
|
||||||
Revisar(true);
|
Revisar(true);
|
||||||
@@ -518,7 +546,8 @@ namespace SIG.Web.UserControl
|
|||||||
{
|
{
|
||||||
DateTime? fecha;
|
DateTime? fecha;
|
||||||
DateTime? vencimiento;
|
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))
|
!LeerFecha(FechaDocumento.Text, out fecha) || !LeerFecha(FechaVencimiento.Text, out vencimiento))
|
||||||
{
|
{
|
||||||
MostrarFormulario();
|
MostrarFormulario();
|
||||||
@@ -527,8 +556,8 @@ namespace SIG.Web.UserControl
|
|||||||
}
|
}
|
||||||
var resultado = AppServices.TramiteDocumentoService.Upload(
|
var resultado = AppServices.TramiteDocumentoService.Upload(
|
||||||
CveFraccionamientoActual, 0, DocumentoSeleccionado.CveTipoDocumento,
|
CveFraccionamientoActual, 0, DocumentoSeleccionado.CveTipoDocumento,
|
||||||
Archivo.FileName, Archivo.PostedFile.ContentType, Archivo.PostedFile.InputStream,
|
archivo.FileName, archivo.ContentType, archivo.InputStream,
|
||||||
Archivo.PostedFile.ContentLength, Nota.Text, Usuario.CveUsuario, Usuario.NombreDominio,
|
archivo.ContentLength, Nota.Text, Usuario.CveUsuario, Usuario.NombreDominio,
|
||||||
fecha, vencimiento, DocumentoSeleccionado.CveFraccionamientoEtapa);
|
fecha, vencimiento, DocumentoSeleccionado.CveFraccionamientoEtapa);
|
||||||
if (!resultado.Success)
|
if (!resultado.Success)
|
||||||
{
|
{
|
||||||
@@ -539,6 +568,39 @@ namespace SIG.Web.UserControl
|
|||||||
Terminar("Documento guardado; pendiente de revisión.");
|
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)
|
protected void CancelarDocumento(object origen, EventArgs argumentos)
|
||||||
{
|
{
|
||||||
Revisar(false);
|
Revisar(false);
|
||||||
@@ -688,17 +750,70 @@ namespace SIG.Web.UserControl
|
|||||||
Terminar("Requerimiento guardado.");
|
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)
|
private void ConfigurarFormulario(string accion, string titulo)
|
||||||
{
|
{
|
||||||
bool cargar = accion == "Cargar";
|
bool cargar = accion == "Cargar";
|
||||||
bool solicitar = accion == "Solicitar";
|
bool solicitar = accion == "Solicitar";
|
||||||
bool cancelar = accion == "CancelarDocumento";
|
bool cancelar = accion == "CancelarDocumento";
|
||||||
|
bool editarVencimiento = accion == "EditarVencimiento";
|
||||||
TituloFormulario.Text = titulo;
|
TituloFormulario.Text = titulo;
|
||||||
CamposArchivo.Visible = cargar;
|
CamposArchivo.Visible = cargar;
|
||||||
CamposSolicitud.Visible = solicitar;
|
CamposSolicitud.Visible = solicitar;
|
||||||
|
CamposVencimiento.Visible = editarVencimiento;
|
||||||
CamposNota.Visible = cargar || cancelar;
|
CamposNota.Visible = cargar || cancelar;
|
||||||
GuardarArchivo.Visible = cargar;
|
GuardarArchivo.Visible = cargar;
|
||||||
GuardarSolicitud.Visible = solicitar;
|
GuardarSolicitud.Visible = solicitar;
|
||||||
|
GuardarVencimiento.Visible = editarVencimiento;
|
||||||
GuardarCancelacion.Visible = cancelar;
|
GuardarCancelacion.Visible = cancelar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,8 @@
|
|||||||
<asp:Literal ID="DatosArchivo" runat="server" Mode="Encode" />
|
<asp:Literal ID="DatosArchivo" runat="server" Mode="Encode" />
|
||||||
</p>
|
</p>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="Archivo" Text="Archivo" />
|
<label>Archivo</label>
|
||||||
<asp:FileUpload ID="Archivo" runat="server" CssClass="form-control" />
|
<input id="Archivo" runat="server" type="hidden" class="ADSdropzoneLocal" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:Label runat="server" AssociatedControlID="FechaDocumento" Text="Fecha del documento" />
|
<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 Cambiado;
|
||||||
public event EventHandler MostrarSolicitado;
|
public event EventHandler MostrarSolicitado;
|
||||||
|
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
private int CveSolicitudActual
|
private int CveSolicitudActual
|
||||||
{
|
{
|
||||||
get { return (int?)ViewState["CveSolicitudActual"] ?? 0; }
|
get { return (int?)ViewState["CveSolicitudActual"] ?? 0; }
|
||||||
@@ -44,6 +46,8 @@ namespace SIG.Web.UserControl
|
|||||||
get { return AppServices.UserContext.GetCurrentUser(); }
|
get { return AppServices.UserContext.GetCurrentUser(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected override void OnInit(EventArgs argumentos)
|
protected override void OnInit(EventArgs argumentos)
|
||||||
{
|
{
|
||||||
base.OnInit(argumentos);
|
base.OnInit(argumentos);
|
||||||
@@ -192,10 +196,15 @@ namespace SIG.Web.UserControl
|
|||||||
TramiteDocumentoUploadContextModel contexto = resultado.Data;
|
TramiteDocumentoUploadContextModel contexto = resultado.Data;
|
||||||
DatosArchivo.Text = "Permitidos: " + contexto.ExtensionesPermitidas +
|
DatosArchivo.Text = "Permitidos: " + contexto.ExtensionesPermitidas +
|
||||||
(contexto.TamanoMaximoMb.HasValue ? " · Máximo " + contexto.TamanoMaximoMb + " MB" : "");
|
(contexto.TamanoMaximoMb.HasValue ? " · Máximo " + contexto.TamanoMaximoMb + " MB" : "");
|
||||||
FechaDocumento.Text = contexto.FechaDocumentoAnterior.HasValue
|
CargaArchivoWebHelper.Configurar(
|
||||||
? contexto.FechaDocumentoAnterior.Value.ToString("yyyy-MM-dd") : "";
|
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
|
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 ?? "";
|
ComentarioDocumento.Text = contexto.ComentarioClienteAnterior ?? "";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -209,7 +218,8 @@ namespace SIG.Web.UserControl
|
|||||||
{
|
{
|
||||||
DateTime? fecha;
|
DateTime? fecha;
|
||||||
DateTime? vencimiento;
|
DateTime? vencimiento;
|
||||||
if (!Archivo.HasFile || string.IsNullOrEmpty(TipoDocumento.SelectedValue))
|
var archivo = CargaArchivoWebHelper.ObtenerArchivo(Page, Archivo);
|
||||||
|
if (archivo == null || string.IsNullOrEmpty(TipoDocumento.SelectedValue))
|
||||||
{
|
{
|
||||||
MostrarDocumento();
|
MostrarDocumento();
|
||||||
Avisar("Seleccione un documento y un archivo.");
|
Avisar("Seleccione un documento y un archivo.");
|
||||||
@@ -227,8 +237,8 @@ namespace SIG.Web.UserControl
|
|||||||
AppServices.TramiteDocumentoService.Upload(
|
AppServices.TramiteDocumentoService.Upload(
|
||||||
CveFraccionamientoActual, CveSolicitudActual,
|
CveFraccionamientoActual, CveSolicitudActual,
|
||||||
Convert.ToInt32(TipoDocumento.SelectedValue, CultureInfo.InvariantCulture),
|
Convert.ToInt32(TipoDocumento.SelectedValue, CultureInfo.InvariantCulture),
|
||||||
Archivo.FileName, Archivo.PostedFile.ContentType,
|
archivo.FileName, archivo.ContentType,
|
||||||
Archivo.PostedFile.InputStream, Archivo.PostedFile.ContentLength,
|
archivo.InputStream, archivo.ContentLength,
|
||||||
ComentarioDocumento.Text, Usuario.CveUsuario, Usuario.NombreDominio,
|
ComentarioDocumento.Text, Usuario.CveUsuario, Usuario.NombreDominio,
|
||||||
fecha, vencimiento);
|
fecha, vencimiento);
|
||||||
if (!resultado.Success)
|
if (!resultado.Success)
|
||||||
|
|||||||
Reference in New Issue
Block a user