From 7a18d716b21080e4843c6ccd4c57f6184f064836 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 12 May 2020 14:14:56 -0700 Subject: [PATCH 1/7] --- Ashx/SigFiles.ashx | 57 +++++++++ OI/CircularDetalleB.aspx.cs | 2 +- OI/ConvocatoriaDetalle.aspx.cs | 10 +- OI/MinutaDetalle.aspx.cs | 151 +++++++++++----------- OI/RepReuniones.aspx | 226 ++++++++++++++++++++++++++------- OI/RepReuniones.aspx.cs | 130 +++++++++++++++++++ 6 files changed, 451 insertions(+), 125 deletions(-) create mode 100644 Ashx/SigFiles.ashx diff --git a/Ashx/SigFiles.ashx b/Ashx/SigFiles.ashx new file mode 100644 index 000000000..708d6b7a6 --- /dev/null +++ b/Ashx/SigFiles.ashx @@ -0,0 +1,57 @@ +<%@ WebHandler Language="C#" Class="SigFiles" %> + +using System; +using System.Web; +using Extensiones; + +public class SigFiles : IHttpHandler +{ + + public void ProcessRequest(HttpContext context) + { + //context.Response.ContentType = "text/plain"; + //context.Response.Write("Hello World"); + string path = ""; + if (context.Request["FileUrl"] != null) + { + path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, context.Request["FileUrl"]); + + try + { + if (System.IO.File.Exists(path)) + { + System.IO.FileInfo file = new System.IO.FileInfo(path); + string mimeType = "text/plain"; + try + { + mimeType = MimeMapping.GetMimeMapping(path); + } + catch (Exception) { }//si truena no existe el arhivo + context.Response.Clear(); + context.Response.ClearHeaders(); + context.Response.ClearContent(); + context.Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}"); + context.Response.AddHeader("Content-Length", file.Length.ToString()); + context.Response.ContentType = mimeType; + context.Response.Flush(); + context.Response.TransmitFile(file.FullName); + + } + } + catch (Exception ex) + { + this.GuardaLog(ex.ToString()); + } + } + context.Response.End(); + } + + public bool IsReusable + { + get + { + return false; + } + } + +} \ No newline at end of file diff --git a/OI/CircularDetalleB.aspx.cs b/OI/CircularDetalleB.aspx.cs index b21ec8aaa..38f79bbe0 100644 --- a/OI/CircularDetalleB.aspx.cs +++ b/OI/CircularDetalleB.aspx.cs @@ -185,7 +185,7 @@ public partial class OI_CircularDetalleB : ClsPaginas { Filename = fileItem.filename; } - catch (Exception ) + catch (Exception ex) { ModExtensiones.OnError(this, "Ocurrió un error al obtener al archivo", ex); Filename = "-1"; diff --git a/OI/ConvocatoriaDetalle.aspx.cs b/OI/ConvocatoriaDetalle.aspx.cs index a2556f476..c6d9f3343 100644 --- a/OI/ConvocatoriaDetalle.aspx.cs +++ b/OI/ConvocatoriaDetalle.aspx.cs @@ -14,6 +14,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas public const string iddivAgregarTema = "divModalAgregartema"; public const string iddivAgregarMiembros = "iddivAgregarMiembros"; public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } } + public int RCveEventoPadre { get { return ViewState["RCveEventoPadre"] != null ? ViewState["RCveEventoPadre"].ToString().ToEntero() : 0; } set { ViewState["RCveEventoPadre"] = value; } } public bool EsNuevo { get { return Convert.ToBoolean(ViewState["EsNuevo"]); } set { ViewState["EsNuevo"] = value; } } public List LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List(); } return (List)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } } public List LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List(); } return (List)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } } @@ -29,8 +30,13 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas cargaUsuarios(); if (Request["CveEvento"] != null) + { + RCveEvento = Request["CveEvento"].ToString().ToEntero(); + } + if (Request["CveEventoPadre"] != null) { - RCveEvento = Request["CveEvento"].ToString().ToEntero(); + + RCveEventoPadre = Request["CveEventoPadre"].ToString().ToEntero(); } if (RCveEvento > 0) { @@ -349,7 +355,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas using (ClsOIEventos objOI = new ClsOIEventos()) { objOI.IniciaTransacSQL(); - Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text); + Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text,CveEventoPadre: RCveEventoPadre); CveEvento = objOI.CveEvento; Folio = objOI.Folio; diff --git a/OI/MinutaDetalle.aspx.cs b/OI/MinutaDetalle.aspx.cs index ca90c9953..8630d0ac0 100644 --- a/OI/MinutaDetalle.aspx.cs +++ b/OI/MinutaDetalle.aspx.cs @@ -766,7 +766,12 @@ public partial class OI_MinutaDetalle : ClsPaginas if (HuboError == false) { - Alert("La minuta se termino con exito.", ModExtensiones.TipoMensaje.MsgInformacion); + string script = ""; + if (agendar) + { + script = string.Format("location.replace(\"/OI/ConvocatoriaDetalle.aspx?CveEventoPadre={0}\");",RCveEvento ); + } + Alert("La minuta se termino con exito.", ModExtensiones.TipoMensaje.MsgInformacion,script); objOI.Commit(); } else @@ -1160,93 +1165,93 @@ public partial class OI_MinutaDetalle : ClsPaginas { cargarAgenda(); } - + bool agendar = false; protected void BtnTerminarYAgendar_Click(object sender, EventArgs e) { - string errorMessage = ""; + //string errorMessage = ""; - int cveUsuarioDe = UsuarioActual.CveUsuario; - List listaCCP = new List(); - //int cveUsuarioPara = CveUsuarioPara; + //int cveUsuarioDe = UsuarioActual.CveUsuario; + //List listaCCP = new List(); + ////int cveUsuarioPara = CveUsuarioPara; - OITipoEventos cveTipoEvento = OITipoEventos.Agenda; - string asunto = TxtAgendaAsunto.Text; - string descripcion = string.Format("siguiente reunión Minuta \"{0}\"", TxtAsunto.Text); - int prioridad = 1; - int cveAgendaTipo = 4; - string fechaInicio = ""; - string fechaFin = "1900/01/01 00:00"; - if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999) - { - if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999) - { - errorMessage = "No se ingresó una fecha de inicio valida"; + //OITipoEventos cveTipoEvento = OITipoEventos.Agenda; + //string asunto = TxtAgendaAsunto.Text; + //string descripcion = string.Format("siguiente reunión Minuta \"{0}\"", TxtAsunto.Text); + //int prioridad = 1; + //int cveAgendaTipo = 4; + //string fechaInicio = ""; + //string fechaFin = "1900/01/01 00:00"; + //if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999) + //{ + // if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999) + // { + // errorMessage = "No se ingresó una fecha de inicio valida"; - } - else - { - fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm"); - fechaFin = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").AddHours(2).ToString("yyyy/MM/dd HH:mm"); - } - } - else - { - fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm"); - fechaFin = txtFechaI.Text.ToDateTimeExcat().AddHours(2).ToString("yyyy/MM/dd HH:mm"); - } - int cveRevision = -1; - string archivoname = ""; + // } + // else + // { + // fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm"); + // fechaFin = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").AddHours(2).ToString("yyyy/MM/dd HH:mm"); + // } + //} + //else + //{ + // fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm"); + // fechaFin = txtFechaI.Text.ToDateTimeExcat().AddHours(2).ToString("yyyy/MM/dd HH:mm"); + //} + //int cveRevision = -1; + //string archivoname = ""; - int cveUsuarioIng = UsuarioActual.CveUsuario; - int cveEmpresa = UsuarioActual.CveEmpresa; - bool Continuar = true; - int Folio = -1; - int CveEvento = -1; + //int cveUsuarioIng = UsuarioActual.CveUsuario; + //int cveEmpresa = UsuarioActual.CveEmpresa; + //bool Continuar = true; + //int Folio = -1; + //int CveEvento = -1; - if (errorMessage.Length == 0) - { + //if (errorMessage.Length == 0) + //{ - List chkList = new List(); - using (ClsOIEventos objOI = new ClsOIEventos()) - { - objOI.IniciaTransacSQL(); - foreach (var cveUsuarioPara in LCveUsuarioCCP) - { - if (Continuar) - { - Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento, null, cveAgendaTipo); - CveEvento = objOI.CveEvento; - Folio = objOI.Folio; - if (CveEvento == 0) - { - Continuar = false; - } - } - } - if (Continuar) - { - objOI.Commit(); + // List chkList = new List(); + // using (ClsOIEventos objOI = new ClsOIEventos()) + // { + // objOI.IniciaTransacSQL(); + // foreach (var cveUsuarioPara in LCveUsuarioCCP) + // { + // if (Continuar) + // { + // Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento, null, cveAgendaTipo); + // CveEvento = objOI.CveEvento; + // Folio = objOI.Folio; + // if (CveEvento == 0) + // { + // Continuar = false; + // } + // } + // } + // if (Continuar) + // { + // objOI.Commit(); - } - else - { - objOI.RollBack(); - Continuar = false; - } - } - if (Continuar && CveEvento > 0) - { - - LnkTerminarMinuta_Click(null, null); - //this.Alert("Se ha agregadó la nueva agenda", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento)); - } - } + // } + // else + // { + // objOI.RollBack(); + // Continuar = false; + // } + // } + //if (Continuar && CveEvento > 0) + //{ + agendar = true; + LnkTerminarMinuta_Click(null, null); + //this.Alert("Se ha agregadó la nueva agenda", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento)); + // } + //} } diff --git a/OI/RepReuniones.aspx b/OI/RepReuniones.aspx index 75b7345d2..f0169055b 100644 --- a/OI/RepReuniones.aspx +++ b/OI/RepReuniones.aspx @@ -20,58 +20,186 @@ - + + + - - - - - - - - - - - - - - <%----%> - - - - - - - - - - - - + + + Reuniones + + + + + +
+
+
+ +
+
+
    +
  • Fecha Inicio:
  • +
  • +
    + + + + + + + + + + +
    +
  • +
  • Fecha Fin:
  • +
  • +
    + + + + + + + + + + +
    +
  • +
+
+
+
+
+
+ + + + + + <%#Eval("Asunto")%> + + + + + + + + <%----%> + + + + + + +
+
+ + + Minutas + + - - - - - - - - - - <%----%> - - - - - - - + + +
+
+
+ +
+
+
    +
  • Fecha Inicio:
  • +
  • +
    + + + + + + + + + + +
    +
  • +
  • Fecha Fin:
  • +
  • +
    + + + + + + + + + + +
    +
  • +
  • Estatus:
  • +
  • + + + + + +
  • +
+
+
+ +
+
+
+ + + + + + <%#Eval("Asunto")%> + + + + + + + + + <%----%> + + + + + + + -
-
-
+
+ +
+ +
diff --git a/OI/RepReuniones.aspx.cs b/OI/RepReuniones.aspx.cs index d242e8b60..3d96f3f8c 100644 --- a/OI/RepReuniones.aspx.cs +++ b/OI/RepReuniones.aspx.cs @@ -1,14 +1,144 @@ using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using Extensiones; public partial class OI_RepReuniones : ClsPaginas { protected void Page_Load(object sender, EventArgs e) { + if (!Page.IsPostBack) + { + // ORDEN ASIGNADAS + ViewState["Orden"] = ""; + + CargaFiltros(); + CargaDatosOIMinutas(); + CargaDatosReunion(); + } + + } + + + + + private void CargaFiltros() + { + TxtFechaI.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToShortDateString(); + TxtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtCFechaInicio.Text = TxtFechaI.Text; + TxtCFechaFin.Text = TxtFechaF.Text; + } + + public void CargaDatosReunion() + { + GVConvocatoria.DataSource = new DataTable(); + using (ClsOIEventos ObjProspectos = new ClsOIEventos()) + { + DateTime FechaI, FechaF; + FechaI = TxtCFechaInicio.Text.ToDate(); + FechaF = TxtCFechaFin.Text.ToDate(); + + if (ObjProspectos.GetRepEventos(-1, 11, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF)) + { GVConvocatoria.DataSource = ObjProspectos.DtResultados.FiltraParametros("","FechaInicio DESC"); } + } + + GVConvocatoria.DataBind(); + UpContenido.Update(); + } + public void CargaDatosOIMinutas() + { + using (ClsOIEventos ObjProspectos = new ClsOIEventos()) + { + + + DateTime FechaI, FechaF; + int CveEventoEstatus; + FechaI = TxtFechaI.Text.ToDate(); + FechaF = TxtFechaF.Text.ToDate(); + if (DdlEventoEstatus.SelectedValue.ToEntero() > 0) + CveEventoEstatus = DdlEventoEstatus.SelectedValue.ToEntero(); + else + CveEventoEstatus = -1; + + if (ObjProspectos.GetRepEventos(-1, 5, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF)) + ViewState["DTOIMinutas"] = ObjProspectos.DtResultados; + + } + + if (ViewState["Orden"].ToString() != string.Empty) { CargaGridOIMinutas(ViewState["Orden"].ToString()); } + else { CargaGridOIMinutas(""); } + + UpContenido.Update(); + } + + protected void GvDatosOIMinutas_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + // e.Row.Cells(0).Width = Unit.Pixel(100) 'FechaInicio + // e.Row.Cells(1).Width = Unit.Pixel(200) 'Asunto + // e.Row.Cells(2).Width = Unit.Pixel(550) 'Descripcion + // e.Row.Cells(3).Width = Unit.Pixel(70) 'TareasTotal + + //e.Row.FCLiteral("LtlFechaInicio").Text = string.Format("{1}", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("FechaInicio").ToDateTime().ToString("dd/MM/yyyy")); + //e.Row.FCLiteral("LtlAsunto").Text = string.Format("{1}", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("Asunto")); + } + } + + //protected void LbOrden_Click(object sender, EventArgs e) + //{ + // string Orden = ""; + // string Campo = ""; + // Literal Literal = null/* TODO Change to default(_) if this is not a reference type */; + // const string OrdenInicial = ""; + // string[] Arg = new string[3]; + + // Arg = (LinkButton)sender.CommandArgument().ToString.Split(';'); + // Campo = Arg[0]; + // Literal = (Literal)(LinkButton)sender.NamingContainer.FindControl("Img" + Campo.Replace(",", "_")); + + // if (ViewState(string.Format("O{0}", Campo)) != null && ViewState(string.Format("O{0}", Campo)).ToString == string.Format("{0} DESC", Campo)) + // { + // ViewState(string.Format("O{0}", Campo)) = string.Format("{0} ASC", Campo); + // Literal.Text = string.Format(""); + // } + // else + // { + // ViewState(string.Format("O{0}", Campo)) = string.Format("{0} DESC", Campo); + // Literal.Text = string.Format(""); + // } + // Orden = OrdenInicial + ViewState(string.Format("O{0}", Campo)).ToString; + // ViewState("Orden") = Orden; + // CargaGridOIMinutas(Orden); + //} + + private void CargaGridOIMinutas(string Orden) + { + if (Orden != string.Empty) + { + DataView DV = new DataView((DataTable)ViewState["DTOIMinutas"], "", Orden, DataViewRowState.CurrentRows); + GvDatosOIMinutas.DataSource = DV.ToTable(); + DV.Dispose(); + } + else { GvDatosOIMinutas.DataSource = (DataTable)ViewState["DTOIMinutas"]; } + GvDatosOIMinutas.DataBind(); + } + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + CargaDatosOIMinutas(); + UpContenido.Update(); + } + + protected void Button1_Click(object sender, EventArgs e) + { + CargaDatosReunion(); + UpContenido.Update(); } } \ No newline at end of file From 24737464747fc91c57bfc163c8103d83c334d2f1 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 12 May 2020 14:25:02 -0700 Subject: [PATCH 2/7] --- OI/ConvocatoriaDetalle.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OI/ConvocatoriaDetalle.aspx.cs b/OI/ConvocatoriaDetalle.aspx.cs index c6d9f3343..7bc0d0027 100644 --- a/OI/ConvocatoriaDetalle.aspx.cs +++ b/OI/ConvocatoriaDetalle.aspx.cs @@ -355,7 +355,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas using (ClsOIEventos objOI = new ClsOIEventos()) { objOI.IniciaTransacSQL(); - Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text,CveEventoPadre: RCveEventoPadre); + Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text,CveEventoPadre: (RCveEventoPadre>0? RCveEventoPadre:-1)); CveEvento = objOI.CveEvento; Folio = objOI.Folio; From 0aa441d799bd77cd9ae0b6a07fe2fea656822cc8 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 12 May 2020 15:22:41 -0700 Subject: [PATCH 3/7] --- Ashx/SigFiles.ashx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Ashx/SigFiles.ashx b/Ashx/SigFiles.ashx index 708d6b7a6..5f5ee0ad2 100644 --- a/Ashx/SigFiles.ashx +++ b/Ashx/SigFiles.ashx @@ -15,6 +15,13 @@ public class SigFiles : IHttpHandler if (context.Request["FileUrl"] != null) { path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, context.Request["FileUrl"]); + } + if (context.Request["UrlFile"] != null) + { + path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas,ModExtensiones.Decripta( context.Request["UrlFile"])); + } + if (path != null && path.Length>0) + { try { From faa9e3c129971a7085a954d641038856a9c02e47 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 12 May 2020 15:23:29 -0700 Subject: [PATCH 4/7] --- Ashx/SigFiles.ashx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ashx/SigFiles.ashx b/Ashx/SigFiles.ashx index 5f5ee0ad2..bb4a91d48 100644 --- a/Ashx/SigFiles.ashx +++ b/Ashx/SigFiles.ashx @@ -16,9 +16,9 @@ public class SigFiles : IHttpHandler { path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, context.Request["FileUrl"]); } - if (context.Request["UrlFile"] != null) + if (context.Request["P"] != null) { - path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas,ModExtensiones.Decripta( context.Request["UrlFile"])); + path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas,ModExtensiones.Decripta( context.Request["P"])); } if (path != null && path.Length>0) { From 70802869467526958b3550b837b23cca2c588188 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 12 May 2020 18:35:53 -0700 Subject: [PATCH 5/7] =?UTF-8?q?eFacturas=20=20Correci=C3=B3n=20Rutas=20al?= =?UTF-8?q?=20subir=20facturas=20por=20medio=20de=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/eFacturas.aspx.vb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 60ee8f5b2..94590d434 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -1269,7 +1269,7 @@ Partial Class Compras_eFacturas End If ObjDatos.Dispose() - If DT IsNot Nothing Then + If dt IsNot Nothing Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -1329,7 +1329,8 @@ Partial Class Compras_eFacturas filemove = fileItem.filename If filemove <> "" Then - filemove.FilesMove("", String.Format("{0}\Temp\Facturas", UsuarioActual.Empresa.Ruta)) + 'filemove.FilesMove("", String.Format("{0}\Temp\Facturas", UsuarioActual.Empresa.Ruta)) + filemove.FilesMove("", String.Format("Empresas\{0}\Temp\Facturas", UsuarioActual.CveEmpresa)) 'AGREGA XML A LA LISTA If FileExtension.ToUpper = "XML" Then ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, filemove)) @@ -1339,7 +1340,7 @@ Partial Class Compras_eFacturas Next - Dim fileEntries As String() = Directory.GetFiles(String.Format("{0}Empresas\{1}\Temp\Facturas", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) + Dim fileEntries As String() = Directory.GetFiles(String.Format("{0}Empresas\{1}\Temp\Facturas", Extensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)) Dim ListaDirectoriosTemporales As New List(Of String) Dim ListaComprimidos As New List(Of String) From dd658720c4613b63df5277b5782a39d4098f5d50 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 12 May 2020 19:00:17 -0700 Subject: [PATCH 6/7] correcion efacturas --- Compras/eFacturas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 94590d434..f59eed405 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -619,7 +619,7 @@ Partial Class Compras_eFacturas txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", ModExtensiones.DirectorioBaseEmpresas ,UsuarioActual.CveEmpresa & "\Compras\" - Ejecutable = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\ADSUtilerias.exe") + Ejecutable = "C:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe" Form.DefaultButton = BtnConsultar.UniqueID DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) From e018dc3e1faf85e41488a1e7b48c729adbcc2417 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 12 May 2020 20:02:18 -0700 Subject: [PATCH 7/7] firma de reporte para minas, reparado --- App_Code/ClsPaginas.vb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 87f743432..4d683e03b 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7189,10 +7189,15 @@ Public Class ClsPaginas End If 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString)) + Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol) + Dim RutaVirtuaSol As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={0}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaSol)) Dim FirmaSol As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioSol)) - params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol))).AbsoluteUri, ""))) + params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, RutaVirtuaSol, ""))) + + Dim RutaFisicaAut As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioAut) + Dim RutaVirtuaAut As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaAut)) Dim FirmaAut As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioAut)) - params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", EmpresaActual.CveEmpresa, CveUsuarioAut))).AbsoluteUri, ""))) + params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, RutaVirtuaAut, ""))) If Archivo.Exists Then bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)