-cleanup
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Linq
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Data
|
|
||||||
|
|
||||||
Partial Class Acarreos_CatChoferes
|
Partial Class Acarreos_CatChoferes
|
||||||
|
|
||||||
@@ -70,10 +69,10 @@ Partial Class Acarreos_CatChoferes
|
|||||||
'Else
|
'Else
|
||||||
|
|
||||||
Dim ObjAcar As New ClsAcarreos
|
Dim ObjAcar As New ClsAcarreos
|
||||||
Dim Estatus = 0
|
Dim Estatus = 0
|
||||||
If ChkEstatus.Checked Then Estatus = 1
|
If ChkEstatus.Checked Then Estatus = 1
|
||||||
|
|
||||||
If HdnModalidad.Value = "A" Then
|
If HdnModalidad.Value = "A" Then
|
||||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
|
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
@@ -87,9 +86,9 @@ Partial Class Acarreos_CatChoferes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
||||||
ObjAcar.Dispose()
|
ObjAcar.Dispose()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
Imports Extensiones
|
Imports System.Data
|
||||||
Imports System.Data
|
Imports Extensiones
|
||||||
Imports System
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Acumuladores_RepEntradasUsadosClientes
|
Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
|
||||||
Imports System.IO
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports System.IO.Compression
|
|
||||||
|
|
||||||
Partial Class Acumuladores_RepIndicadorDiarioDetalle
|
Partial Class Acumuladores_RepIndicadorDiarioDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,23 +1,21 @@
|
|||||||
using System;
|
using ADSNetLibrary.SIGAPI.Models.CRM.Request;
|
||||||
|
using ADSNetLibrary.SIGAPI.Models.CRM.Response;
|
||||||
|
using ADSNetLibrary.SIGAPI.Models.Encuestas.Request;
|
||||||
|
using ADSNetLibrary.SIGAPI.Models.Ventas.Request;
|
||||||
|
using ADSNetLibrary.SIGAPI.Services;
|
||||||
|
using ADSNetLibrary.SIGAPI.Services.CRM;
|
||||||
|
using ADSNetLibrary.SIGAPI.Services.Encuestas;
|
||||||
|
using Extensiones;
|
||||||
|
using MoreLinq;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Data;
|
|
||||||
|
|
||||||
using Extensiones;
|
|
||||||
using System.Web.UI.HtmlControls;
|
using System.Web.UI.HtmlControls;
|
||||||
using ADSNetLibrary.SIGAPI.Services.CRM;
|
using System.Web.UI.WebControls;
|
||||||
using ADSNetLibrary.SIGAPI.Models.CRM.Request;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.CRM.Response;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.Ventas.Request;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.Ventas.Response;
|
|
||||||
using MoreLinq;
|
|
||||||
using ADSNetLibrary.SIGAPI.Services;
|
|
||||||
using ADSNetLibrary.SIGAPI.Services.Encuestas;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.Encuestas.Request;
|
|
||||||
|
|
||||||
public partial class CRM_Acercamiento : ClsPaginas
|
public partial class CRM_Acercamiento : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -313,7 +311,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
if (CveAcercamiento > 0)
|
if (CveAcercamiento > 0)
|
||||||
{
|
{
|
||||||
ICRMService cRMService = new CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString);
|
ICRMService cRMService = new CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString);
|
||||||
RequestAcercamiento AcercamientoModel = new RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamiento);
|
RequestAcercamiento AcercamientoModel = new RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamiento);
|
||||||
var objAcercamiento = cRMService.GetAceracamientoCRM(AcercamientoModel);
|
var objAcercamiento = cRMService.GetAceracamientoCRM(AcercamientoModel);
|
||||||
if (objAcercamiento.Result.Count > 0)
|
if (objAcercamiento.Result.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -379,7 +377,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
BtnGuardarAcercamiento.Visible = true;
|
BtnGuardarAcercamiento.Visible = true;
|
||||||
BtnEliminarAcercamiento.Visible = true;
|
BtnEliminarAcercamiento.Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert("La Empresa solicitada no existe, por favor revise su búsqueda.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("La Empresa solicitada no existe, por favor revise su búsqueda.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
@@ -493,7 +491,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||||
DdlProbabilidadAcercamiento.DataBind();
|
DdlProbabilidadAcercamiento.DataBind();
|
||||||
DdlEmpresaCRM.DataBind();
|
DdlEmpresaCRM.DataBind();
|
||||||
@@ -619,7 +617,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
private void CargarPS()
|
private void CargarPS()
|
||||||
{
|
{
|
||||||
DdlPS.setEsWebService(true);
|
DdlPS.setEsWebService(true);
|
||||||
if(CvePS > 0)
|
if (CvePS > 0)
|
||||||
{
|
{
|
||||||
string productoAsignado = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS: CvePS).FiltroPrimeroValor("PSCodigo");
|
string productoAsignado = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS: CvePS).FiltroPrimeroValor("PSCodigo");
|
||||||
DdlPS.SelectedValue = CvePS.ToString();
|
DdlPS.SelectedValue = CvePS.ToString();
|
||||||
@@ -771,7 +769,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
AcercaminetoModel.CveUsuarioIng = UsuarioActual.CveUsuario;
|
AcercaminetoModel.CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||||
AcercaminetoModel.CveEncuestaAplicadaProceso = CveEncuestaAplicadaProceso;
|
AcercaminetoModel.CveEncuestaAplicadaProceso = CveEncuestaAplicadaProceso;
|
||||||
AcercaminetoModel.FechaApertura = FechaApertura;
|
AcercaminetoModel.FechaApertura = FechaApertura;
|
||||||
AcercaminetoModel.FechaCierre = FechaCierre != null? (DateTime)FechaCierre : ModExtensiones.MinFecha;
|
AcercaminetoModel.FechaCierre = FechaCierre != null ? (DateTime)FechaCierre : ModExtensiones.MinFecha;
|
||||||
AcercaminetoModel.CvePS = DdlPS.SelectedValue.ToEntero();
|
AcercaminetoModel.CvePS = DdlPS.SelectedValue.ToEntero();
|
||||||
AcercaminetoModel.CveRechazoMotivo = CveRechazoMotivo;
|
AcercaminetoModel.CveRechazoMotivo = CveRechazoMotivo;
|
||||||
|
|
||||||
@@ -895,7 +893,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void BtnRegistrarCierreCancelacion_Click(object sender, EventArgs e)
|
protected void BtnRegistrarCierreCancelacion_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -1173,7 +1171,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
int CveEmpresaCRM = DdlEmpresaCRM.SelectedValue.ToEntero();
|
int CveEmpresaCRM = DdlEmpresaCRM.SelectedValue.ToEntero();
|
||||||
int CveEtapa = HdfEtapaSeleccionada.Value.ToEntero() == -1 ? CveEtapaActual : HdfEtapaSeleccionada.Value.ToEntero();
|
int CveEtapa = HdfEtapaSeleccionada.Value.ToEntero() == -1 ? CveEtapaActual : HdfEtapaSeleccionada.Value.ToEntero();
|
||||||
|
|
||||||
if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoAgendar, CveEtapaProcesoCRM: CveEtapa, CveEmpresaCRM:CveEmpresaCRM))
|
if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoAgendar, CveEtapaProcesoCRM: CveEtapa, CveEmpresaCRM: CveEmpresaCRM))
|
||||||
{
|
{
|
||||||
limpiarModalAgendar();
|
limpiarModalAgendar();
|
||||||
RegistraScript("$('#ModalAgenda').modal('hide')");
|
RegistraScript("$('#ModalAgenda').modal('hide')");
|
||||||
@@ -1525,7 +1523,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
return _CveEncuestaAplicada;
|
return _CveEncuestaAplicada;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region "MUESTRA UBICACION GEOGRAFICA"
|
#region "MUESTRA UBICACION GEOGRAFICA"
|
||||||
protected void LnkVerUbicacion_Click(object sender, EventArgs e)
|
protected void LnkVerUbicacion_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -1781,7 +1779,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
Actualizar = true;
|
Actualizar = true;
|
||||||
|
|
||||||
CveAcercamientoGasto = GvRow.DataKey("CveAcercamientoGasto").ToEntero();
|
CveAcercamientoGasto = GvRow.DataKey("CveAcercamientoGasto").ToEntero();
|
||||||
|
|
||||||
TxtDescripcionGasto.Text = GvRow.DataKey("Descripcion");
|
TxtDescripcionGasto.Text = GvRow.DataKey("Descripcion");
|
||||||
TxtImporteGasto.Text = GvRow.DataKey("Importe");
|
TxtImporteGasto.Text = GvRow.DataKey("Importe");
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
using System;
|
using ADSNetLibrary.SIGAPI.Models.CRM.Request;
|
||||||
|
using ADSNetLibrary.SIGAPI.Models.CRM.Response;
|
||||||
|
using ADSNetLibrary.SIGAPI.Models.Encuestas.Request;
|
||||||
|
using ADSNetLibrary.SIGAPI.Models.Ventas.Request;
|
||||||
|
using ADSNetLibrary.SIGAPI.Services;
|
||||||
|
using ADSNetLibrary.SIGAPI.Services.CRM;
|
||||||
|
using ADSNetLibrary.SIGAPI.Services.Encuestas;
|
||||||
|
using Extensiones;
|
||||||
|
using MoreLinq;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using System.IO;
|
|
||||||
using System.Data;
|
|
||||||
using ADSNetLibrary.SIGAPI.Services.CRM;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.CRM.Request;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.CRM.Response;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.Ventas.Request;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.Ventas.Response;
|
|
||||||
using Extensiones;
|
|
||||||
using MoreLinq;
|
|
||||||
using ADSNetLibrary.SIGAPI.Services;
|
|
||||||
using ADSNetLibrary.SIGAPI.Services.Encuestas;
|
|
||||||
using ADSNetLibrary.SIGAPI.Models.Encuestas.Request;
|
|
||||||
|
|
||||||
public partial class CRM_EmpresaCRM : ClsPaginas
|
public partial class CRM_EmpresaCRM : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -1359,11 +1358,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
DTRespuestasDatosTecnicos = responseGenericGetRespuestas.Result.ToDataTable();
|
DTRespuestasDatosTecnicos = responseGenericGetRespuestas.Result.ToDataTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa , CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1});
|
var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa, CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1 });
|
||||||
if (responseGenericGetDatosTecnicosEmpresaCRM.IsSuccess)
|
if (responseGenericGetDatosTecnicosEmpresaCRM.IsSuccess)
|
||||||
{
|
{
|
||||||
GvDatosTecnicos.DataSource = responseGenericGetDatosTecnicosEmpresaCRM.Result;
|
GvDatosTecnicos.DataSource = responseGenericGetDatosTecnicosEmpresaCRM.Result;
|
||||||
if(responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0)
|
if (responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0)
|
||||||
{
|
{
|
||||||
GvDatosTecnicos.Visible = true;
|
GvDatosTecnicos.Visible = true;
|
||||||
}
|
}
|
||||||
@@ -1567,7 +1566,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
DdlVendedor.Enabled = false;
|
DdlVendedor.Enabled = false;
|
||||||
DdlVendedorAsignado.Enabled = false;
|
DdlVendedorAsignado.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (UsuarioActual.TienePermisoProceso(336)) //permiso para editar vendedor
|
if (UsuarioActual.TienePermisoProceso(336)) //permiso para editar vendedor
|
||||||
{
|
{
|
||||||
@@ -1822,7 +1821,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
protected void DdlTipoProcesos_Change(Object sender, EventArgs e)
|
protected void DdlTipoProcesos_Change(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DdlMedioCaptacion.Items.Clear();
|
DdlMedioCaptacion.Items.Clear();
|
||||||
CargaMetodosCaptacion();
|
CargaMetodosCaptacion();
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Linq
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class Contabilidad2_CatCuentasAsignaciones
|
Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
Imports System.IO
|
||||||
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Contratos_ContratoObra
|
Partial Class Contratos_ContratoObra
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ Imports System.IO
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Partial Class RepCxC
|
Partial Class RepCxC
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "P R O P I E D A D E S"
|
#Region "P R O P I E D A D E S"
|
||||||
Private Property DtDatos As DataTable
|
Private Property DtDatos As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -93,11 +93,11 @@ Partial Class RepCxC
|
|||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
ViewState("DtGrafica") = value
|
ViewState("DtGrafica") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
Index = 0
|
Index = 0
|
||||||
@@ -110,8 +110,8 @@ Partial Class RepCxC
|
|||||||
If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True
|
If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True
|
||||||
CreaDataTableColor()
|
CreaDataTableColor()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "CARGAS"
|
#Region "CARGAS"
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
'CargaClientes
|
'CargaClientes
|
||||||
@@ -321,22 +321,22 @@ Partial Class RepCxC
|
|||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
ActualizarDatatable(NumCol)
|
ActualizarDatatable(NumCol)
|
||||||
Agrupador = DdlGrupo.SelectedItem.Text
|
Agrupador = DdlGrupo.SelectedItem.Text
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CONSULTAR"
|
#Region "CONSULTAR"
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
ActivaEnviarEstadoCuenta()
|
ActivaEnviarEstadoCuenta()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "GRIDVIEW"
|
#Region "GRIDVIEW"
|
||||||
|
|
||||||
Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||||
If e.Row.RowType = DataControlRowType.Header Then
|
If e.Row.RowType = DataControlRowType.Header Then
|
||||||
Dim FC As New SortedList
|
Dim FC As New SortedList
|
||||||
@@ -598,10 +598,10 @@ Partial Class RepCxC
|
|||||||
If e.Row.FCHyperLink("LtlVentas").Text.ToDouble = 0 Then e.Row.FCHyperLink("LtlVentas").Text = "-"
|
If e.Row.FCHyperLink("LtlVentas").Text.ToDouble = 0 Then e.Row.FCHyperLink("LtlVentas").Text = "-"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PERSONALIZAR COLUMNAS"
|
#Region "PERSONALIZAR COLUMNAS"
|
||||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||||
|
|
||||||
@@ -634,10 +634,10 @@ Partial Class RepCxC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "IMPRESIONES"
|
#Region "IMPRESIONES"
|
||||||
Private Sub ActualizarDatatable(NumCol As Integer)
|
Private Sub ActualizarDatatable(NumCol As Integer)
|
||||||
|
|
||||||
@@ -743,12 +743,12 @@ Partial Class RepCxC
|
|||||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "TIPO DE CAMBIO"
|
#Region "TIPO DE CAMBIO"
|
||||||
|
|
||||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||||
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
|
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
|
||||||
Dim TipoCambio As Double
|
Dim TipoCambio As Double
|
||||||
@@ -765,13 +765,13 @@ Partial Class RepCxC
|
|||||||
CargaDatos()
|
CargaDatos()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PERSONALIZAR RANGO COLUMNAS"
|
#Region "PERSONALIZAR RANGO COLUMNAS"
|
||||||
|
|
||||||
Protected Sub GvPersonalizarRango_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvPersonalizarRango_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If Not e.Row.DBCampo("RangoFinal").ToDouble > 0 Then
|
If Not e.Row.DBCampo("RangoFinal").ToDouble > 0 Then
|
||||||
@@ -927,10 +927,10 @@ Partial Class RepCxC
|
|||||||
End If
|
End If
|
||||||
ObjComp.Dispose()
|
ObjComp.Dispose()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ENVIAR ESTADO DE CUENTA "
|
#Region " ENVIAR ESTADO DE CUENTA "
|
||||||
Private Sub ActivaEnviarEstadoCuenta()
|
Private Sub ActivaEnviarEstadoCuenta()
|
||||||
LBEnviarSMS.Visible = DdlGrupo.SelectedValue = "5" And UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12)
|
LBEnviarSMS.Visible = DdlGrupo.SelectedValue = "5" And UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12)
|
||||||
@@ -1052,11 +1052,11 @@ Partial Class RepCxC
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió error al mandar el Mail", ex)
|
OnError("Ocurrió error al mandar el Mail", ex)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "DESCARGA TXT SEGMENTOS"
|
#Region "DESCARGA TXT SEGMENTOS"
|
||||||
|
|
||||||
Protected Sub LnkDescargarSegmentos_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDescargarSegmentos_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjMov As New ClsMovimientos
|
Dim ObjMov As New ClsMovimientos
|
||||||
If ObjMov.GetDescargaSegmentos(UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetDescargaSegmentos(UsuarioActual.CveEmpresa) Then
|
||||||
@@ -1216,13 +1216,13 @@ Partial Class RepCxC
|
|||||||
End If
|
End If
|
||||||
ObjMov.Dispose()
|
ObjMov.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "GRAFICA"
|
#Region "GRAFICA"
|
||||||
|
|
||||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||||
If Not DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
If Not DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -1425,13 +1425,13 @@ Partial Class RepCxC
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlMostrarGraficaTotales_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlMostrarGraficaTotales_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CambioGrafica(DdlVer.SelectedValue.ToEntero)
|
CambioGrafica(DdlVer.SelectedValue.ToEntero)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SELECTED INDEX CHANGE"
|
#Region "SELECTED INDEX CHANGE"
|
||||||
|
|
||||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CargaClientes()
|
CargaClientes()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1443,9 +1443,9 @@ Partial Class RepCxC
|
|||||||
DdlClientesWS.DataBind()
|
DdlClientesWS.DataBind()
|
||||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -2,10 +2,8 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Extensiones
|
||||||
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
|
||||||
|
|
||||||
'Imports DocumentFormat.OpenXml.Wordprocessing
|
'Imports DocumentFormat.OpenXml.Wordprocessing
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,10 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.Entity.Core.Common.CommandTrees
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports Stimulsoft.Base.Indicator
|
|
||||||
|
|
||||||
Partial Class Inventarios_EntregaAlmacen
|
Partial Class Inventarios_EntregaAlmacen
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,28 +1,27 @@
|
|||||||
using System;
|
using Extensiones;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using Extensiones;
|
|
||||||
using Microsoft.Reporting.WebForms;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||||
{
|
{
|
||||||
|
|
||||||
DataTable DTGenerarDocumentos
|
DataTable DTGenerarDocumentos
|
||||||
{
|
{
|
||||||
get {
|
get
|
||||||
|
{
|
||||||
|
|
||||||
if(ViewState["DTGenerarDocumentos"] == null){
|
if (ViewState["DTGenerarDocumentos"] == null)
|
||||||
|
{
|
||||||
ViewState["DTGenerarDocumentos"] = new DataTable();
|
ViewState["DTGenerarDocumentos"] = new DataTable();
|
||||||
}
|
}
|
||||||
return (DataTable)ViewState["DTGenerarDocumentos"];
|
return (DataTable)ViewState["DTGenerarDocumentos"];
|
||||||
|
|
||||||
}
|
}
|
||||||
set {
|
set
|
||||||
|
{
|
||||||
ViewState["DTGenerarDocumentos"] = (DataTable)value;
|
ViewState["DTGenerarDocumentos"] = (DataTable)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,7 +60,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
ViewState["DTRecoleccion"] = (DataTable)value;
|
ViewState["DTRecoleccion"] = (DataTable)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SeleccionEntrega
|
bool SeleccionEntrega
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -69,18 +68,19 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
if (ViewState["SeleccionEntrega"] == null)
|
if (ViewState["SeleccionEntrega"] == null)
|
||||||
{
|
{
|
||||||
ViewState["SeleccionEntrega"] = false;
|
ViewState["SeleccionEntrega"] = false;
|
||||||
}
|
}
|
||||||
return (bool) ViewState["SeleccionEntrega"];
|
return (bool)ViewState["SeleccionEntrega"];
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
ViewState["SeleccionEntrega"] = (bool)value;
|
ViewState["SeleccionEntrega"] = (bool)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CveEntregaAlmacen
|
int CveEntregaAlmacen
|
||||||
{
|
{
|
||||||
get {
|
get
|
||||||
|
{
|
||||||
|
|
||||||
if (ViewState["CveEntregaAlmacen"] == null)
|
if (ViewState["CveEntregaAlmacen"] == null)
|
||||||
{
|
{
|
||||||
@@ -98,35 +98,35 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
|
||||||
SeleccionEntrega = true;
|
SeleccionEntrega = true;
|
||||||
CargaCombos();
|
CargaCombos();
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
|
|
||||||
#region RECOLEECION
|
#region RECOLEECION
|
||||||
// CargaDatosRecoleccion();
|
// CargaDatosRecoleccion();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BtnAsignar_Click(object sender, EventArgs e)
|
protected void BtnAsignar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if(DdlChofer.SelectedValue.ToEntero() <= 0)
|
if (DdlChofer.SelectedValue.ToEntero() <= 0)
|
||||||
{
|
{
|
||||||
Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
if (DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
||||||
{
|
{
|
||||||
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder SBError = new StringBuilder();
|
StringBuilder SBError = new StringBuilder();
|
||||||
ActualizaOrdenDTGenerarDocumentos();
|
ActualizaOrdenDTGenerarDocumentos();
|
||||||
@@ -136,16 +136,16 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
bool TieneError = false;
|
bool TieneError = false;
|
||||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||||
ObjGeneral.IniciaTransacSQL();
|
ObjGeneral.IniciaTransacSQL();
|
||||||
GridViewRowCollection Grid = GvGenerarDocumentos.Rows;
|
GridViewRowCollection Grid = GvGenerarDocumentos.Rows;
|
||||||
string Usuario = DdlChofer.SelectedItem.Text;
|
string Usuario = DdlChofer.SelectedItem.Text;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int CveDireccionOrigen = -1;
|
int CveDireccionOrigen = -1;
|
||||||
foreach (GridViewRow row in Grid)
|
foreach (GridViewRow row in Grid)
|
||||||
{
|
{
|
||||||
int Orden = row.DataKey("Orden").ToEntero();
|
int Orden = row.DataKey("Orden").ToEntero();
|
||||||
int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero();
|
int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero();
|
||||||
|
|
||||||
if (CveDireccionDestino <= 0)
|
if (CveDireccionDestino <= 0)
|
||||||
{
|
{
|
||||||
@@ -154,12 +154,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
||||||
int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E", "","", "1900-01-01".ToDate(), Orden,0, 1);
|
int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E", "", "", "1900-01-01".ToDate(), Orden, 0, 1);
|
||||||
CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero();
|
CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero();
|
||||||
|
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
{
|
{
|
||||||
int CveTimbre = ObjGeneral.AddGralTimbre("Ent", row.DataKey("CveSubProyectoOrigen").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:CveEntregaAlmacen, AplicaCP: ChkEmitirCartaPorte.Checked);
|
int CveTimbre = ObjGeneral.AddGralTimbre("Ent", row.DataKey("CveSubProyectoOrigen").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: ChkEmitirCartaPorte.Checked);
|
||||||
|
|
||||||
if (CveTimbre <= 0)
|
if (CveTimbre <= 0)
|
||||||
{
|
{
|
||||||
@@ -178,9 +178,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega almacen. ");
|
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega almacen. ");
|
||||||
TieneError = true;
|
TieneError = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!TieneError)
|
if (!TieneError)
|
||||||
{
|
{
|
||||||
@@ -195,7 +195,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
TieneError = true;
|
TieneError = true;
|
||||||
ModExtensiones.GuardaLog(ex.Message);
|
ModExtensiones.GuardaLog(ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TieneError)
|
if (!TieneError)
|
||||||
@@ -207,16 +207,16 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
bool huboerror = false;
|
bool huboerror = false;
|
||||||
|
|
||||||
foreach (int cvetimbre in ListaTimbres)
|
foreach (int cvetimbre in ListaTimbres)
|
||||||
{
|
{
|
||||||
Timbres ObjTimbres = new Timbres("Ent", cvetimbre, UsuarioActual);
|
Timbres ObjTimbres = new Timbres("Ent", cvetimbre, UsuarioActual);
|
||||||
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
||||||
if (ObjTimbres.Timbrar())
|
if (ObjTimbres.Timbrar())
|
||||||
{
|
{
|
||||||
|
|
||||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
||||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>PDF <i class='fa fa-ad-pdf'></i></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre)));
|
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>PDF <i class='fa fa-ad-pdf'></i></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre)));
|
||||||
MensajeAlert.Append("<br/>");
|
MensajeAlert.Append("<br/>");
|
||||||
|
|
||||||
DdlChofer.SelectedValueExist("-1");
|
DdlChofer.SelectedValueExist("-1");
|
||||||
DdlUnidadCamion.SelectedValueExist("-1");
|
DdlUnidadCamion.SelectedValueExist("-1");
|
||||||
ChkEmitirCartaPorte.Checked = false;
|
ChkEmitirCartaPorte.Checked = false;
|
||||||
@@ -228,7 +228,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
huboerror = true;
|
huboerror = true;
|
||||||
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError);
|
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
@@ -239,10 +239,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
ObjGeneral.RollBack();
|
ObjGeneral.RollBack();
|
||||||
}
|
}
|
||||||
ObjGeneral.Dispose();
|
ObjGeneral.Dispose();
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Alert(SBError.ToString(), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert(SBError.ToString(), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -276,11 +277,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
int CveDireccionOrigen = -1;
|
int CveDireccionOrigen = -1;
|
||||||
foreach (GridViewRow row in gvR.Rows)
|
foreach (GridViewRow row in gvR.Rows)
|
||||||
{
|
{
|
||||||
int Orden = row.DataKey("Orden").ToEntero();
|
int Orden = row.DataKey("Orden").ToEntero();
|
||||||
int CveEntregaAlmacen = row.DataKey("CveEntregaAlmacen").ToEntero();
|
int CveEntregaAlmacen = row.DataKey("CveEntregaAlmacen").ToEntero();
|
||||||
|
|
||||||
if (row.FCCheckBox("Chk").Checked)
|
if (row.FCCheckBox("Chk").Checked)
|
||||||
{
|
{
|
||||||
CveDireccionOrigen = row.DataKey("CveDireccionOrigen").ToEntero();
|
CveDireccionOrigen = row.DataKey("CveDireccionOrigen").ToEntero();
|
||||||
|
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
@@ -345,7 +346,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
foreach (int cvetimbre in ListaTimbres)
|
foreach (int cvetimbre in ListaTimbres)
|
||||||
{
|
{
|
||||||
Timbres ObjTimbres = new Timbres("Rec", cvetimbre, UsuarioActual);
|
Timbres ObjTimbres = new Timbres("Rec", cvetimbre, UsuarioActual);
|
||||||
|
|
||||||
if (ObjTimbres.Timbrar())
|
if (ObjTimbres.Timbrar())
|
||||||
{
|
{
|
||||||
//ClsPaginas.PdfFactura(ref ObjTimbres.ObjFactura,"0",true);
|
//ClsPaginas.PdfFactura(ref ObjTimbres.ObjFactura,"0",true);
|
||||||
@@ -369,7 +370,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
//if (UsuarioActual.Empresa.Funcionalidad(161) == "1")
|
//if (UsuarioActual.Empresa.Funcionalidad(161) == "1")
|
||||||
// MensajeAlert.AppendFormat("<ul><li><a class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Descargar Carta Porte</a></li></ul>", Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre)));
|
// MensajeAlert.AppendFormat("<ul><li><a class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Descargar Carta Porte</a></li></ul>", Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre)));
|
||||||
//else
|
//else
|
||||||
// MensajeAlert.AppendFormat("<ul><li><a class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Descargar Carta Porte</a></li></ul>", ModExtensiones.Encripta(String.Format("OP=CARPO&CveTimbre={0}", cvetimbre)));
|
// MensajeAlert.AppendFormat("<ul><li><a class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Descargar Carta Porte</a></li></ul>", ModExtensiones.Encripta(String.Format("OP=CARPO&CveTimbre={0}", cvetimbre)));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -381,7 +382,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
CargaDatosRecoleccion();
|
CargaDatosRecoleccion();
|
||||||
DdlChofer.SelectedValueExist("-1");
|
DdlChofer.SelectedValueExist("-1");
|
||||||
DdlUnidadCamion.SelectedValueExist("-1");
|
DdlUnidadCamion.SelectedValueExist("-1");
|
||||||
|
|
||||||
SeleccionEntrega = false;
|
SeleccionEntrega = false;
|
||||||
SeleccionarGenerar(1);
|
SeleccionarGenerar(1);
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
@@ -400,7 +401,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
private void CargaDatos()
|
private void CargaDatos()
|
||||||
{
|
{
|
||||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||||
if (ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1))
|
if (ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1))
|
||||||
{
|
{
|
||||||
GvEntregas.DataSource = ObjGeneral.DtResultados;
|
GvEntregas.DataSource = ObjGeneral.DtResultados;
|
||||||
DTDatosConsulta = ObjGeneral.DtResultados;
|
DTDatosConsulta = ObjGeneral.DtResultados;
|
||||||
@@ -410,12 +411,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
ObjGeneral.Dispose();
|
ObjGeneral.Dispose();
|
||||||
GvEntregas.DataBind();
|
GvEntregas.DataBind();
|
||||||
|
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
}
|
}
|
||||||
private void CargaCombos()
|
private void CargaCombos()
|
||||||
{
|
{
|
||||||
|
|
||||||
DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
||||||
DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
DdlUnidadCamion.DataBind();
|
DdlUnidadCamion.DataBind();
|
||||||
DdlUnidadRec.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
DdlUnidadRec.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
||||||
@@ -424,7 +425,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString();
|
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString();
|
||||||
TxtFechaF.Text = DateTime.Now.AddDays(3).ToShortDateString();
|
TxtFechaF.Text = DateTime.Now.AddDays(3).ToShortDateString();
|
||||||
|
|
||||||
DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa);
|
DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa);
|
||||||
DdlChofer.DataBind();
|
DdlChofer.DataBind();
|
||||||
DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
@@ -432,21 +433,22 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
DdlChoferRec.DataBind();
|
DdlChoferRec.DataBind();
|
||||||
DdlChoferRec.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlChoferRec.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
|
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
|
||||||
|
|
||||||
TabRecoleccion.Visible = UsuarioActual.Empresa.Funcionalidad(531)=="1";
|
TabRecoleccion.Visible = UsuarioActual.Empresa.Funcionalidad(531) == "1";
|
||||||
TxtFechaLimite.Text = DateTime.Now.ToShortDateString();
|
TxtFechaLimite.Text = DateTime.Now.ToShortDateString();
|
||||||
|
|
||||||
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
|
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
|
||||||
CargarCentrosDeCosto(null, DdlSubProyectoRecoleccion, null, LblSubProyectoRecoleccion);
|
CargarCentrosDeCosto(null, DdlSubProyectoRecoleccion, null, LblSubProyectoRecoleccion);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkGenerarDocumentos_Click(object sender, EventArgs e)
|
protected void LnkGenerarDocumentos_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SeleccionarGenerar(1);
|
SeleccionarGenerar(1);
|
||||||
}
|
}
|
||||||
private void SeleccionarGenerar(int Opcion ) {
|
private void SeleccionarGenerar(int Opcion)
|
||||||
|
{
|
||||||
|
|
||||||
if (SeleccionEntrega)
|
if (SeleccionEntrega)
|
||||||
{
|
{
|
||||||
@@ -542,7 +544,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -550,8 +552,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
BtnConsultar.Visible = true;
|
BtnConsultar.Visible = true;
|
||||||
SeleccionEntrega = true;
|
SeleccionEntrega = true;
|
||||||
LnkGenerarDocumentos.Text = "Preseleccionar";
|
LnkGenerarDocumentos.Text = "Preseleccionar";
|
||||||
LnkGenerarDocumentos.CssClass = "btn btn-primary";
|
LnkGenerarDocumentos.CssClass = "btn btn-primary";
|
||||||
|
|
||||||
|
|
||||||
OcultarmostarDatosEntrega(false);
|
OcultarmostarDatosEntrega(false);
|
||||||
|
|
||||||
@@ -561,10 +563,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
UpFiltro.Update();
|
UpFiltro.Update();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OcultarmostarDatosEntrega(bool mostrar )
|
private void OcultarmostarDatosEntrega(bool mostrar)
|
||||||
{
|
{
|
||||||
//DVDatosEntrega1.Visible = mostrar;
|
//DVDatosEntrega1.Visible = mostrar;
|
||||||
DVDatosEntrega2.Visible = mostrar;
|
DVDatosEntrega2.Visible = mostrar;
|
||||||
@@ -586,21 +588,21 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
DvCartaPorte2.Visible = mostrar;
|
DvCartaPorte2.Visible = mostrar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ActualizaOrdenDTGenerarDocumentos()
|
private void ActualizaOrdenDTGenerarDocumentos()
|
||||||
{
|
{
|
||||||
string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos");
|
string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos");
|
||||||
|
|
||||||
int NumOrden = 1;
|
int NumOrden = 1;
|
||||||
foreach (string CveMovimiento in OrdenMovimientos)
|
foreach (string CveMovimiento in OrdenMovimientos)
|
||||||
{
|
{
|
||||||
foreach(DataRow dRow in DTGenerarDocumentos.Rows)
|
foreach (DataRow dRow in DTGenerarDocumentos.Rows)
|
||||||
{
|
{
|
||||||
if (CveMovimiento.ToEntero() == dRow["CveMovimiento"].ToString().ToEntero() )
|
if (CveMovimiento.ToEntero() == dRow["CveMovimiento"].ToString().ToEntero())
|
||||||
{
|
{
|
||||||
dRow["Orden"] = NumOrden;
|
dRow["Orden"] = NumOrden;
|
||||||
}
|
}
|
||||||
@@ -608,7 +610,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
DTGenerarDocumentos.AcceptChanges();
|
DTGenerarDocumentos.AcceptChanges();
|
||||||
NumOrden++;
|
NumOrden++;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataView DTview = new DataView(DTGenerarDocumentos);
|
DataView DTview = new DataView(DTGenerarDocumentos);
|
||||||
|
|
||||||
// Sort by State and ZipCode column in descending order
|
// Sort by State and ZipCode column in descending order
|
||||||
@@ -618,13 +620,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
GvGenerarDocumentos.DataBind();
|
GvGenerarDocumentos.DataBind();
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(Tab.ActiveTabIndex == 0)
|
if (Tab.ActiveTabIndex == 0)
|
||||||
{
|
{
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
}
|
}
|
||||||
@@ -633,14 +635,14 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
CargaDatosRecoleccion();
|
CargaDatosRecoleccion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region RECOLECCION
|
#region RECOLECCION
|
||||||
|
|
||||||
|
|
||||||
private DataTable InitDTRecoleccion()
|
private DataTable InitDTRecoleccion()
|
||||||
{
|
{
|
||||||
DataTable DT = new DataTable();
|
DataTable DT = new DataTable();
|
||||||
|
|
||||||
@@ -649,8 +651,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
DT.Columns.Add("CvePS", System.Type.GetType("System.Int32"));
|
DT.Columns.Add("CvePS", System.Type.GetType("System.Int32"));
|
||||||
DT.Columns.Add("Cantidad", System.Type.GetType("System.Double"));
|
DT.Columns.Add("Cantidad", System.Type.GetType("System.Double"));
|
||||||
DT.Columns.Add("CveUnidadMedida", System.Type.GetType("System.Int32"));
|
DT.Columns.Add("CveUnidadMedida", System.Type.GetType("System.Int32"));
|
||||||
DT.Columns.Add("CveUsuario",System.Type.GetType("System.Int32"));
|
DT.Columns.Add("CveUsuario", System.Type.GetType("System.Int32"));
|
||||||
DT.Columns.Add("FechaIng",System.Type.GetType("System.DateTime"));
|
DT.Columns.Add("FechaIng", System.Type.GetType("System.DateTime"));
|
||||||
DT.Columns.Add("CodigoPS", System.Type.GetType("System.String"));
|
DT.Columns.Add("CodigoPS", System.Type.GetType("System.String"));
|
||||||
DT.Columns.Add("Abreviatura", System.Type.GetType("System.String"));
|
DT.Columns.Add("Abreviatura", System.Type.GetType("System.String"));
|
||||||
|
|
||||||
@@ -667,9 +669,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
ObjGeneral.Dispose();
|
ObjGeneral.Dispose();
|
||||||
gvR.DataBind();
|
gvR.DataBind();
|
||||||
UpDatosRecoleccion.Update();
|
UpDatosRecoleccion.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CargaDatosRecoleccionDetallePS()
|
private void CargaDatosRecoleccionDetallePS()
|
||||||
{
|
{
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
@@ -679,18 +681,20 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
if (ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen))
|
if (ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen))
|
||||||
{
|
{
|
||||||
GvModalPSRecoleccion.DataSource = ObjGenerales.DtResultados;
|
GvModalPSRecoleccion.DataSource = ObjGenerales.DtResultados;
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
GvModalPSRecoleccion.DataSource = null;
|
GvModalPSRecoleccion.DataSource = null;
|
||||||
}
|
}
|
||||||
ObjGenerales.Dispose();
|
ObjGenerales.Dispose();
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
||||||
}
|
}
|
||||||
GvModalPSRecoleccion.DataBind();
|
GvModalPSRecoleccion.DataBind();
|
||||||
UpModalRecoleccion.Update();
|
UpModalRecoleccion.Update();
|
||||||
}
|
}
|
||||||
protected void DdlModalRecoleccionCliente_SelectedIndexChanged(object sender, EventArgs e)
|
protected void DdlModalRecoleccionCliente_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ModalRecoleccionCargaDirecciones();
|
ModalRecoleccionCargaDirecciones();
|
||||||
@@ -698,14 +702,14 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
private void ModalRecoleccionCargaDirecciones()
|
private void ModalRecoleccionCargaDirecciones()
|
||||||
{
|
{
|
||||||
if(DdlModalRecoleccionCliente.SelectedValue.ToEntero() > 0)
|
if (DdlModalRecoleccionCliente.SelectedValue.ToEntero() > 0)
|
||||||
{
|
{
|
||||||
ClsClientes ObjClientes = new ClsClientes();
|
ClsClientes ObjClientes = new ClsClientes();
|
||||||
if (ObjClientes.DireccionEnvioGet(-1, DdlModalRecoleccionCliente.SelectedValue.ToEntero(), -1))
|
if (ObjClientes.DireccionEnvioGet(-1, DdlModalRecoleccionCliente.SelectedValue.ToEntero(), -1))
|
||||||
{
|
{
|
||||||
DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados.FiltraParametros("CveSubProyecto = " + DdlSubProyectoRecoleccion.SelectedValue.ToEntero());
|
DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados.FiltraParametros("CveSubProyecto = " + DdlSubProyectoRecoleccion.SelectedValue.ToEntero());
|
||||||
}
|
}
|
||||||
ObjClientes.Dispose();
|
ObjClientes.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
DdlmodalRecoleccionDireccion.DataBind();
|
DdlmodalRecoleccionDireccion.DataBind();
|
||||||
@@ -713,11 +717,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
UpModalRecoleccion.Update();
|
UpModalRecoleccion.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void LnkAgregarRecoleccion_Click(object sender, EventArgs e)
|
protected void LnkAgregarRecoleccion_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
LtlModalRecoleccionTitulo.Text = "Agregar Recolección";
|
LtlModalRecoleccionTitulo.Text = "Agregar Recolección";
|
||||||
BtnModalRecoleccionGuardar.Text = "Agregar";
|
BtnModalRecoleccionGuardar.Text = "Agregar";
|
||||||
|
|
||||||
@@ -772,7 +776,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
DdlmodalRecoleccionDireccion.SelectedValueExist(-1);
|
DdlmodalRecoleccionDireccion.SelectedValueExist(-1);
|
||||||
TxtModalRecoleccionCantidad.Text = "";
|
TxtModalRecoleccionCantidad.Text = "";
|
||||||
DdlModalRecoleccionUnidad.Items.Clear();
|
DdlModalRecoleccionUnidad.Items.Clear();
|
||||||
DdlModalRecoleccionUnidad.Items.Add(new ListItem("Seleccione una","-1"));
|
DdlModalRecoleccionUnidad.Items.Add(new ListItem("Seleccione una", "-1"));
|
||||||
DdlProducto2.txtValue.Value = "";
|
DdlProducto2.txtValue.Value = "";
|
||||||
DdlProducto2.txtText.Value = "";
|
DdlProducto2.txtText.Value = "";
|
||||||
|
|
||||||
@@ -799,48 +803,48 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
protected void BtnModalRecoleccionGuardar_Click(object sender, EventArgs e)
|
protected void BtnModalRecoleccionGuardar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (DdlmodalRecoleccionDireccion.SelectedValue.ToEntero() <= 0)
|
if (DdlmodalRecoleccionDireccion.SelectedValue.ToEntero() <= 0)
|
||||||
{
|
{
|
||||||
Alert("Debe seleccionar la dirección de recolección", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("Debe seleccionar la dirección de recolección", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProcesoOK = false;
|
bool ProcesoOK = false;
|
||||||
|
|
||||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||||
ObjGenerales.IniciaTransacSQL();
|
ObjGenerales.IniciaTransacSQL();
|
||||||
|
|
||||||
if( CveEntregaAlmacen == -1)
|
if (CveEntregaAlmacen == -1)
|
||||||
{
|
{
|
||||||
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
|
||||||
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChoferRec.SelectedValue.ToEntero(), DdlUnidadRec.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R",TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1,0,1) ;
|
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1, -1, DdlChoferRec.SelectedValue.ToEntero(), DdlUnidadRec.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R", TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1, 0, 1);
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
{
|
{
|
||||||
//CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);
|
//CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);
|
||||||
|
|
||||||
//if (CveTimbrenuevo > 0)
|
//if (CveTimbrenuevo > 0)
|
||||||
//{
|
//{
|
||||||
foreach (DataRow dRow in DTRecoleccion.Rows)
|
foreach (DataRow dRow in DTRecoleccion.Rows)
|
||||||
|
{
|
||||||
|
if (ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, dRow["CvePS"].ToString().ToEntero(), dRow["Cantidad"].ToString().ToDecimal(), dRow["CveUnidadMedida"].ToString().ToEntero(), UsuarioActual.CveUsuario))
|
||||||
{
|
{
|
||||||
if(ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen,dRow["CvePS"].ToString().ToEntero(), dRow["Cantidad"].ToString().ToDecimal(),dRow["CveUnidadMedida"].ToString().ToEntero(), UsuarioActual.CveUsuario))
|
ProcesoOK = true;
|
||||||
{
|
|
||||||
ProcesoOK = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ProcesoOK = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ProcesoOK = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ProcesoOK = ObjGenerales.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen, DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa);
|
ProcesoOK = ObjGenerales.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen, DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ProcesoOK)
|
if (ProcesoOK)
|
||||||
{
|
{
|
||||||
@@ -849,11 +853,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
RegistraScript("$('#DivModalRecoleccion').modal('hide');");
|
RegistraScript("$('#DivModalRecoleccion').modal('hide');");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ObjGenerales.RollBack();
|
ObjGenerales.RollBack();
|
||||||
Alert("Ocurrió un error.",ModExtensiones.TipoMensaje.MsgError);
|
Alert("Ocurrió un error.", ModExtensiones.TipoMensaje.MsgError);
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjGenerales.Dispose();
|
ObjGenerales.Dispose();
|
||||||
CargaDatosRecoleccion();
|
CargaDatosRecoleccion();
|
||||||
}
|
}
|
||||||
@@ -882,7 +886,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer;
|
GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer;
|
||||||
|
|
||||||
if (CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
int CveEntregaAlmacenDetalleEliminar = GvRow.DataKey("CveEntregaAlmacenDetalle").ToEntero();
|
int CveEntregaAlmacenDetalleEliminar = GvRow.DataKey("CveEntregaAlmacenDetalle").ToEntero();
|
||||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||||
@@ -899,17 +903,17 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
DTRecoleccion.Rows[DTIndex].Delete();
|
DTRecoleccion.Rows[DTIndex].Delete();
|
||||||
DTRecoleccion.AcceptChanges();
|
DTRecoleccion.AcceptChanges();
|
||||||
|
|
||||||
}
|
}
|
||||||
CargaDatosRecoleccionDetallePS();
|
CargaDatosRecoleccionDetallePS();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkModalAgregarPS_Click(object sender, EventArgs e)
|
protected void LnkModalAgregarPS_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(CveEntregaAlmacen > 0)
|
if (CveEntregaAlmacen > 0)
|
||||||
{
|
{
|
||||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||||
|
|
||||||
if(ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen,DdlProducto2.SelectedValue.ToEntero(), TxtModalRecoleccionCantidad.Text.ToEntero(), DdlModalRecoleccionUnidad.SelectedValue.ToEntero(), UsuarioActual.CveUsuario))
|
if (ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, DdlProducto2.SelectedValue.ToEntero(), TxtModalRecoleccionCantidad.Text.ToEntero(), DdlModalRecoleccionUnidad.SelectedValue.ToEntero(), UsuarioActual.CveUsuario))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -917,17 +921,17 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DataRow dRow = DTRecoleccion.NewRow() ;
|
DataRow dRow = DTRecoleccion.NewRow();
|
||||||
|
|
||||||
dRow["CveEntregaAlmacenDetalle"] = -1;
|
dRow["CveEntregaAlmacenDetalle"] = -1;
|
||||||
dRow["CveEntregaAlmacen"] = CveEntregaAlmacen;
|
dRow["CveEntregaAlmacen"] = CveEntregaAlmacen;
|
||||||
dRow["CvePS"] = DdlProducto2.SelectedValue.ToEntero();
|
dRow["CvePS"] = DdlProducto2.SelectedValue.ToEntero();
|
||||||
dRow["Cantidad"] =TxtModalRecoleccionCantidad.Text.ToEntero();
|
dRow["Cantidad"] = TxtModalRecoleccionCantidad.Text.ToEntero();
|
||||||
dRow["CveUnidadMedida"] = DdlModalRecoleccionUnidad.SelectedValue.ToEntero();
|
dRow["CveUnidadMedida"] = DdlModalRecoleccionUnidad.SelectedValue.ToEntero();
|
||||||
dRow["CveUsuario"] =UsuarioActual.CveUsuario;
|
dRow["CveUsuario"] = UsuarioActual.CveUsuario;
|
||||||
dRow["FechaIng"] = DateTime.Now;
|
dRow["FechaIng"] = DateTime.Now;
|
||||||
dRow["CodigoPS"] = DdlProducto2.txtText.Value;
|
dRow["CodigoPS"] = DdlProducto2.txtText.Value;
|
||||||
dRow["Abreviatura"] =DdlModalRecoleccionUnidad.SelectedItem.Text;
|
dRow["Abreviatura"] = DdlModalRecoleccionUnidad.SelectedItem.Text;
|
||||||
|
|
||||||
DTRecoleccion.Rows.Add(dRow);
|
DTRecoleccion.Rows.Add(dRow);
|
||||||
//GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
//GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
||||||
@@ -935,8 +939,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
LimpiarControlesPS();
|
LimpiarControlesPS();
|
||||||
CargaDatosRecoleccionDetallePS();
|
CargaDatosRecoleccionDetallePS();
|
||||||
|
|
||||||
}
|
}
|
||||||
private void LimpiarControlesPS()
|
private void LimpiarControlesPS()
|
||||||
{
|
{
|
||||||
TxtModalRecoleccionCantidad.Text = "";
|
TxtModalRecoleccionCantidad.Text = "";
|
||||||
@@ -945,10 +949,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
DdlProducto2.txtValue.Value = "";
|
DdlProducto2.txtValue.Value = "";
|
||||||
UpModalRecoleccion.Update();
|
UpModalRecoleccion.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Tab_ActiveTabChanged(object sender, EventArgs e)
|
protected void Tab_ActiveTabChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(Tab.ActiveTabIndex == 0)
|
if (Tab.ActiveTabIndex == 0)
|
||||||
{
|
{
|
||||||
SeleccionEntrega = false;
|
SeleccionEntrega = false;
|
||||||
SeleccionarGenerar(1);
|
SeleccionarGenerar(1);
|
||||||
@@ -958,7 +962,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
OcultarmostarDatosEntrega(true);
|
OcultarmostarDatosEntrega(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionEnvio)
|
private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionEnvio)
|
||||||
{
|
{
|
||||||
@@ -989,10 +993,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
|
int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
|
||||||
|
|
||||||
HdnCveVenta.Value = GvRow.DataKey("CveVenta");
|
HdnCveVenta.Value = GvRow.DataKey("CveVenta");
|
||||||
CargaModalCombosDirecciones(CveCliente, CveDireccion);
|
CargaModalCombosDirecciones(CveCliente, CveDireccion);
|
||||||
|
|
||||||
UpModalEditarentrega.Update();
|
UpModalEditarentrega.Update();
|
||||||
this.RegistraScript("$('#DivEditarEntrega').modal('show');");
|
this.RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BtnModalEditarentrega_Click(object sender, EventArgs e)
|
protected void BtnModalEditarentrega_Click(object sender, EventArgs e)
|
||||||
@@ -1010,12 +1014,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
if (ProcesoOK)
|
if (ProcesoOK)
|
||||||
{
|
{
|
||||||
this.RegistraScript("$('#DivEditarEntrega').modal('hide');");
|
this.RegistraScript("$('#DivEditarEntrega').modal('hide');");
|
||||||
Alert("Dirección Actualizada correctamente.",ModExtensiones.TipoMensaje.ToastInformacion);
|
Alert("Dirección Actualizada correctamente.", ModExtensiones.TipoMensaje.ToastInformacion);
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void gvR_RowDataBound(object sender, GridViewRowEventArgs e)
|
protected void gvR_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
@@ -1027,13 +1031,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
LnkEditar.Visible = true;
|
LnkEditar.Visible = true;
|
||||||
LnkEliminar.Visible = true;
|
LnkEliminar.Visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (e.Row.DataKey("CveTimbre") != "")
|
if (e.Row.DataKey("CveTimbre") != "")
|
||||||
{
|
{
|
||||||
e.Row.FCCheckBox("Chk").Visible = false;
|
e.Row.FCCheckBox("Chk").Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Imports Extensiones
|
Imports System.Data
|
||||||
Imports System.Data
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class Inventarios_InventarioFisico
|
Partial Class Inventarios_InventarioFisico
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Inventarios_RecepcionAlmacen
|
Partial Class Inventarios_RecepcionAlmacen
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
'Imports DocumentFormat.OpenXml.Wordprocessing
|
'Imports DocumentFormat.OpenXml.Wordprocessing
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.IO
|
|
||||||
|
|
||||||
Partial Class Inventarios_ReporteEntradasSalidas
|
Partial Class Inventarios_ReporteEntradasSalidas
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
using System;
|
using Extensiones;
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
|
|
||||||
using Extensiones;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using Microsoft.Reporting.WebForms;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -248,7 +242,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -259,9 +253,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
CargaEstatus();
|
CargaEstatus();
|
||||||
CargaCombosModalEntrega();
|
CargaCombosModalEntrega();
|
||||||
InicializaFechas();
|
InicializaFechas();
|
||||||
CargaChoferes();
|
CargaChoferes();
|
||||||
UPFiltros.Update();
|
UPFiltros.Update();
|
||||||
CargarCentrosDeCosto(null, DdlSucursales, null, LblDdlSucursal);
|
CargarCentrosDeCosto(null, DdlSucursales, null, LblDdlSucursal);
|
||||||
|
|
||||||
@@ -279,7 +273,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||||
|
|
||||||
if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa,Estatus:1) && ObjInventarios.DtResultados.Rows.Count > 0)
|
if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus: 1) && ObjInventarios.DtResultados.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DdlModalCamion.DataSource = ObjInventarios.DtResultados;
|
DdlModalCamion.DataSource = ObjInventarios.DtResultados;
|
||||||
}
|
}
|
||||||
@@ -304,22 +298,22 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
||||||
{
|
{
|
||||||
DdlChofer.DataSource = ObjAcar.DtResultados;
|
DdlChofer.DataSource = ObjAcar.DtResultados;
|
||||||
}
|
}
|
||||||
ObjAcar.Dispose();
|
ObjAcar.Dispose();
|
||||||
DdlChofer.DataBind();
|
DdlChofer.DataBind();
|
||||||
DdlChofer.Items.Insert(0, new ListItem("Todos", "-1"));
|
DdlChofer.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void CargaEstatus()
|
protected void CargaEstatus()
|
||||||
{
|
{
|
||||||
|
|
||||||
DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1"));
|
DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||||
DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0"));
|
DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0"));
|
||||||
DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1"));
|
DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1"));
|
||||||
DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2"));
|
DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2"));
|
||||||
}
|
}
|
||||||
protected void InicializaFechas()
|
protected void InicializaFechas()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -333,7 +327,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||||
|
|
||||||
if (ObjGeneral.GetInvEntregaAlmacenRutaRep(DdlSucursales.SelectedValue.ToEntero(),UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), DdlChofer.SelectedValue.ToEntero(),UsuarioActual.CveUsuario))
|
if (ObjGeneral.GetInvEntregaAlmacenRutaRep(DdlSucursales.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), DdlChofer.SelectedValue.ToEntero(), UsuarioActual.CveUsuario))
|
||||||
{
|
{
|
||||||
DTDatos = ObjGeneral.DtResultados;
|
DTDatos = ObjGeneral.DtResultados;
|
||||||
GVDatos.DataSource = DTDatos;
|
GVDatos.DataSource = DTDatos;
|
||||||
@@ -342,8 +336,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
ObjGeneral.Dispose();
|
ObjGeneral.Dispose();
|
||||||
GVDatos.DataBind();
|
GVDatos.DataBind();
|
||||||
UPDatos.Update();
|
UPDatos.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region BOTONES
|
#region BOTONES
|
||||||
@@ -355,17 +349,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
protected void imgEditar_Click(object sender, EventArgs e)
|
protected void imgEditar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
|
|
||||||
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||||
CveTimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
CveTimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
||||||
|
|
||||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||||
int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero();
|
int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero();
|
||||||
|
|
||||||
DdlModalCamion.SelectedValueExist(GvRow.DataKey("CveCamion"));
|
DdlModalCamion.SelectedValueExist(GvRow.DataKey("CveCamion"));
|
||||||
DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer"));
|
DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer"));
|
||||||
|
|
||||||
TxtFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy");
|
TxtFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy");
|
||||||
TxtFechaLlegada.Text = GvRow.DataKey("FechaLlegada").ToDate().ToString("dd/MM/yyyy");
|
TxtFechaLlegada.Text = GvRow.DataKey("FechaLlegada").ToDate().ToString("dd/MM/yyyy");
|
||||||
@@ -383,11 +377,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
if (GvRow.DataKey("CveCamionRemolque2").ToEntero() > 0)
|
if (GvRow.DataKey("CveCamionRemolque2").ToEntero() > 0)
|
||||||
{
|
{
|
||||||
DdlRemolque2.SelectedValueExist(GvRow.DataKey("CveCamionRemolque2"));
|
DdlRemolque2.SelectedValueExist(GvRow.DataKey("CveCamionRemolque2"));
|
||||||
}
|
}
|
||||||
CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||||
CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
||||||
|
|
||||||
ModalActualizaDirecciones( CveTimbre);
|
ModalActualizaDirecciones(CveTimbre);
|
||||||
|
|
||||||
|
|
||||||
if (CveDireccionOrigen > 0)
|
if (CveDireccionOrigen > 0)
|
||||||
@@ -410,12 +404,13 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ModalActualizaDirecciones(int CveTimbre)
|
private void ModalActualizaDirecciones(int CveTimbre)
|
||||||
{
|
{
|
||||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||||
|
|
||||||
if (ObjGeneral.GetInvEntregaAlmacenRutaRep( -1, UsuarioActual.CveEmpresa, -1, new DateTime(1900,01,01), new DateTime(9000, 01, 01),-1, CveTimbre)) {
|
if (ObjGeneral.GetInvEntregaAlmacenRutaRep(-1, UsuarioActual.CveEmpresa, -1, new DateTime(1900, 01, 01), new DateTime(9000, 01, 01), -1, CveTimbre))
|
||||||
|
{
|
||||||
|
|
||||||
if (ObjGeneral.DtResultados.Rows.Count > 0)
|
if (ObjGeneral.DtResultados.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
if (CveDireccionOrigen > 0)
|
if (CveDireccionOrigen > 0)
|
||||||
@@ -438,7 +433,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionOrigen, int CveAlmacen )
|
private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionOrigen, int CveAlmacen)
|
||||||
{
|
{
|
||||||
|
|
||||||
//DdlModalDireccionOrigen.Items.Clear();
|
//DdlModalDireccionOrigen.Items.Clear();
|
||||||
@@ -483,7 +478,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual);
|
Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual);
|
||||||
StringBuilder MensajeAlert = new StringBuilder();
|
StringBuilder MensajeAlert = new StringBuilder();
|
||||||
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
||||||
if (ObjTimbres.MsgError =="" && ObjTimbres.Timbrar())
|
if (ObjTimbres.MsgError == "" && ObjTimbres.Timbrar())
|
||||||
{
|
{
|
||||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
||||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
@@ -494,12 +489,12 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError);
|
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError);
|
||||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgError);
|
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgError);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkCancelaTimbre_Click(object sender, EventArgs e)
|
protected void LnkCancelaTimbre_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool ProcesoOK = false;
|
bool ProcesoOK = false;
|
||||||
LinkButton LnkCancelarFolioFiscal = (LinkButton)sender;
|
LinkButton LnkCancelarFolioFiscal = (LinkButton)sender;
|
||||||
GridViewRow GvRow = (GridViewRow)LnkCancelarFolioFiscal.BindingContainer;
|
GridViewRow GvRow = (GridViewRow)LnkCancelarFolioFiscal.BindingContainer;
|
||||||
@@ -508,27 +503,29 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
string FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString();
|
string FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString();
|
||||||
string RFCReceptor = GvRow.DataKey("RFCReceptor").ToString();
|
string RFCReceptor = GvRow.DataKey("RFCReceptor").ToString();
|
||||||
string RFCEmisor = GvRow.DataKey("RFCEmisor").ToString();
|
string RFCEmisor = GvRow.DataKey("RFCEmisor").ToString();
|
||||||
int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero();
|
int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero();
|
||||||
int CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero();
|
int CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero();
|
||||||
int CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
int CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||||
string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto").ToString();
|
string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto").ToString();
|
||||||
|
|
||||||
|
|
||||||
Timbrado ObjCancelacion = new Timbrado();
|
Timbrado ObjCancelacion = new Timbrado();
|
||||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||||
ObjGenerales.IniciaTransacSQL ();
|
ObjGenerales.IniciaTransacSQL();
|
||||||
|
|
||||||
if (EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptor))
|
if (EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptor))
|
||||||
{
|
{
|
||||||
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion,"", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa )){
|
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
ProcesoOK = true;
|
ProcesoOK = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ModExtensiones.RespuestaCancelacionSAT Resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion, CveSATMotivoCancelacion: 3);
|
ModExtensiones.RespuestaCancelacionSAT Resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion, CveSATMotivoCancelacion: 3);
|
||||||
|
|
||||||
if (Resp.Verificado) {
|
if (Resp.Verificado)
|
||||||
|
{
|
||||||
|
|
||||||
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
@@ -543,7 +540,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
// CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
|
// CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
|
||||||
//}
|
//}
|
||||||
ProcesoOK = true;
|
ProcesoOK = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,17 +585,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
protected void BtnModalEditarentrega_Click(object sender, EventArgs e)
|
protected void BtnModalEditarentrega_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool ProcesoOK = true ;
|
bool ProcesoOK = true;
|
||||||
|
|
||||||
ClsGenerales ObjGral = new ClsGenerales();
|
ClsGenerales ObjGral = new ClsGenerales();
|
||||||
if(!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,-1,-1, DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa,
|
if (!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen, -1, -1, DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa,
|
||||||
TxtFechaLlegada.Text.ToDate(), CveCamionRemolque1: DdlRemolque1.SelectedValue.ToEntero(), CveCamionRemolque2: DdlRemolque2.SelectedValue.ToEntero(), Distancia: TxtDistancia.Text.ToEntero(),
|
TxtFechaLlegada.Text.ToDate(), CveCamionRemolque1: DdlRemolque1.SelectedValue.ToEntero(), CveCamionRemolque2: DdlRemolque2.SelectedValue.ToEntero(), Distancia: TxtDistancia.Text.ToEntero(),
|
||||||
CveConfigAutoTransporte: DdlConfigAuto.SelectedValue.ToEntero()))
|
CveConfigAutoTransporte: DdlConfigAuto.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
ProcesoOK = false;
|
ProcesoOK = false;
|
||||||
}
|
}
|
||||||
ObjGral.Dispose();
|
ObjGral.Dispose();
|
||||||
|
|
||||||
if (ProcesoOK)
|
if (ProcesoOK)
|
||||||
{
|
{
|
||||||
this.RegistraScript("$('#DivEditarEntrega').modal('hide');");
|
this.RegistraScript("$('#DivEditarEntrega').modal('hide');");
|
||||||
@@ -643,17 +640,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
if (e.Row.DataKey("Estatus").ToEntero() == 1)
|
if (e.Row.DataKey("Estatus").ToEntero() == 1)
|
||||||
{
|
{
|
||||||
LnkCancelaTimbre.Visible = UsuarioActual.TienePermisoProceso(338);
|
LnkCancelaTimbre.Visible = UsuarioActual.TienePermisoProceso(338);
|
||||||
|
|
||||||
if (bool.Parse(e.Row.DataKey("AplicaCP")))
|
if (bool.Parse(e.Row.DataKey("AplicaCP")))
|
||||||
{
|
{
|
||||||
if (e.Row.FCHyperLink("HplPDF") != null)
|
if (e.Row.FCHyperLink("HplPDF") != null)
|
||||||
e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) ;
|
e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre")));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (e.Row.FCHyperLink("HplPDF")!= null)
|
if (e.Row.FCHyperLink("HplPDF") != null)
|
||||||
e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre")));
|
e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre")));
|
||||||
}
|
}
|
||||||
|
|
||||||
string ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, e.Row.DataKey("TimbreTipoDocto"), e.Row.DataKey("SerieFolio"));
|
string ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, e.Row.DataKey("TimbreTipoDocto"), e.Row.DataKey("SerieFolio"));
|
||||||
@@ -663,7 +660,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
if (e.Row.FCHyperLink("HplXML") != null)
|
if (e.Row.FCHyperLink("HplXML") != null)
|
||||||
e.Row.FCHyperLink("HplXML").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", -1, "XML", e.Row.DataKey("SerieFolio"), e.Row.DataKey("TimbreTipoDocto")));
|
e.Row.FCHyperLink("HplXML").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", -1, "XML", e.Row.DataKey("SerieFolio"), e.Row.DataKey("TimbreTipoDocto")));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -698,7 +695,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
DdlModalChofer.Items.Clear();
|
DdlModalChofer.Items.Clear();
|
||||||
|
|
||||||
ClsAcarreos ObjAcar = new ClsAcarreos();
|
ClsAcarreos ObjAcar = new ClsAcarreos();
|
||||||
|
|
||||||
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
||||||
{
|
{
|
||||||
DdlModalChofer.DataSource = ObjAcar.DtResultados;
|
DdlModalChofer.DataSource = ObjAcar.DtResultados;
|
||||||
@@ -771,7 +768,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
{
|
{
|
||||||
ValidaConfiguracionVeiculo();
|
ValidaConfiguracionVeiculo();
|
||||||
}
|
}
|
||||||
private void ValidaConfiguracionVeiculo()
|
private void ValidaConfiguracionVeiculo()
|
||||||
{
|
{
|
||||||
DvRemolque1.Visible = false;
|
DvRemolque1.Visible = false;
|
||||||
DvRemolque2.Visible = false;
|
DvRemolque2.Visible = false;
|
||||||
@@ -834,7 +831,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||||
{
|
{
|
||||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2,Estatus:1))
|
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1))
|
||||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
|
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
@@ -873,10 +870,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||||
{
|
{
|
||||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus : 1))
|
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus: 1))
|
||||||
DdlModalCamion.DataSource = ObjInv.DtResultados;
|
DdlModalCamion.DataSource = ObjInv.DtResultados;
|
||||||
|
|
||||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1))
|
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1))
|
||||||
DdlRemolque1.DataSource = ObjInv.DtResultados;
|
DdlRemolque1.DataSource = ObjInv.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1028,7 +1025,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
DataTable DT = new DataTable();
|
DataTable DT = new DataTable();
|
||||||
|
|
||||||
if (ObjClientes.DireccionEnvioGet(CveDireccion, -1,-1))
|
if (ObjClientes.DireccionEnvioGet(CveDireccion, -1, -1))
|
||||||
{
|
{
|
||||||
DT = ObjClientes.DtResultados;
|
DT = ObjClientes.DtResultados;
|
||||||
}
|
}
|
||||||
@@ -1070,7 +1067,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
//CveDireccionEditar
|
//CveDireccionEditar
|
||||||
if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text.ToEntero(), "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1",
|
if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text.ToEntero(), "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1",
|
||||||
DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero())){
|
DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero()))
|
||||||
|
{
|
||||||
ErrorProceso = true;
|
ErrorProceso = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1103,8 +1101,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1114,4 +1113,3 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
using System;
|
using Extensiones;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using Extensiones;
|
|
||||||
using System.Data;
|
|
||||||
using Microsoft.Reporting.WebForms;
|
using Microsoft.Reporting.WebForms;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
|
||||||
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||||
@@ -47,8 +44,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
|
|
||||||
int CvePS = -1;
|
int CvePS = -1;
|
||||||
if (DdlPS.SelectedValue.ToEntero() > 0) CvePS = DdlPS.SelectedValue.ToEntero();
|
if (DdlPS.SelectedValue.ToEntero() > 0) CvePS = DdlPS.SelectedValue.ToEntero();
|
||||||
// aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad
|
// aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad
|
||||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||||
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
||||||
DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero()))
|
DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
@@ -62,7 +59,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
{
|
{
|
||||||
GvDatos.Columns[4].HeaderText = "F.Caducidad";
|
GvDatos.Columns[4].HeaderText = "F.Caducidad";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ObjInventarios.Dispose();
|
ObjInventarios.Dispose();
|
||||||
GvDatos.DataBind();
|
GvDatos.DataBind();
|
||||||
@@ -80,7 +77,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
|
|
||||||
private void CargarFechaText()
|
private void CargarFechaText()
|
||||||
{
|
{
|
||||||
DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month,1);
|
DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
|
||||||
//TxtFechaInicio.Text = date.AddYears(-5).ToString("dd/MM/yyyy");
|
//TxtFechaInicio.Text = date.AddYears(-5).ToString("dd/MM/yyyy");
|
||||||
TxtFechaFin.Text = date.AddMonths(6).AddDays(-1).ToString("dd/MM/yyyy");
|
TxtFechaFin.Text = date.AddMonths(6).AddDays(-1).ToString("dd/MM/yyyy");
|
||||||
DdlPS.setEsWebService(true);
|
DdlPS.setEsWebService(true);
|
||||||
@@ -106,7 +103,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
DdlSucursal.DataBind();
|
DdlSucursal.DataBind();
|
||||||
DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1"));
|
DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,14 +116,14 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
//}
|
//}
|
||||||
//ObjClasificacion.Dispose();
|
//ObjClasificacion.Dispose();
|
||||||
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
|
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
|
||||||
DdlClasificacion.DataBind();
|
DdlClasificacion.DataBind();
|
||||||
DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1"));
|
DdlClasificacion.Items.Insert(0, new ListItem("Todas", "-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void CargaAlamacenes(int CveSubProyectoFiltro = -1)
|
private void CargaAlamacenes(int CveSubProyectoFiltro = -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
ddlAlmacen.Items.Clear();
|
ddlAlmacen.Items.Clear();
|
||||||
@@ -138,8 +135,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1);
|
ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ddlAlmacen.DataBind();
|
ddlAlmacen.DataBind();
|
||||||
ddlAlmacen.Items.Insert(0, new ListItem("Todos", "-1"));
|
ddlAlmacen.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||||
|
|
||||||
@@ -147,7 +144,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -179,10 +176,10 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||||
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||||
|
|
||||||
@params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0": "1" ));
|
@params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0" : "1"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||||
@@ -228,5 +225,5 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
CargarDatos();//Si no se recarga no se muestran los valores dela la columna de tiempo caducindad laprimera vez que pasa de oculta a mostrarse
|
CargarDatos();//Si no se recarga no se muestran los valores dela la columna de tiempo caducindad laprimera vez que pasa de oculta a mostrarse
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using Extensiones;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using static Extensiones.ModExtensiones;
|
using static Extensiones.ModExtensiones;
|
||||||
@@ -42,12 +41,12 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
UpDatos.Update();
|
{
|
||||||
}
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
{
|
{
|
||||||
e.Row.Cells[6].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-excel\"></i></a>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "XML", $"Tra-{e.Row.DBCampo("Folio")}", "Tra")));
|
e.Row.Cells[6].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-excel\"></i></a>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "XML", $"Tra-{e.Row.DBCampo("Folio")}", "Tra")));
|
||||||
if (UsuarioActual.Empresa.Funcionalidad(161) == "1")
|
if (UsuarioActual.Empresa.Funcionalidad(161) == "1")
|
||||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
e.Row.Cells[7].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-pdf\"></i></a>", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "PDF", $"Tra-{e.Row.DBCampo("Folio")}", "Tra")));
|
||||||
else
|
else
|
||||||
e.Row.Cells[7].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-pdf\"></i></a>", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "PDF", $"Tra-{e.Row.DBCampo("Folio")}", "Tra")));
|
e.Row.Cells[7].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-pdf\"></i></a>", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "PDF", $"Tra-{e.Row.DBCampo("Folio")}", "Tra")));
|
||||||
if (e.Row.DBCampo("CveEstatusTimbrado").ToEntero() == 2)
|
if (e.Row.DBCampo("CveEstatusTimbrado").ToEntero() == 2)
|
||||||
@@ -58,9 +57,9 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkCancelarTraspaso_Click(object sender, EventArgs e)
|
protected void LnkCancelarTraspaso_Click(object sender, EventArgs e)
|
||||||
}
|
{
|
||||||
GridViewRow Gvr = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow Gvr = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
|
Timbrado ObjCancelacion = new Timbrado();
|
||||||
DateTime CancelacionFecha = MinFecha;
|
DateTime CancelacionFecha = MinFecha;
|
||||||
int CveEstatusTimbrado = 0;
|
int CveEstatusTimbrado = 0;
|
||||||
string FolioFiscal = Gvr.DataKey("FolioFiscal").ToString(), SelloCancelacion = "";
|
string FolioFiscal = Gvr.DataKey("FolioFiscal").ToString(), SelloCancelacion = "";
|
||||||
@@ -68,7 +67,8 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
|||||||
var resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, 0, UsuarioActual.Empresa.RFC, UsuarioActual.Empresa.RFC, 4, false);
|
var resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, 0, UsuarioActual.Empresa.RFC, UsuarioActual.Empresa.RFC, 4, false);
|
||||||
if (resp.Verificado)
|
if (resp.Verificado)
|
||||||
{
|
{
|
||||||
int CveMovimiento = Gvr.DataKey("CveMovimiento").ToEntero();
|
CancelacionFecha = ObjCancelacion.CancelacionFecha;
|
||||||
|
SelloCancelacion = ObjCancelacion.CancelacionAcuse;
|
||||||
CveEstatusTimbrado = 2;
|
CveEstatusTimbrado = 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3161,7 +3161,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If ChkTransitorio.Checked Then
|
If ChkTransitorio.Checked Then
|
||||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ")
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ")
|
||||||
Else
|
Else
|
||||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22) ")
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (1,21,22) ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlAlmacenDestino.DataBind()
|
DdlAlmacenDestino.DataBind()
|
||||||
@@ -3171,12 +3171,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim Str As String
|
Dim Str As String
|
||||||
If ChkTransitorio.Checked Then
|
If ChkTransitorio.Checked Then
|
||||||
Str = "" ' String.Format(" AND CveSubProyecto <> {0} ", DrAlmO("CveSubProyecto")) 'RMF. pueden haber almacen que esten dentro de lamisma sucursal, pero que requeiren transitorio
|
Str = "" ' String.Format(" AND CveSubProyecto <> {0} ", DrAlmO("CveSubProyecto")) 'RMF. pueden haber almacen que esten dentro de lamisma sucursal, pero que requeiren transitorio
|
||||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} AND Estatus = 'Activo' ", Str))
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} AND Estatus = 'Activo' ", Str))
|
||||||
Else
|
Else
|
||||||
Str = String.Format(" AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto"))
|
Str = String.Format(" AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto"))
|
||||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} ", Str))
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} ", Str))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlAlmacenDestino.DataBind()
|
DdlAlmacenDestino.DataBind()
|
||||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Data.OleDb
|
Imports System.Data.OleDb
|
||||||
|
Imports System.IO
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class CatSubProyectos
|
Partial Class CatSubProyectos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "P R O P I E D A D E S"
|
#Region "P R O P I E D A D E S"
|
||||||
Public Property DtSegmentosNegocio As Data.DataTable
|
Public Property DtSegmentosNegocio As Data.DataTable
|
||||||
Get
|
Get
|
||||||
@@ -33,9 +33,9 @@ Partial Class CatSubProyectos
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveCentroCosto") = value
|
ViewState("CveCentroCosto") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
ViewState("Orden") = ""
|
ViewState("Orden") = ""
|
||||||
@@ -90,8 +90,8 @@ Partial Class CatSubProyectos
|
|||||||
Private Sub RecargaGlobal()
|
Private Sub RecargaGlobal()
|
||||||
GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
||||||
GlobalDTSubProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTSubProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "O R D E N A M I E N T O"
|
#Region "O R D E N A M I E N T O"
|
||||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
Dim Orden As String = ""
|
Dim Orden As String = ""
|
||||||
@@ -114,10 +114,10 @@ Partial Class CatSubProyectos
|
|||||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||||
ViewState("Orden") = Orden
|
ViewState("Orden") = Orden
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "C A R G A S"
|
#Region "C A R G A S"
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
@@ -189,9 +189,9 @@ Partial Class CatSubProyectos
|
|||||||
' 'End If
|
' 'End If
|
||||||
'Next
|
'Next
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "GV"
|
#Region "GV"
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -312,11 +312,11 @@ Partial Class CatSubProyectos
|
|||||||
CargaRequired()
|
CargaRequired()
|
||||||
UpAddCentroEstatus.Update()
|
UpAddCentroEstatus.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarCentroCosto"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarCentroCosto"))
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "G U A R D A R"
|
#Region "G U A R D A R"
|
||||||
|
|
||||||
Private Function ValidaComercioExterior() As Boolean
|
Private Function ValidaComercioExterior() As Boolean
|
||||||
If ChkAplicaComercioExterior.Checked Then
|
If ChkAplicaComercioExterior.Checked Then
|
||||||
If Not DdlPais.SelectedValue.ToEntero > 0 Then
|
If Not DdlPais.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -501,11 +501,11 @@ Partial Class CatSubProyectos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "E X C E L"
|
#Region "E X C E L"
|
||||||
Protected Sub downExcel_Click(sender As Object, e As EventArgs)
|
Protected Sub downExcel_Click(sender As Object, e As EventArgs)
|
||||||
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
@@ -664,12 +664,12 @@ Partial Class CatSubProyectos
|
|||||||
Select Case Extension
|
Select Case Extension
|
||||||
Case ".xls"
|
Case ".xls"
|
||||||
'Excel 97-03
|
'Excel 97-03
|
||||||
conStr = ConfigurationManager.ConnectionStrings("Excel03ConString") _
|
conStr = ConfigurationManager.ConnectionStrings("Excel03ConString") _
|
||||||
.ConnectionString
|
.ConnectionString
|
||||||
Exit Select
|
Exit Select
|
||||||
Case ".xlsx"
|
Case ".xlsx"
|
||||||
'Excel 07
|
'Excel 07
|
||||||
conStr = ConfigurationManager.ConnectionStrings("Excel07ConString") _
|
conStr = ConfigurationManager.ConnectionStrings("Excel07ConString") _
|
||||||
.ConnectionString
|
.ConnectionString
|
||||||
Exit Select
|
Exit Select
|
||||||
End Select
|
End Select
|
||||||
@@ -811,14 +811,14 @@ Partial Class CatSubProyectos
|
|||||||
|
|
||||||
Private Sub ChkEsSucursal_CheckedChanged(sender As Object, e As EventArgs) Handles ChkEsSucursal.CheckedChanged
|
Private Sub ChkEsSucursal_CheckedChanged(sender As Object, e As EventArgs) Handles ChkEsSucursal.CheckedChanged
|
||||||
CargaRequired()
|
CargaRequired()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "COMERCIO EXTERIOR"
|
#Region "COMERCIO EXTERIOR"
|
||||||
|
|
||||||
Private Sub CargaPais()
|
Private Sub CargaPais()
|
||||||
DdlPais.DataSource = GlobalDTGralPaises()
|
DdlPais.DataSource = GlobalDTGralPaises()
|
||||||
DdlPais.DataBind()
|
DdlPais.DataBind()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Imports Extensiones
|
Imports System.Data
|
||||||
Imports System.Data
|
Imports Extensiones
|
||||||
Partial Class Sistemas_PopUpAddUsuario
|
Partial Class Sistemas_PopUpAddUsuario
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
#Region "PROPIEDADES"
|
#Region "PROPIEDADES"
|
||||||
|
|||||||
@@ -1496,8 +1496,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Porcentaje Máximo:</td>
|
<td>Porcentaje Máximo:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtPorcentajeMaximoAutorizacion" runat="server" Width="100px"></asp:TextBox>
|
<asp:TextBox ID="TxtPorcentajeMaximoAutorizacion" runat="server" Width="70px"></asp:TextBox>
|
||||||
<asp:RangeValidator ID="RVPM" runat="server" Type="Double" MinimumValue="0" MaximumValue="999999" ErrorMessage="El campo <b>''Porcentaje Máximo''</b> no tiene el formato correcto, por favor ingréselo." ControlToValidate="TxtPorcentajeMaximoAutorizacion" Display="None" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVPM" runat="server" Type="Decimal" MinimumValue="0" MaximumValue="999999.99" ErrorMessage="El campo <b>''Porcentaje Máximo''</b> no tiene el formato correcto, por favor ingréselo." ControlToValidate="TxtPorcentajeMaximoAutorizacion" Display="None" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPM" runat="server" HighlightCssClass="vco" TargetControlID="RVPM" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPM" runat="server" HighlightCssClass="vco" TargetControlID="RVPM" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Threading
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class Sistemas_UsuarioDetalle
|
Partial Class Sistemas_UsuarioDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports GemBox.Spreadsheet
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports Extensiones
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class Ventas_ActualizarPrecios
|
Partial Class Ventas_ActualizarPrecios
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Runtime.InteropServices
|
|
||||||
Imports System.IO
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.Net.Http
|
Imports System.IO
|
||||||
Imports Newtonsoft.Json
|
|
||||||
Imports System.Threading.Tasks
|
|
||||||
Imports Newtonsoft.Json.Linq
|
|
||||||
Imports System.Net
|
Imports System.Net
|
||||||
Imports System.Collections.Generic
|
Imports System.Net.Http
|
||||||
Imports Newtonsoft.Json.Serialization
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
Imports Newtonsoft.Json.Linq
|
||||||
|
|
||||||
Partial Class Clientes
|
Partial Class Clientes
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
'Configuración
|
'Configuración
|
||||||
#Region "P R O P I E D A D E S"
|
#Region "P R O P I E D A D E S"
|
||||||
Private Const NumeroDecimales As Integer = 2
|
Private Const NumeroDecimales As Integer = 2
|
||||||
Private CveVentaDeduccion As Integer
|
Private CveVentaDeduccion As Integer
|
||||||
@@ -503,10 +499,10 @@ Partial Class Clientes
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
ViewState("linkDescargaPagare") = value
|
ViewState("linkDescargaPagare") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Documentacion"
|
#Region "Documentacion"
|
||||||
Private Property DTDocumentacion As DataTable
|
Private Property DTDocumentacion As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -617,21 +613,21 @@ Partial Class Clientes
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
ViewState("AdjuntoDocumentacion") = value
|
ViewState("AdjuntoDocumentacion") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
'Private ReadOnly Property CvePersonal As Integer
|
'Private ReadOnly Property CvePersonal As Integer
|
||||||
' Get
|
' Get
|
||||||
' If ViewState("CvePersonal") Is Nothing Then
|
' If ViewState("CvePersonal") Is Nothing Then
|
||||||
' Return -1
|
' Return -1
|
||||||
' Else
|
' Else
|
||||||
' Return ViewState("CvePersonal").ToString().Toentero()
|
' Return ViewState("CvePersonal").ToString().Toentero()
|
||||||
' End If
|
' End If
|
||||||
' End Get
|
' End Get
|
||||||
'End Property
|
'End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region " A C U M U L A D O R E S"
|
#Region " A C U M U L A D O R E S"
|
||||||
Property CveVentaNota As Integer
|
Property CveVentaNota As Integer
|
||||||
Get
|
Get
|
||||||
@@ -671,10 +667,10 @@ Partial Class Clientes
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
ViewState("SerieNotaAcumulador") = value
|
ViewState("SerieNotaAcumulador") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
@@ -924,10 +920,10 @@ Partial Class Clientes
|
|||||||
ChkPermiso5.Enabled = False
|
ChkPermiso5.Enabled = False
|
||||||
ChkPermiso6.Enabled = False
|
ChkPermiso6.Enabled = False
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " PERMISOS PAGINAS "
|
#Region " PERMISOS PAGINAS "
|
||||||
|
|
||||||
Private Sub MostrarTxtDireccionesClienteEnvio()
|
Private Sub MostrarTxtDireccionesClienteEnvio()
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||||
@@ -964,18 +960,18 @@ Partial Class Clientes
|
|||||||
If Not ChkEsDistribuidor.Checked Then
|
If Not ChkEsDistribuidor.Checked Then
|
||||||
BtnGuardar.Visible = PermiteEditar()
|
BtnGuardar.Visible = PermiteEditar()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "C A R G A S"
|
#Region "C A R G A S"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CreaDtPago()
|
Private Sub CreaDtPago()
|
||||||
DtPagos = New DataTable
|
DtPagos = New DataTable
|
||||||
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
||||||
@@ -1169,9 +1165,9 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Select Case HdnCuenta.Value
|
Select Case HdnCuenta.Value
|
||||||
Case "1"
|
Case "1"
|
||||||
CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
|
CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
|
||||||
Case "2"
|
Case "2"
|
||||||
CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
|
CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
|
||||||
Case "3"
|
Case "3"
|
||||||
CargaDdlCuentasContables(DdlCtaContableRetIVA, -1)
|
CargaDdlCuentasContables(DdlCtaContableRetIVA, -1)
|
||||||
Case "4"
|
Case "4"
|
||||||
@@ -1179,11 +1175,11 @@ Partial Class Clientes
|
|||||||
Case "5"
|
Case "5"
|
||||||
CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1)
|
CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1)
|
||||||
Case "6"
|
Case "6"
|
||||||
CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
|
CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
|
||||||
Case "7"
|
Case "7"
|
||||||
CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1)
|
CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1)
|
||||||
Case "8"
|
Case "8"
|
||||||
CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
|
CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
|
||||||
Case "9"
|
Case "9"
|
||||||
CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero()
|
CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero()
|
||||||
End Select
|
End Select
|
||||||
@@ -2126,12 +2122,12 @@ Partial Class Clientes
|
|||||||
CargaBancos(51)
|
CargaBancos(51)
|
||||||
BtnVerMasBancos.Text = "Ver Más"
|
BtnVerMasBancos.Text = "Ver Más"
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "B A N C O S"
|
#Region "B A N C O S"
|
||||||
'CuentasxCobrar Activas (Pagos Recibidos)
|
'CuentasxCobrar Activas (Pagos Recibidos)
|
||||||
Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1)
|
Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1)
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
'CxC Activas
|
'CxC Activas
|
||||||
@@ -2194,9 +2190,9 @@ Partial Class Clientes
|
|||||||
TxtParaMail.Text = TxtCobranzaCorreo.Text
|
TxtParaMail.Text = TxtCobranzaCorreo.Text
|
||||||
UpSendMail.Update()
|
UpSendMail.Update()
|
||||||
RegistraScript("$('#ModalDivMail').modal('show');")
|
RegistraScript("$('#ModalDivMail').modal('show');")
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "B T N ´ S"
|
#Region "B T N ´ S"
|
||||||
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
|
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
|
||||||
Dim ObjClientes As New ClsClientes()
|
Dim ObjClientes As New ClsClientes()
|
||||||
@@ -2497,18 +2493,18 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CargaSucursal()
|
'CargaSucursal()
|
||||||
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
||||||
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa))
|
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa))
|
||||||
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
|
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
|
||||||
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
|
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
'End If
|
'End If
|
||||||
Dim ObjClientes As New ClsClientes()
|
Dim ObjClientes As New ClsClientes()
|
||||||
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
|
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
|
||||||
Dim MsgCuentaContable As String = ""
|
Dim MsgCuentaContable As String = ""
|
||||||
Dim ErrorProceso As Boolean = False
|
Dim ErrorProceso As Boolean = False
|
||||||
@@ -2538,85 +2534,85 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim errorContPaq As Boolean = False
|
Dim errorContPaq As Boolean = False
|
||||||
Dim IdContPaqi As Integer = 0
|
Dim IdContPaqi As Integer = 0
|
||||||
Dim CodigoPersona As Integer = 0
|
Dim CodigoPersona As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
#Region "comentado"
|
#Region "comentado"
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
|
||||||
|
|
||||||
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
|
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
|
' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
|
||||||
|
|
||||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero()
|
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero()
|
||||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||||
|
|
||||||
' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0)
|
' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0)
|
||||||
' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
|
' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
|
||||||
' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
|
' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
|
||||||
|
|
||||||
' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
|
' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
|
||||||
' errorContPaq = False
|
' errorContPaq = False
|
||||||
' Else
|
' Else
|
||||||
' errorContPaq = True
|
' errorContPaq = True
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' Else
|
' Else
|
||||||
' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
|
' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
|
||||||
|
|
||||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
|
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
|
||||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||||
' errorContPaq = False
|
' errorContPaq = False
|
||||||
' Else
|
' Else
|
||||||
' errorContPaq = True
|
' errorContPaq = True
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
' If Not errorContPaq Then
|
' If Not errorContPaq Then
|
||||||
' Dim IdContPaqiCliente As Integer
|
' Dim IdContPaqiCliente As Integer
|
||||||
|
|
||||||
' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
|
' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
|
||||||
|
|
||||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
|
' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
|
||||||
|
|
||||||
' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
|
' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
|
||||||
' errorContPaq = False
|
' errorContPaq = False
|
||||||
' Else
|
' Else
|
||||||
' errorContPaq = True
|
' errorContPaq = True
|
||||||
' End If
|
' End If
|
||||||
' Else
|
' Else
|
||||||
' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
|
' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
|
||||||
' errorContPaq = False
|
' errorContPaq = False
|
||||||
' Else
|
' Else
|
||||||
' errorContPaq = True
|
' errorContPaq = True
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' Else
|
' Else
|
||||||
' errorContPaq = True
|
' errorContPaq = True
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
' If Not errorContPaq Then
|
' If Not errorContPaq Then
|
||||||
' ObjContPaqi.Commit()
|
' ObjContPaqi.Commit()
|
||||||
' ObjContPaqi.Dispose()
|
' ObjContPaqi.Dispose()
|
||||||
' Else
|
' Else
|
||||||
' ObjContPaqi.RollBack()
|
' ObjContPaqi.RollBack()
|
||||||
' ObjContPaqi.Dispose()
|
' ObjContPaqi.Dispose()
|
||||||
' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
|
' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
'End If
|
'End If
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
|
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
|
||||||
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
|
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
|
||||||
|
|
||||||
@@ -2867,11 +2863,11 @@ Partial Class Clientes
|
|||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
objDoc.Dispose()
|
objDoc.Dispose()
|
||||||
RecargaGlobal()
|
RecargaGlobal()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "G L O B L A L"
|
#Region "G L O B L A L"
|
||||||
Private Sub RecargaGlobal()
|
Private Sub RecargaGlobal()
|
||||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
||||||
@@ -2885,10 +2881,10 @@ Partial Class Clientes
|
|||||||
' Application("GlobalDTCliente") = Objclientes.DtResultados
|
' Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||||
'End If
|
'End If
|
||||||
'Objclientes.Dispose()
|
'Objclientes.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "G R I D V I E W S"
|
#Region "G R I D V I E W S"
|
||||||
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
|
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -3049,11 +3045,11 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "R H"
|
#Region "R H"
|
||||||
|
|
||||||
Private Sub CargaPersonalAsignado()
|
Private Sub CargaPersonalAsignado()
|
||||||
Dim ObjPersonal As New ClsRH
|
Dim ObjPersonal As New ClsRH
|
||||||
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
||||||
@@ -3126,9 +3122,9 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "S U C U R S A L E S"
|
#Region "S U C U R S A L E S"
|
||||||
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
||||||
ChkEstatusSucursal.Checked = True
|
ChkEstatusSucursal.Checked = True
|
||||||
@@ -3260,7 +3256,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
UpModalDivMapa.Update()
|
UpModalDivMapa.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#Region "G V S U C U R S A L E S"
|
#Region "G V S U C U R S A L E S"
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound
|
||||||
|
|
||||||
@@ -3382,9 +3378,9 @@ Partial Class Clientes
|
|||||||
Else
|
Else
|
||||||
CargaGrid("", 0)
|
CargaGrid("", 0)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "G V U S U A R I O S P O R T A L"
|
#Region "G V U S U A R I O S P O R T A L"
|
||||||
Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
|
Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
|
||||||
If e.CommandName = "RestablecerContraseña" Then
|
If e.CommandName = "RestablecerContraseña" Then
|
||||||
@@ -3536,9 +3532,9 @@ Partial Class Clientes
|
|||||||
CargaGrid("", 1)
|
CargaGrid("", 1)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "O R D E N A M I E N T O"
|
#Region "O R D E N A M I E N T O"
|
||||||
Private Sub CargaGrid(Orden As String, gvi As Integer)
|
Private Sub CargaGrid(Orden As String, gvi As Integer)
|
||||||
If gvi = 0 Then
|
If gvi = 0 Then
|
||||||
@@ -3570,12 +3566,12 @@ Partial Class Clientes
|
|||||||
UPPUsuarios.Update()
|
UPPUsuarios.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "U S U A R I O S"
|
#Region "U S U A R I O S"
|
||||||
Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click
|
Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click
|
||||||
Dim ObjUsuario As New ClsSisUsuarios
|
Dim ObjUsuario As New ClsSisUsuarios
|
||||||
@@ -3757,9 +3753,9 @@ Partial Class Clientes
|
|||||||
ChkPermiso5.Checked = False
|
ChkPermiso5.Checked = False
|
||||||
ChkPermiso6.Checked = False
|
ChkPermiso6.Checked = False
|
||||||
ChkPermiso7.Checked = False
|
ChkPermiso7.Checked = False
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "E V E N T O - B I T A C O R A"
|
#Region "E V E N T O - B I T A C O R A"
|
||||||
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
|
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -3968,11 +3964,11 @@ Partial Class Clientes
|
|||||||
BtnActivaRegistroISR.Visible = True
|
BtnActivaRegistroISR.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " I M P R I M I R P D F"
|
#Region " I M P R I M I R P D F"
|
||||||
|
|
||||||
Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
DdlTipoDocto.ClearSelection()
|
DdlTipoDocto.ClearSelection()
|
||||||
If ChkAntIXCNC.Checked Then
|
If ChkAntIXCNC.Checked Then
|
||||||
@@ -4294,9 +4290,9 @@ Partial Class Clientes
|
|||||||
End Using
|
End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "E N V I O C O R R E O"
|
#Region "E N V I O C O R R E O"
|
||||||
Private Sub EnviaCorreo(Liga As String, LigaActivar As String)
|
Private Sub EnviaCorreo(Liga As String, LigaActivar As String)
|
||||||
|
|
||||||
@@ -4364,11 +4360,11 @@ Partial Class Clientes
|
|||||||
a.GuardaLog()
|
a.GuardaLog()
|
||||||
Dim Mail As New ClsSisMail()
|
Dim Mail As New ClsSisMail()
|
||||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " COTIZACIONES "
|
#Region " COTIZACIONES "
|
||||||
|
|
||||||
Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs)
|
||||||
If BtnVerMasCot.Text = "Ver Más" Then
|
If BtnVerMasCot.Text = "Ver Más" Then
|
||||||
CargaCotizaciones(-1)
|
CargaCotizaciones(-1)
|
||||||
@@ -4438,11 +4434,11 @@ Partial Class Clientes
|
|||||||
HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}"
|
HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "D I R E C C I O N E N V I O "
|
#Region "D I R E C C I O N E N V I O "
|
||||||
|
|
||||||
Private Sub CargaCombosDirecionesClientesSAT()
|
Private Sub CargaCombosDirecionesClientesSAT()
|
||||||
CargaDirClientePais()
|
CargaDirClientePais()
|
||||||
CargaDirClienteEstado()
|
CargaDirClienteEstado()
|
||||||
@@ -4657,12 +4653,12 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
CargaDireccionesEnvio()
|
CargaDireccionesEnvio()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " IMPORTAR SALDOS "
|
#Region " IMPORTAR SALDOS "
|
||||||
|
|
||||||
Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click
|
Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click
|
||||||
CargaClientesImportarSaldos()
|
CargaClientesImportarSaldos()
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos"))
|
||||||
@@ -4768,9 +4764,9 @@ Partial Class Clientes
|
|||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo")))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo")))
|
||||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo")))
|
e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo")))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Cuentas/Equipos"
|
#Region "Cuentas/Equipos"
|
||||||
Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs)
|
Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs)
|
||||||
HdnModalidad.Value = "I"
|
HdnModalidad.Value = "I"
|
||||||
@@ -5358,9 +5354,9 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "GPS"
|
#Region "GPS"
|
||||||
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
|
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
|
||||||
If hdnArrayDispositivo.Value.Length > 0 Then
|
If hdnArrayDispositivo.Value.Length > 0 Then
|
||||||
@@ -5501,10 +5497,10 @@ Partial Class Clientes
|
|||||||
UpMoverDispositivo.Update()
|
UpMoverDispositivo.Update()
|
||||||
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
|
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Sucursales"
|
#Region "Sucursales"
|
||||||
Public Sub CreaDTSucursales()
|
Public Sub CreaDTSucursales()
|
||||||
|
|
||||||
@@ -5738,14 +5734,14 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "G P S"
|
#Region "G P S"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -5816,16 +5812,16 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "C O N T R A T O S"
|
#Region "C O N T R A T O S"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaDatosContrato()
|
Private Sub CargaDatosContrato()
|
||||||
If CveCliente <= 0 Then
|
If CveCliente <= 0 Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -5870,10 +5866,10 @@ Partial Class Clientes
|
|||||||
e.Row.CssClass = "Totales white"
|
e.Row.CssClass = "Totales white"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "M E T O D O S "
|
#Region "M E T O D O S "
|
||||||
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
||||||
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
|
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
|
||||||
@@ -6283,13 +6279,13 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "IMPRIMIR GVHistorial"
|
#Region "IMPRIMIR GVHistorial"
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||||
Dim retorno As Byte() = Nothing
|
Dim retorno As Byte() = Nothing
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
@@ -6372,18 +6368,18 @@ Partial Class Clientes
|
|||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
|
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "C O B R A N Z A"
|
#Region "C O B R A N Z A"
|
||||||
Public Sub Visitas_Click(sender As Object, e As EventArgs)
|
Public Sub Visitas_Click(sender As Object, e As EventArgs)
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Usuarios"
|
#Region "Usuarios"
|
||||||
Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting
|
Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting
|
||||||
Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero()
|
Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero()
|
||||||
@@ -6418,12 +6414,12 @@ Partial Class Clientes
|
|||||||
e.Row.Cells(5).Visible = False
|
e.Row.Cells(5).Visible = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "C U E N T A S - B A N C A R I A S"
|
#Region "C U E N T A S - B A N C A R I A S"
|
||||||
|
|
||||||
Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False)
|
Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False)
|
||||||
|
|
||||||
If CveCliente <= 0 Then Exit Sub
|
If CveCliente <= 0 Then Exit Sub
|
||||||
@@ -6596,8 +6592,8 @@ Partial Class Clientes
|
|||||||
TxtNumeroCuenta2.Text = ""
|
TxtNumeroCuenta2.Text = ""
|
||||||
TxtConvenioCIE2.Text = ""
|
TxtConvenioCIE2.Text = ""
|
||||||
TxtReferencia2.Text = ""
|
TxtReferencia2.Text = ""
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "GRIDVIEW - CUENTAS BANCARIAS"
|
#Region "GRIDVIEW - CUENTAS BANCARIAS"
|
||||||
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
|
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -6653,10 +6649,10 @@ Partial Class Clientes
|
|||||||
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
|
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Sub CargaPSGridCuentasBancos()
|
Private Sub CargaPSGridCuentasBancos()
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
GvBancosCuentas.DataSource = DTCuentasBancos
|
GvBancosCuentas.DataSource = DTCuentasBancos
|
||||||
@@ -6714,9 +6710,9 @@ Partial Class Clientes
|
|||||||
divestatus.Visible = True
|
divestatus.Visible = True
|
||||||
UpAddBancos.Update()
|
UpAddBancos.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel"
|
#Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel"
|
||||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
||||||
GenerarPDF("Excel")
|
GenerarPDF("Excel")
|
||||||
@@ -6742,11 +6738,11 @@ Partial Class Clientes
|
|||||||
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "VENTAS"
|
#Region "VENTAS"
|
||||||
|
|
||||||
Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte()
|
Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte()
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
Dim Vta As Modelos.Factura = Nothing
|
Dim Vta As Modelos.Factura = Nothing
|
||||||
@@ -6977,10 +6973,10 @@ Partial Class Clientes
|
|||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
Return PdfFactura(Vta)
|
Return PdfFactura(Vta)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "COMERCIO EXTERIOR"
|
#Region "COMERCIO EXTERIOR"
|
||||||
Public Sub CargaCombosComercioExterior()
|
Public Sub CargaCombosComercioExterior()
|
||||||
|
|
||||||
@@ -7104,12 +7100,12 @@ Partial Class Clientes
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CargaColonia()
|
CargaColonia()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "D O C U M E N T A C I O N "
|
#Region "D O C U M E N T A C I O N "
|
||||||
|
|
||||||
Private Sub CargaDocumentacionCliente()
|
Private Sub CargaDocumentacionCliente()
|
||||||
Dim objRH As New ClsEdocumentacion()
|
Dim objRH As New ClsEdocumentacion()
|
||||||
|
|
||||||
@@ -8607,9 +8603,9 @@ Partial Class Clientes
|
|||||||
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
|
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PORCENTAJE PRECIO DE MARCAS"
|
#Region "PORCENTAJE PRECIO DE MARCAS"
|
||||||
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
|
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
|
||||||
@@ -8833,9 +8829,9 @@ Partial Class Clientes
|
|||||||
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
|
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
|
||||||
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
|
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
|
||||||
@@ -9071,12 +9067,12 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
|
||||||
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2)
|
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " A C U M U L A D O R E S"
|
#Region " A C U M U L A D O R E S"
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs)
|
||||||
'CveVentaNota = 0
|
'CveVentaNota = 0
|
||||||
|
|
||||||
@@ -9715,11 +9711,11 @@ Partial Class Clientes
|
|||||||
|
|
||||||
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel"
|
#Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel"
|
||||||
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
|
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
|
||||||
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
|
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
|
||||||
@@ -9794,7 +9790,7 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
Acum.Dispose()
|
Acum.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
Imports System.Data
|
Imports Extensiones
|
||||||
Imports Extensiones
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
|
|
||||||
Partial Class MetasVendedoresDetalle
|
Partial Class MetasVendedoresDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Linq
|
|
||||||
Imports System.Security.Cryptography.X509Certificates
|
|
||||||
Imports System.Globalization
|
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports System.Security.Cryptography.X509Certificates
|
||||||
Imports ADSSession
|
Imports ADSSession
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class PV
|
Partial Class PV
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
using System;
|
using Extensiones;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.ServiceModel;
|
|
||||||
using System.Text;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using Extensiones;
|
|
||||||
using static Extensiones.ModExtensiones;
|
|
||||||
using Microsoft.Reporting.WebForms;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using static Extensiones.ModExtensiones;
|
||||||
|
|
||||||
public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -77,7 +71,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
GvRefacturaciones.DataSource = DtRefacturar;
|
GvRefacturaciones.DataSource = DtRefacturar;
|
||||||
GvRefacturaciones.DataBind();
|
GvRefacturaciones.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GvDatos.DataBind();
|
GvDatos.DataBind();
|
||||||
UPDatos.Update();
|
UPDatos.Update();
|
||||||
@@ -107,9 +101,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
Msg = resp.Mensaje;
|
Msg = resp.Mensaje;
|
||||||
if (CveEstatusRefact == "4")
|
if (CveEstatusRefact == "4")
|
||||||
{
|
{
|
||||||
Msg = Msg+ "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" + CveVenta + "&NuevaFactura=1'> Refacturar</a>";
|
Msg = Msg + "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" + CveVenta + "&NuevaFactura=1'> Refacturar</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
Alert(Msg, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
Alert(Msg, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
||||||
}
|
}
|
||||||
@@ -228,7 +222,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (respCancelacion.CveEstatus == 20)
|
if (respCancelacion.CveEstatus == 20)
|
||||||
{
|
{
|
||||||
sb.Append("El estatus de la factura fue cambiado a <b>'Cancelación en proceso'</b>.");
|
sb.Append("El estatus de la factura fue cambiado a <b>'Cancelación en proceso'</b>.");
|
||||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||||
}
|
}
|
||||||
else if (respCancelacion.CveEstatus == 23)
|
else if (respCancelacion.CveEstatus == 23)
|
||||||
@@ -589,9 +583,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
e.Row.FCHyperLink("HplRefact").Visible = true;
|
e.Row.FCHyperLink("HplRefact").Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID=="GvDatos")
|
if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos")
|
||||||
{
|
{
|
||||||
e.Row.FCLinkButton("BtnValidar").Text= "<i class='fa fa-check'>02</i>";
|
e.Row.FCLinkButton("BtnValidar").Text = "<i class='fa fa-check'>02</i>";
|
||||||
e.Row.FCLinkButton("BtnValidar").CssClass = "btn btn-circle btn-sm blue";
|
e.Row.FCLinkButton("BtnValidar").CssClass = "btn btn-circle btn-sm blue";
|
||||||
}
|
}
|
||||||
//if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos")
|
//if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos")
|
||||||
@@ -615,7 +609,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
||||||
//SOLO MOSTRAR SI LA FACTURA NUEVA ESTA EMITIDA
|
//SOLO MOSTRAR SI LA FACTURA NUEVA ESTA EMITIDA
|
||||||
if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3")
|
if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3")
|
||||||
{
|
{
|
||||||
e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true;
|
e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true;
|
||||||
}
|
}
|
||||||
@@ -810,7 +804,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
if (respCancelacion.CveEstatus == 20)
|
if (respCancelacion.CveEstatus == 20)
|
||||||
{
|
{
|
||||||
sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a <b>'Cancelación en proceso'</b>.");
|
sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a <b>'Cancelación en proceso'</b>.");
|
||||||
|
|
||||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||||
}
|
}
|
||||||
else if (respCancelacion.CveEstatus == 23)
|
else if (respCancelacion.CveEstatus == 23)
|
||||||
@@ -824,9 +818,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (respCancelacion.CveEstatus.Contiene(5,20))
|
if (respCancelacion.CveEstatus.Contiene(5, 20))
|
||||||
{
|
{
|
||||||
if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion:4, CveMotivoCancelacion: CveMotivoCancelacion))
|
if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion))
|
||||||
{
|
{
|
||||||
sb.Append($"</br>La Factura <b>{SerieFolioOriginal}</b> fue desligada.");
|
sb.Append($"</br>La Factura <b>{SerieFolioOriginal}</b> fue desligada.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports GemBox.Spreadsheet
|
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
Imports Extensiones
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Ventas_RepPS
|
Partial Class Ventas_RepPS
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Data
|
|
||||||
|
|
||||||
Partial Class Ventas_RepProductosServicios
|
Partial Class Ventas_RepProductosServicios
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ Option Strict On
|
|||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports System.IO.Compression
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.IO.Compression
|
|
||||||
|
|
||||||
Partial Class Ventas_RepProductosServiciosDetalle
|
Partial Class Ventas_RepProductosServiciosDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ Option Strict On
|
|||||||
|
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.IO
|
|
||||||
Partial Class Ventas_RepRecuperacionDetalle
|
Partial Class Ventas_RepRecuperacionDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
Partial Class RepRemisiones
|
Partial Class RepRemisiones
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
@@ -63,8 +63,8 @@ Partial Class RepRemisiones
|
|||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
ViewState("DtVentas") = value
|
ViewState("DtVentas") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
@@ -75,8 +75,8 @@ Partial Class RepRemisiones
|
|||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " C A R G A - D A T O S "
|
#Region " C A R G A - D A T O S "
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
@@ -132,9 +132,9 @@ Partial Class RepRemisiones
|
|||||||
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
|
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CARGA COMBOS FILTRO"
|
#Region "CARGA COMBOS FILTRO"
|
||||||
Private Sub CargaCliente()
|
Private Sub CargaCliente()
|
||||||
'CargaClientes
|
'CargaClientes
|
||||||
@@ -186,15 +186,15 @@ Partial Class RepRemisiones
|
|||||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||||
DdlVendedor.Enabled = False
|
DdlVendedor.Enabled = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "DDLS SELECTED INDEX CHANGED"
|
#Region "DDLS SELECTED INDEX CHANGED"
|
||||||
Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CargaContrato()
|
CargaContrato()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PDF"
|
#Region "PDF"
|
||||||
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||||
If DtVentas IsNot Nothing Then
|
If DtVentas IsNot Nothing Then
|
||||||
@@ -232,7 +232,7 @@ Partial Class RepRemisiones
|
|||||||
Else
|
Else
|
||||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IO
|
|
||||||
Imports System.Xml
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports System.Security.Cryptography.X509Certificates
|
|
||||||
Imports System.Globalization
|
|
||||||
Imports System.Net.Http
|
|
||||||
Imports Newtonsoft.Json.Linq
|
|
||||||
Imports System.Diagnostics
|
Imports System.Diagnostics
|
||||||
|
Imports System.Globalization
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Net.Http
|
||||||
|
Imports System.Security.Cryptography.X509Certificates
|
||||||
|
Imports System.Xml
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports Newtonsoft.Json.Linq
|
||||||
|
|
||||||
Partial Class Ventas
|
Partial Class Ventas
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -34798,48 +34798,48 @@ Partial Class Ventas
|
|||||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||||
|
|
||||||
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||||
If Relacionados IsNot Nothing Then
|
If Relacionados IsNot Nothing Then
|
||||||
Dim sbExtra As New StringBuilder()
|
Dim sbExtra As New StringBuilder()
|
||||||
If Relacionados.Codigo = 500 Then
|
If Relacionados.Codigo = 500 Then
|
||||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||||
Else
|
Else
|
||||||
sbExtra.Append(Relacionados.Mensaje)
|
sbExtra.Append(Relacionados.Mensaje)
|
||||||
|
|
||||||
Dim SbHijos = New StringBuilder()
|
Dim SbHijos = New StringBuilder()
|
||||||
Dim SbPadres = New StringBuilder()
|
Dim SbPadres = New StringBuilder()
|
||||||
|
|
||||||
|
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
||||||
|
For Each padre In Relacionados.RelacionadosPadre
|
||||||
|
SbPadres.AppendFormat("{0};", padre.Uuid)
|
||||||
|
Next
|
||||||
|
If SbPadres.Length > 0 Then
|
||||||
|
SbPadres.Remove(SbPadres.Length - 1, 1)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If SbPadres.Length > 0 Then
|
||||||
|
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
||||||
|
|
||||||
|
For Each dr As DataRow In dtt.Rows
|
||||||
|
sb.AppendFormat("{0}-{1}-{2}<br/>", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal"))
|
||||||
|
Next
|
||||||
|
|
||||||
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
|
||||||
For Each padre In Relacionados.RelacionadosPadre
|
|
||||||
SbPadres.AppendFormat("{0};", padre.Uuid)
|
|
||||||
Next
|
|
||||||
If SbPadres.Length > 0 Then
|
|
||||||
SbPadres.Remove(SbPadres.Length - 1, 1)
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Using ObjVentas As New ClsVentas
|
End Using
|
||||||
|
|
||||||
If SbPadres.Length > 0 Then
|
|
||||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
|
||||||
Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
|
||||||
|
|
||||||
For Each dr As DataRow In dtt.Rows
|
|
||||||
sb.AppendFormat("{0}-{1}-{2}<br/>", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal"))
|
|
||||||
Next
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Using
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sbExtra.Length > 0 Then
|
|
||||||
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Alert(sb.ToString(), TipoMensaje.MsgInformacion)
|
|
||||||
|
If sbExtra.Length > 0 Then
|
||||||
|
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Alert(sb.ToString(), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user