-
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Web.UI.WebControls;
|
|||||||
using Extensiones;
|
using Extensiones;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Microsoft.Reporting.WebForms;
|
||||||
|
|
||||||
public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -255,7 +256,7 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
|||||||
protected void CargaPaqueterias()
|
protected void CargaPaqueterias()
|
||||||
{
|
{
|
||||||
DdlPaqueterias.Items.Clear();
|
DdlPaqueterias.Items.Clear();
|
||||||
DdlPaqueterias.DataSource = GlobalDTPaqueterias;
|
DdlPaqueterias.DataSource = get_GlobalDTPaqueterias(UsuarioActual.CveEmpresa);
|
||||||
DdlPaqueterias.DataBind();
|
DdlPaqueterias.DataBind();
|
||||||
DdlPaqueterias.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlPaqueterias.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
UPGuiasPorVincular.Update();
|
UPGuiasPorVincular.Update();
|
||||||
@@ -729,6 +730,38 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private byte[] DocumentoEntregaInterna()
|
||||||
|
{
|
||||||
|
ClsVentas ObjVentas = new ClsVentas();
|
||||||
|
if (ObjVentas.GetVenta(this.CveVenta, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
string ClienteNombre = ObjVentas.DtResultados.Rows[0]["ClienteNombre"].ToString();
|
||||||
|
string FolioVenta = ObjVentas.DtResultados.Rows[0]["SerieFolio"].ToString();
|
||||||
|
string Pedido = ObjVentas.DtResultados.Rows[0]["PedidoContrato"].ToString();
|
||||||
|
string OrdenCompra = ObjVentas.DtResultados.Rows[0]["OrdenCompra"].ToString();
|
||||||
|
string Guia = TxtGuia.Text;
|
||||||
|
string Rastreo = TxtRastreo.Text;
|
||||||
|
string Paqueteria = DdlPaqueterias.SelectedItem.Text;
|
||||||
|
DataTable DtDetalle = new DataTable();
|
||||||
|
if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||||
|
{
|
||||||
|
DtDetalle = ObjVentas.DtResultados;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||||
|
RepParams.Add(new ReportParameter("Cliente", ClienteNombre));
|
||||||
|
RepParams.Add(new ReportParameter("FolioVenta", FolioVenta));
|
||||||
|
RepParams.Add(new ReportParameter("Pedido", Pedido));
|
||||||
|
RepParams.Add(new ReportParameter("OrdenCompra", OrdenCompra));
|
||||||
|
RepParams.Add(new ReportParameter("Guia", Guia));
|
||||||
|
RepParams.Add(new ReportParameter("Rastreo", Rastreo));
|
||||||
|
RepParams.Add(new ReportParameter("Paqueteria", Paqueteria));
|
||||||
|
return StreamPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/GuiaExternaAsignada.rdlc", DtDetalle, RepParams, "Notificacion de Envio", "PDF", RDSName: "DsInventarios");
|
||||||
|
}
|
||||||
|
ObjVentas.Dispose();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private string getCorreoString()
|
private string getCorreoString()
|
||||||
{
|
{
|
||||||
ClsVentas ObjVentas = new ClsVentas();
|
ClsVentas ObjVentas = new ClsVentas();
|
||||||
@@ -739,7 +772,13 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
|||||||
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}",CveVendedor));
|
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}",CveVendedor));
|
||||||
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
|
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
|
||||||
|
|
||||||
string CorreosConcat = "{0};{1};{2};{3};{4}";
|
string CobranzaCorreo = Cliente["CobranzaCorreo"].ToString();
|
||||||
|
string CorreoEntregaAlmacen = Cliente["CorreoEntregaAlmacen"].ToString();
|
||||||
|
string CorreoEntregaCompras = Cliente["CorreoEntregaCompras"].ToString();
|
||||||
|
string CorreoVendedor = Vendedor["Correo"].ToString();
|
||||||
|
string CorreoAdicionalNotificacionesVendedor = Vendedor["CorreoAdicionalNotificaciones"].ToString();
|
||||||
|
|
||||||
|
string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CobranzaCorreo, CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoAdicionalNotificacionesVendedor);
|
||||||
return CorreosConcat;
|
return CorreosConcat;
|
||||||
}
|
}
|
||||||
ObjVentas.Dispose();
|
ObjVentas.Dispose();
|
||||||
@@ -750,8 +789,19 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
|||||||
{
|
{
|
||||||
Correos.GuardaLog();
|
Correos.GuardaLog();
|
||||||
|
|
||||||
|
byte[] ArchivoBinario = DocumentoEntregaInterna();
|
||||||
|
|
||||||
ClsSisMail MailCls = new ClsSisMail();
|
ClsSisMail MailCls = new ClsSisMail();
|
||||||
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, "Se enviara la compra a su dirección", "Pendiente", Correos);
|
List<ClsSisMail.ArchivoMail> LSRutasMail = new List<ClsSisMail.ArchivoMail>();
|
||||||
|
ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail();
|
||||||
|
|
||||||
|
{
|
||||||
|
var withBlock = itemMail;
|
||||||
|
itemMail.ArchivoBinario = ArchivoBinario;
|
||||||
|
itemMail.NombreArchivo = "Notificacion de Envio";
|
||||||
|
}
|
||||||
|
LSRutasMail.Add(itemMail);
|
||||||
|
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, "Se enviara la compra a su dirección", "Pendiente", Correos, LSRutasMail);
|
||||||
MailCls = null;
|
MailCls = null;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -625,9 +625,13 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
|
||||||
FormaPaqueteria = DtDatos.Rows(0)("FormaPaqueteria").ToString.ToEntero
|
FormaPaqueteria = DtDatos.Rows(0)("FormaPaqueteria").ToString.ToEntero
|
||||||
Dim FormaPaq As Integer = FormaPaqueteria
|
Dim FormaPaq As Integer = FormaPaqueteria
|
||||||
|
RbSinEntrega.Checked = False
|
||||||
|
RbEntregaInterna.Checked = False
|
||||||
|
RbEntregaExterna.Checked = False
|
||||||
Select Case FormaPaq
|
Select Case FormaPaq
|
||||||
Case 1
|
Case 1
|
||||||
RbSinEntrega.Checked = True
|
RbSinEntrega.Checked = True
|
||||||
|
LnkPaqueteriaDetalle.Visible = False
|
||||||
Case 2
|
Case 2
|
||||||
RbEntregaInterna.Checked = True
|
RbEntregaInterna.Checked = True
|
||||||
LnkPaqueteriaDetalle.Visible = True
|
LnkPaqueteriaDetalle.Visible = True
|
||||||
@@ -3638,7 +3642,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Protected Sub EntregaRadioGroup_Click(sender As Object, e As EventArgs)
|
Protected Sub EntregaRadioGroup_Click(sender As Object, e As EventArgs)
|
||||||
If RbEntregaExterna.Checked Then
|
If RbEntregaExterna.Checked Then
|
||||||
RegistraScript("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,547,'N')")
|
RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveVenta={CveVentaSurtir}',800,547,'N')")
|
||||||
ElseIf RbEntregaInterna.Checked Then
|
ElseIf RbEntregaInterna.Checked Then
|
||||||
RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||||
'RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuiasInternas.aspx?CveVenta={CveVentaSurtir}&CveSubProyecto={CveSubProyecto}',800,547,'N')")
|
'RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuiasInternas.aspx?CveVenta={CveVentaSurtir}&CveSubProyecto={CveSubProyecto}',800,547,'N')")
|
||||||
@@ -3658,7 +3662,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub PaqueteriaDetalle_Click(sender As Object, e As EventArgs)
|
Protected Sub PaqueteriaDetalle_Click(sender As Object, e As EventArgs)
|
||||||
If RbEntregaExterna.Checked Then
|
If RbEntregaExterna.Checked Then
|
||||||
RegistraScript("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,547,'N')")
|
RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveVenta={CveVentaSurtir}',800,547,'N')")
|
||||||
ElseIf RbEntregaInterna.Checked Then
|
ElseIf RbEntregaInterna.Checked Then
|
||||||
RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user