Cambios 16/02/2021

git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C535
This commit is contained in:
kledezma 2021-02-16 23:18:53 +00:00
parent 1664a4bf97
commit 0df97e866b
7 changed files with 398 additions and 23 deletions

Binary file not shown.

Binary file not shown.

View file

@ -111,6 +111,7 @@
//window.location = strRuta;
window.open(strRuta , '', '_blank', 'width=500,height=245,left=350,top=400');
}
</script>
<style type="text/css">
body {
@ -334,23 +335,112 @@
</tr>
<tr>
<td colspan="2" style="text-align: center">
<td >
<div id="dvCheckFirmado">
<asp:CheckBox ID="chkFirmado" runat="server" Checked="true" Visible="false" Text="Validar firma digital"/>
</div>
&nbsp;
<div id="dvCheckNotificacion">
<asp:CheckBox ID="chkNotificacion" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="chkNotificacion_CheckedChanged" Visible="false" Text="Notificar al Usuario"/>
</div>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnNuevoCarta" runat="server" OnClick="btnNuevaCarta_Click" Text="Nuevo" Visible="false"/>
<asp:Button ID="btnFinalizar" runat="server" CssClass="botones" OnClick="btnFinalizar_Click" Text="Finalizar" />
</td>
</td>
</tr>
</table>
<br />
<br />
<div id="divNotificacion" runat="server" visible="false" class="panel panel-primary">
<div class="panel-heading">
<h4 class="">Notificar al usuario</h4>
</div>
<div id="div1" runat="server" visible="true">
<%--Consultar--%>
<div >
<table id="tbNotificacion" class="table-responsive">
<tr>
<td colspan="2">
</h4>
</td>
<tr>
<td>Tipo de notificación &nbsp; </td>
<td>
<asp:DropDownList ID="ddlTipoRevision" runat="server" AutoPostBack="true" CssClass="ddlS" OnSelectedIndexChanged="ddlTipoRevision_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Correo electrónico" Value="1"></asp:ListItem>
<asp:ListItem Text="Teléfono" Value="2"></asp:ListItem>
<asp:ListItem Text="Documento fisico" Value="3"></asp:ListItem>
</asp:DropDownList>
&nbsp;
<div id="dvExaminar" runat="server" visible="false">
<input type="file" id="btnFileUpload" accept="application/pdf" class="FileUpload" onclick="llamarUpload();" name="file" />
<ul id="documentosPorSubir" class="etiqueta">
</ul>
<asp:Button ID="btnSubirarchivo" runat="server" CssClass="botones" OnClick="btnSubirarchivo_Click" Text="Adjuntar" Visible="true" />
</div>
</td>
</tr>
<tr>
<td>Teléfono/Correo </td>
<td>
<asp:TextBox ID="txtDestinatario" runat="server" CssClass="textBox"></asp:TextBox>
</td>
</tr>
<tr>
<td>Observaciones </td>
<td>
<asp:TextBox ID="txtObservaciones" runat="server" CssClass="textBox" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td>CFIA </td>
<td>
<asp:CheckBox ID="chkCFIA" runat="server" Enabled="false"/>
</td>
</tr>
</tr>
</table>
<div class="row">
<asp:GridView ID="grvListaAdjuntos" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="2" Font-Names="Verdana" Font-Size="16px" GridLines="None" OnPageIndexChanging="grvListaAdjuntos_PageIndexChanging" OnRowCommand="grvListaAdjuntos_RowCommand" OnRowDataBound="grvListaAdjuntos_RowDataBound" PageSize="5" Width="50%">
<RowStyle BackColor="#EFF3FB" VerticalAlign="Middle" />
<AlternatingRowStyle BackColor="White" VerticalAlign="Middle" />
<PagerStyle CssClass="gridViewPaginacion" ForeColor="#44608c" HorizontalAlign="Center" />
<HeaderStyle CssClass="gridViewHeader" Font-Bold="True" ForeColor="White" />
<PagerSettings PageButtonCount="25" />
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<%-- <input id="chkHeader" onclick="CheckAllGridViewItems(this);" type="checkbox" name="chkHeader" runat="server" />--%>
</HeaderTemplate>
<ItemTemplate>
<input id="chkItem" type="checkbox" name="chkItem" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="PKADJUNTOSOLICITUD" HeaderText="ID" SortExpression="PKADJUNTOSOLICITUD">
<HeaderStyle Width="10%" />
</asp:BoundField>
<asp:BoundField DataField="NOMBREADJUNTOSOLICITUD" HeaderText="Adjunto">
<HeaderStyle Width="45%" Wrap="true" />
<ItemStyle Wrap="true" />
</asp:BoundField>
<asp:BoundField DataField="DESCRIPCIONADJUNTOSOLICITUD" HeaderText="Descripcion">
<HeaderStyle Width="35%" />
</asp:BoundField>
<asp:ButtonField ButtonType="Image" CommandName="ver" ImageUrl="~/Images/MiniBotones/ConsultarExpediente.png" />
<asp:BoundField DataField="NUMEROSOLICITUDSOLICITUD" HeaderText="" SortExpression="NUMEROSOLICITUDSOLICITUD" />
<asp:BoundField DataField="ENVIOCORREOADJUNTOSOLICITUD" HeaderText="" SortExpression="ENVIOCORREOADJUNTOSOLICITUD" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
<%--Botonera Superior--%>
</div>
<br />

View file

@ -123,7 +123,7 @@ public partial class Forms_Trans_frwCartaSolicitud : General
{
try
{
strPKSolicitudTMP = Session["PKSOLICITUD"].ToString();
ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnNuevoCarta);
ScriptManager.GetCurrent(Page).RegisterPostBackControl(grvListaCartaSolicitud);
@ -152,6 +152,7 @@ public partial class Forms_Trans_frwCartaSolicitud : General
}
if (Request["d"].ToString() == "firmar")
chkFirmado.Visible = true;
chkNotificacion.Visible = true;
}
if ((!IsPostBack) && (Session.Count > 0))
@ -196,6 +197,265 @@ public partial class Forms_Trans_frwCartaSolicitud : General
}
}
protected void btnSalirNotificacionCliente_Click(object sender, EventArgs e)
{
try
{
//string pdfPathDocumentos = ConfigurationManager.AppSettings["RutaPdfAdjuntosSql"].ToString() + @"\" + Session["SOLICITUD"].ToString().Trim();
//if (Directory.Exists(pdfPathDocumentos))
// Directory.Delete(pdfPathDocumentos, true);
EjecutarScript("VentanaCerrarNotificacionCliente();VentanaAbrirActividades();");
//CargarImagenesSeguimientoActividades(int.Parse(Session["PKPROGRAMACION"].ToString()));
}
catch (Exception ex)
{
EjecutarScript("window.parent.VentanaCerrarNotificacionClienteSesion();");
}
}
public void limpiarCampos() //M2
{
txtDestinatario.Text = string.Empty;
txtObservaciones.Text = string.Empty;
}
protected void ddlTipoRevision_SelectedIndexChanged(object sender, EventArgs e) //M3
{
try
{
limpiarCampos();
if (ddlTipoRevision.SelectedValue == "3")
dvExaminar.Visible = true;
else
dvExaminar.Visible = false;
}
catch (Exception ex)
{
MensajeError("Error en R3M3", ex);
}
}
private bool SubirDocumentos(string strAccion)
{
bool bRespuesta = true;
string rutaAdjuntos = string.Empty;
try
{
String path = ConfigurationManager.AppSettings["DocumentosPDF"].ToString() + @"\" + lblNumSolicitud.Text.Trim() + @"\DocumentosREQ\";
DirectoryInfo di = new DirectoryInfo(path);
foreach (var fi in di.GetFiles())
{
string ext = Path.GetExtension(fi.Name);
if (ext == ".pdf" || ext == ".PDF")
{
//string targetUrl = "'../../../DocumentosPDF/" + lblNumSolicitud.Text.Trim() + @"/";
string fname = Path.GetFileName(fi.Name);
//subir documentos a vision 2020
Documento oDoc = new Documento();
string fileDirectory = path + fi.Name.Replace(" ", "_");
//se transaforma el archivo a un arreglo de bytes
byte[] bDoc = System.IO.File.ReadAllBytes(fileDirectory);
string nombreAdjunto = fi.Name.Replace(".pdf", "");
//se carga el archivo y el registro a vision 2020
string strResultado = oDoc.Archivar_Documento(lblNumSolicitud.Text.Trim() + "|" + "Otros", fi.Name.Replace(" ", "_"), bDoc);
if (strResultado != string.Empty)
bRespuesta = false;
else
{
bRespuesta = true;
File.Delete(fileDirectory);
}
}
}
}
catch (Exception ex)
{
bRespuesta = false;
MensajeError("Se dio un error al subir los documentos....", ex);
}
return bRespuesta;
}
string strPKSolicitudTMP = "0";
private DataSet obtenerAdjuntos()
{
DataSet dsResult = new DataSet();
try
{
adjuntoBL objAdjuntoBL = new adjuntoBL();
objAdjuntoBL.objadjuntoEL.FKSOLICITUD = int.Parse(strPKSolicitudTMP);
//objAdjuntoBL.objadjuntoEL.FKREUTILIZA = int.Parse(strPKReutiliza);
char[] separadorColumna = { '-' };
string[] arrSolicitud = Session["SOLICITUD"].ToString().Split(separadorColumna);
objAdjuntoBL.objadjuntoEL.NUMEROSOLICITUD = arrSolicitud[1].ToString();
dsResult = objAdjuntoBL.listarAdjuntos(null, false);
}
catch (Exception ex)
{
throw ex;
}
return dsResult;
}
private void llenarAdjuntos()
{
try
{
DataSet ds = obtenerAdjuntos();
if (ds.Tables[0].Rows.Count > 0)
{
//if (ds.Tables[0].Rows[0]["DESCRIPCIONDOCUMENTO"].ToString() != string.Empty)
{
grvListaAdjuntos.DataSource = ds;
grvListaAdjuntos.DataBind();
General.detalleGridView(ds, grvListaAdjuntos, null);
//mostrarFilaTabla(1);
// llenarRequisitos();
}
}
}
catch (Exception ex)
{
throw ex;
}
}
protected void grvListaAdjuntos_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
try
{
grvListaAdjuntos.PageIndex = e.NewPageIndex;
llenarAdjuntos();
}
catch (Exception ex)
{
MensajeError("Error en R3M3", ex);
}
}
protected void grvListaAdjuntos_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
int i = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = grvListaAdjuntos.Rows[i];
int nPk = int.Parse(selectedRow.Cells[1].Text);
//int nFKAdjunto = int.Parse(selectedRow.Cells[4].Text);
string strNombreAdjunto = selectedRow.Cells[2].Text.Replace(" ", "_");
if (e.CommandName == "ver")
{
string pdfPath = ConfigurationManager.AppSettings["DocumentosPDF"].ToString() + @"\" + selectedRow.Cells[5].Text + @"\DocumentosREQ\" + strNombreAdjunto;
string targetURL = "'../../DocumentosPDF/" + selectedRow.Cells[5].Text.Trim() + "/DocumentosREQ/" + strNombreAdjunto + "'";
if (System.IO.File.Exists(pdfPath))
{
EjecutarScript("abrirPDF(" + targetURL + ");");
}
else
{
string strResultado = "";
Documento oDoc = new Documento();
//consulta la ruta en la que se encuentra ubicado la copia del archivo a consultar
strResultado = oDoc.Consultar_Documento(selectedRow.Cells[5].Text.Trim() + "|Otros", selectedRow.Cells[5].Text.Trim(), strNombreAdjunto);
int nTop = 400;
if (strResultado != "" && strResultado != "No existe")
{
EjecutarScript("window.open('" + strResultado + "','','width=500,height=245,left=350,top=" + (nTop.ToString()) + "');");
}
else
{
EjecutarScript("MensajeInformativoCompleto('No se encontró el documento." + strNombreAdjunto + "');");
}
}
}
}
catch (Exception ex)
{
MensajeError("Error en R3M15", ex);
}
}
protected void grvListaAdjuntos_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
e.Row.Cells[5].Visible = false;//OCULTAR NUMERO DE SOLICITUD
if (e.Row.RowType == DataControlRowType.DataRow)
{
bool bEnvioCorreo = false;
if (e.Row.Cells[6].Text != "&nbsp;")
bEnvioCorreo = bool.Parse(e.Row.Cells[6].Text);
HtmlInputCheckBox chkTemp = (HtmlInputCheckBox)e.Row.Controls[0].Controls[1];
chkTemp.Checked = bEnvioCorreo;
}
e.Row.Cells[6].Visible = false;//OCULTAR ENVIOCORREO
}
catch (Exception)
{ }
}
protected void btnSubirarchivo_Click(object sender, EventArgs e)
{
try
{
string strRequisito = string.Empty;
//if(txtdescripcion.Text != string.Empty)
//{
bool bSubirDocs = SubirDocumentos(" ");
if (bSubirDocs)
{
llenarAdjuntos();
EjecutarScript("MensajeInformativo();");
}
//}
//else
//{
// MensajeAlerta("Debe agregar la descripción del requisito...");
//}
}
catch (Exception ex)
{
MensajeError("Se produjo un error en la operación", ex);
}
}
#endregion
#region Eventos Controles Web (R3)
@ -1894,7 +2154,32 @@ public partial class Forms_Trans_frwCartaSolicitud : General
#endregion
protected void chkNotificacion_CheckedChanged(object sender, EventArgs e)
{
try
{
if (chkNotificacion.Checked)
{
divNotificacion.Visible = true;
}
else
{
divNotificacion.Visible = false;
txtDestinatario.Text = "";
txtObservaciones.Text = "";
chkCFIA.Checked = false;
}
}
catch (Exception ex)
{
MensajeError("Se dio un error.", ex);
}
finally
{
EjecutarScript("inicializaTab('formulario');");
}
}
protected void grvListaCartaSolicitud_RowDataBound(object sender, GridViewRowEventArgs e)
{
@ -2083,11 +2368,12 @@ public partial class Forms_Trans_frwCartaSolicitud : General
byte[] bDoc = System.IO.File.ReadAllBytes(pdfPathConstancia);
//se carga el archivo y el registro a vision 2020
oDoc = new Documento();
string strResultado = oDoc.Archivar_Documento(strNumSolicitudTMP.ToString().Trim() + "|" + "Constancia", row["NOMBREDOCUMENTOCARTA"].ToString().Replace(" ", "_") + ".pdf", bDoc);
string strResultado = "";
if (strResultado == string.Empty)
{
oDoc = new Documento();
strResultado = oDoc.Consultar_Documento(strNumSolicitudTMP.ToString().Trim() + "|Constancia", row["NOMBREDOCUMENTOCARTA"].ToString().Replace(" ", "_"), row["NOMBREDOCUMENTOCARTA"].ToString().Replace(" ", "_") + ".pdf");
strResultado = "s";
if (strResultado != string.Empty && strResultado != "No existe")
{
//strResultado += pdfPath + ";"; ;
@ -2102,7 +2388,7 @@ public partial class Forms_Trans_frwCartaSolicitud : General
return;
}
}
//else
// bResultado = false;
@ -2188,7 +2474,7 @@ public partial class Forms_Trans_frwCartaSolicitud : General
strResultado = "EXISTE";
}
strResultado = oDoc.Visor_Documento(arrayNombre[1].ToString() + "-" + arrayNombre[2].ToString() + "-" + arrayNombre[3].ToString() + "|" + "Constancia", lblNumSolicitud.Text.Trim(), pdfPath, row["NOMBREDOCUMENTOCARTA"].ToString() + ".pdf");
strResultado = ".";
if (strResultado == string.Empty || strResultado == "No existe")
{

View file

@ -1369,7 +1369,7 @@ public partial class Forms_Trans_frwCriterioAS : General
txtSistemaAsociado.Text = dsAguaPotable.Tables[0].Rows[0]["SISTEMAASOCIADOINSPECCIONAP"].ToString();
txtLongitud.Text = dsAguaPotable.Tables[0].Rows[0]["LONGUITUDCROQUIS"].ToString();
txtLatitud.Text = dsAguaPotable.Tables[0].Rows[0]["LATITUDCROQUIS"].ToString();
txtOficioRecepcion.Text = dsAguaPotable.Tables[0].Rows[0]["CONDOMINIOINSPECCION"].ToString();
rblExisteNis.SelectedValue = dsAguaPotable.Tables[0].Rows[0]["TIENESERVICIOSOLICITUD"].ToString().ToLower();
if (rblExisteNis.SelectedValue == "true"){

View file

@ -2706,9 +2706,8 @@ public partial class Forms_Trans_frwGestionTrabajo : General
{
if (Session["SOLICITUD"] != null && Session["PKUSUARIOXDEPENDENCIA"] != null)
{
EjecutarScript("VentanaAbrirNotificacionCliente();");
var s = "qweqweqwe";
}
else
Response.Redirect("../wfrLogin.aspx?sesion=expiro", false);

View file

@ -30,13 +30,13 @@
<add key="Sistema" value="SISTEMA DE ADMINISTRACION DE SEGURIDAD"/>
<add key="AMBIENTE" value="AMBIENTE DE DESARROLLO"/>
<add key="LLAVEAPCR" value="7007B685-6BA9-4014-BE40-C486F61FEAE6"/>
<add key="DocumentosMachote" value="C:\Raiz2\SIGDD\DocumentosMachote"/>
<add key="DocumentosODT" value="C:\Raiz2\SIGDD\DocumentosODT"/>
<add key="DocumentosPDF" value="C:\Raiz2\SIGDD\DocumentosPDF"/>
<add key="DocumentosMachote" value="C:\SIGDD\DocumentosMachote"/>
<add key="DocumentosODT" value="C:\SIGDD\DocumentosODT"/>
<add key="DocumentosPDF" value="C:\SIGDD\DocumentosPDF"/>
<add key="AspPDF_RegKey" value="GYlbhSTuhBzuSEXhSunif/sB0qIibkxtJd/XgRDVhDEKPMKsIFKCREnORVOu1TlBySzUm0d1PTA/"/>
<add key="Imagenes" value="\\fileproyectos\FileDesarrollo\SIGDD\Images\Logos\logoAyA.png"/>
<add key="Imagenes" value="C:\SIGDD\Images\Logos\logoAyA.png"/>
<add key="TamañoArchivosBytes" value="20971520"/>
<add key="RutaPdfAdjuntosSql" value="C:\Raiz2\SIGDD\DocumentosPDF"/>
<add key="RutaPdfAdjuntosSql" value="C:\SIGDD\DocumentosPDF"/>
<add key="SIGLAS" value="SIGDD"/>
<!--CREDENCIALES PARA ACCESAR EL DIRECTORIO ASTATE-->
<add key="pActiveDirectory" value="disponibilidad"/>