Solicitudes documentos adjuntos
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C328
This commit is contained in:
parent
2796285ffe
commit
21bf9a1cfc
11 changed files with 92 additions and 2 deletions
|
|
@ -51,6 +51,9 @@ namespace AYA.SlnSinort.WCF
|
|||
[OperationContract]
|
||||
List<Roles> ObtenerRol();
|
||||
|
||||
//[OperationContract]
|
||||
//List<CatalogosJSON> ObtenerUsuarioExperto();
|
||||
|
||||
[OperationContract]
|
||||
BaseJson InsertarActualizarRol(Roles model);
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -156,6 +156,25 @@ namespace AYA.SlnSinort.WCF
|
|||
return respuesta;
|
||||
}
|
||||
|
||||
//public List<CatalogosJSON> ObtenerUsuarioExperto(CatalogosPostJSON model)
|
||||
//{
|
||||
|
||||
// List<CatalogosJSON> respuesta = null;
|
||||
// CatalogosPostJSON CatalogosPostJSON = new CatalogosPostJSON();
|
||||
// CatalogosPostJSON.filtro = model.filtro;
|
||||
// CatalogosPostJSON.IdTipo = model.IdTipo;
|
||||
// try
|
||||
// {
|
||||
// respuesta = new RolesDAL().ObtenerUsuarioExperto(CatalogosPostJSON);
|
||||
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// log.Error(ex);
|
||||
// }
|
||||
// return respuesta;
|
||||
//}
|
||||
|
||||
public BaseJson InsertarActualizarRol(Roles model)
|
||||
{
|
||||
BaseJson respuesta = new BaseJson();
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ this.CargarFormulario = function (data) {
|
|||
|
||||
var model = data;
|
||||
|
||||
$("#txtDocumentoAdjunto").val(model.Solicitud.DescripcionDocumento);
|
||||
$("#txtUsuarioSistema").val(model.Solicitud.UsuarioSistema);
|
||||
$("#txtCargoActual").val(model.Solicitud.CargoActual);
|
||||
$("#txtNombreAreaFuncional").val(model.Solicitud.NombreAreaFuncional);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ var IdTipoSolicitud;
|
|||
var DescTipoSolicitud;
|
||||
var IdSolicitud;
|
||||
var DescTipoproyecto;
|
||||
var modelDocumentoAdjunto;
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
|
|
@ -268,6 +269,11 @@ this.GuardarSolicitud = function () {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (IsNullOrEmpty(modelDocumentoAdjunto)) {
|
||||
toastr.warning("Antes de continuar; debe de ingresar un Documento Técnico.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!confirm("Va a ingresar una nueva solicitud de "+ DescTipoSolicitud +".\n ¿Desea continuar?"))
|
||||
{ return; }
|
||||
|
||||
|
|
@ -336,6 +342,8 @@ this.LeerFormulario = function () {
|
|||
var Solicitud
|
||||
= {
|
||||
IdTipoSolicitud: IdTipoSolicitud,
|
||||
IdDocumento: IsNullOrEmpty(modelDocumentoAdjunto) ? 0 : modelDocumentoAdjunto.Adjuntos.IdDocumentoAdjunto,
|
||||
DescripcionDocumento: IsNullOrEmpty(modelDocumentoAdjunto) ? 0 : modelDocumentoAdjunto.Adjuntos.Nombre,
|
||||
DescripcionTipoSolicitud: DescTipoSolicitud,
|
||||
UsuarioSistema: $("#txtUsuarioSistema").val(),
|
||||
CargoActual: $("#txtCargoActual").val(),
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ this.CargarFormulario = function (data) {
|
|||
|
||||
var model = data;
|
||||
|
||||
$("#txtDocumentoAdjunto").val(model.Solicitud.DescripcionDocumento);
|
||||
$("#txtUsuarioSistema").val(model.Solicitud.UsuarioSistema);
|
||||
$("#txtCargoActual").val(model.Solicitud.CargoActual);
|
||||
$("#txtNombreAreaFuncional").val(model.Solicitud.NombreAreaFuncional);
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ this.CargarFormulario = function (data) {
|
|||
|
||||
var model = data;
|
||||
|
||||
$("#txtDocumentoAdjunto").val(model.Solicitud.DescripcionDocumento);
|
||||
$("#txtUsuarioSistema").val(model.Solicitud.UsuarioSistema);
|
||||
$("#txtCargoActual").val(model.Solicitud.CargoActual);
|
||||
$("#txtNombreAreaFuncional").val(model.Solicitud.NombreAreaFuncional);
|
||||
|
|
|
|||
|
|
@ -173,6 +173,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Documento adjunto---------------------------------------------------------*@
|
||||
<div class="form-group " id="divDocumentoAdjunto">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblDocumentoAdjunto">Documento Adjunto</label>
|
||||
<div class="input-group col-lg-8 col-md-6 col-sm-6 col-xs-6">
|
||||
<input name="txtDocumentoAdjunto" class="form-control imput-xs" id="txtDocumentoAdjunto" readonly style="cursor: not-allowed;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Usuario Sistema---------------------------------------------------------*@
|
||||
<div class="form-group " id="divUsuarioSistema">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblUsuarioSistema">Usuario</label>
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Documento adjunto---------------------------------------------------------*@
|
||||
<div class="form-group " id="divDocumentoAdjunto">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblDocumentoAdjunto">Documento Adjunto</label>
|
||||
<div class="input-group col-lg-8 col-md-6 col-sm-6 col-xs-6">
|
||||
<input name="txtDocumentoAdjunto" class="form-control imput-xs" id="txtDocumentoAdjunto" readonly style="cursor: not-allowed;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Usuario Sistema---------------------------------------------------------*@
|
||||
<div class="form-group " id="divUsuarioSistema">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblUsuarioSistema">Usuario</label>
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@
|
|||
@*---------------------Justifiacion Solicitud---------------------------------------------------------*@
|
||||
<div class="form-group " id="divJustifiacion">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblJustifiacion">Justificación de la solicitud</label>
|
||||
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||
<textarea name="txtAreaJustifiacion" rows="6" cols="43" id="txtAreaJustifiacion" style="resize: none"></textarea>
|
||||
<div class="input-group input-group-text col-lg-6 col-md-8 col-sm-8 col-xs-8">
|
||||
<textarea name="txtAreaJustifiacion" class="form-control" rows="6" id="txtAreaJustifiacion" style="resize: none"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Documento adjunto---------------------------------------------------------*@
|
||||
<div class="form-group " id="divDocumentoAdjunto">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblDocumentoAdjunto">Documento Adjunto</label>
|
||||
<div class="input-group col-lg-8 col-md-6 col-sm-6 col-xs-6">
|
||||
<input name="txtDocumentoAdjunto" class="form-control imput-xs" id="txtDocumentoAdjunto" readonly style="cursor: not-allowed;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Usuario Sistema---------------------------------------------------------*@
|
||||
<div class="form-group " id="divUsuarioSistema">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblUsuarioSistema">Usuario</label>
|
||||
|
|
|
|||
|
|
@ -176,5 +176,38 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Obtener usuarios funcional experto
|
||||
|
||||
public List<CatalogosJSON> ObtenerUsuarioExperto(CatalogosPostJSON model)
|
||||
{
|
||||
List<CatalogosJSON> registros = null;
|
||||
string filtro = model != null ? model.filtro : null;
|
||||
|
||||
try
|
||||
{
|
||||
using (SinortContex db = new SinortContex())
|
||||
{
|
||||
registros = db.Roles.Where(t => t.Estado == true && t.Descripcion == "Usuario funcional experto".ToString() && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
||||
//.Include(y => y.Usuario)
|
||||
.Select(t => new CatalogosJSON()
|
||||
{
|
||||
codigo = t.IdRol.ToString(),
|
||||
descripcion = t.Descripcion,
|
||||
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
log.Error(ex);
|
||||
throw ex;
|
||||
}
|
||||
|
||||
return registros;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue