-cleanup
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Acarreos_CatChoferes
|
||||
|
||||
@@ -70,10 +69,10 @@ Partial Class Acarreos_CatChoferes
|
||||
'Else
|
||||
|
||||
Dim ObjAcar As New ClsAcarreos
|
||||
Dim Estatus = 0
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
Dim Estatus = 0
|
||||
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
|
||||
CargaDatos()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -87,9 +86,9 @@ Partial Class Acarreos_CatChoferes
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO.Compression
|
||||
|
||||
Partial Class Acumuladores_RepIndicadorDiarioDetalle
|
||||
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.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
|
||||
using Extensiones;
|
||||
using System.Web.UI.HtmlControls;
|
||||
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 MoreLinq;
|
||||
using ADSNetLibrary.SIGAPI.Services;
|
||||
using ADSNetLibrary.SIGAPI.Services.Encuestas;
|
||||
using ADSNetLibrary.SIGAPI.Models.Encuestas.Request;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class CRM_Acercamiento : ClsPaginas
|
||||
{
|
||||
@@ -313,7 +311,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
if (CveAcercamiento > 0)
|
||||
{
|
||||
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);
|
||||
if (objAcercamiento.Result.Count > 0)
|
||||
{
|
||||
@@ -379,7 +377,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
BtnGuardarAcercamiento.Visible = true;
|
||||
BtnEliminarAcercamiento.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
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"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlProbabilidadAcercamiento.DataBind();
|
||||
DdlEmpresaCRM.DataBind();
|
||||
@@ -619,7 +617,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
private void CargarPS()
|
||||
{
|
||||
DdlPS.setEsWebService(true);
|
||||
if(CvePS > 0)
|
||||
if (CvePS > 0)
|
||||
{
|
||||
string productoAsignado = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS: CvePS).FiltroPrimeroValor("PSCodigo");
|
||||
DdlPS.SelectedValue = CvePS.ToString();
|
||||
@@ -771,7 +769,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
AcercaminetoModel.CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
AcercaminetoModel.CveEncuestaAplicadaProceso = CveEncuestaAplicadaProceso;
|
||||
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.CveRechazoMotivo = CveRechazoMotivo;
|
||||
|
||||
@@ -895,7 +893,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected void BtnRegistrarCierreCancelacion_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1173,7 +1171,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
int CveEmpresaCRM = DdlEmpresaCRM.SelectedValue.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();
|
||||
RegistraScript("$('#ModalAgenda').modal('hide')");
|
||||
@@ -1525,7 +1523,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
return _CveEncuestaAplicada;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region "MUESTRA UBICACION GEOGRAFICA"
|
||||
protected void LnkVerUbicacion_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1781,7 +1779,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
Actualizar = true;
|
||||
|
||||
CveAcercamientoGasto = GvRow.DataKey("CveAcercamientoGasto").ToEntero();
|
||||
|
||||
|
||||
TxtDescripcionGasto.Text = GvRow.DataKey("Descripcion");
|
||||
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.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
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
|
||||
{
|
||||
@@ -1359,11 +1358,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
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)
|
||||
{
|
||||
GvDatosTecnicos.DataSource = responseGenericGetDatosTecnicosEmpresaCRM.Result;
|
||||
if(responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0)
|
||||
if (responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0)
|
||||
{
|
||||
GvDatosTecnicos.Visible = true;
|
||||
}
|
||||
@@ -1567,7 +1566,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
DdlVendedor.Enabled = false;
|
||||
DdlVendedorAsignado.Enabled = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
DdlMedioCaptacion.Items.Clear();
|
||||
CargaMetodosCaptacion();
|
||||
CargaMetodosCaptacion();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contratos_ContratoObra
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -6,8 +6,8 @@ Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class RepCxC
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
@@ -93,11 +93,11 @@ Partial Class RepCxC
|
||||
Set(value As DataTable)
|
||||
ViewState("DtGrafica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
Index = 0
|
||||
@@ -110,8 +110,8 @@ Partial Class RepCxC
|
||||
If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True
|
||||
CreaDataTableColor()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
'CargaClientes
|
||||
@@ -321,22 +321,22 @@ Partial Class RepCxC
|
||||
GvDatos.DataBind()
|
||||
ActualizarDatatable(NumCol)
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CONSULTAR"
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
ActivaEnviarEstadoCuenta()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRIDVIEW"
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
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 = "-"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PERSONALIZAR COLUMNAS"
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
@@ -634,10 +634,10 @@ Partial Class RepCxC
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "IMPRESIONES"
|
||||
Private Sub ActualizarDatatable(NumCol As Integer)
|
||||
|
||||
@@ -743,12 +743,12 @@ Partial Class RepCxC
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "TIPO DE CAMBIO"
|
||||
|
||||
|
||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
|
||||
Dim TipoCambio As Double
|
||||
@@ -765,13 +765,13 @@ Partial Class RepCxC
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PERSONALIZAR RANGO COLUMNAS"
|
||||
|
||||
|
||||
Protected Sub GvPersonalizarRango_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If Not e.Row.DBCampo("RangoFinal").ToDouble > 0 Then
|
||||
@@ -927,10 +927,10 @@ Partial Class RepCxC
|
||||
End If
|
||||
ObjComp.Dispose()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ENVIAR ESTADO DE CUENTA "
|
||||
Private Sub ActivaEnviarEstadoCuenta()
|
||||
LBEnviarSMS.Visible = DdlGrupo.SelectedValue = "5" And UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12)
|
||||
@@ -1052,11 +1052,11 @@ Partial Class RepCxC
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar el Mail", ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "DESCARGA TXT SEGMENTOS"
|
||||
|
||||
|
||||
Protected Sub LnkDescargarSegmentos_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
If ObjMov.GetDescargaSegmentos(UsuarioActual.CveEmpresa) Then
|
||||
@@ -1216,13 +1216,13 @@ Partial Class RepCxC
|
||||
End If
|
||||
ObjMov.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRAFICA"
|
||||
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
If Not DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1425,13 +1425,13 @@ Partial Class RepCxC
|
||||
End Sub
|
||||
Protected Sub DdlMostrarGraficaTotales_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CambioGrafica(DdlVer.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
|
||||
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
End Sub
|
||||
@@ -1443,9 +1443,9 @@ Partial Class RepCxC
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -2,10 +2,8 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
||||
Imports Extensiones
|
||||
|
||||
'Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.Entity.Core.Common.CommandTrees
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Stimulsoft.Base.Indicator
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
using System;
|
||||
using Extensiones;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Text;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
|
||||
|
||||
DataTable DTGenerarDocumentos
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
|
||||
if(ViewState["DTGenerarDocumentos"] == null){
|
||||
if (ViewState["DTGenerarDocumentos"] == null)
|
||||
{
|
||||
ViewState["DTGenerarDocumentos"] = new DataTable();
|
||||
}
|
||||
return (DataTable)ViewState["DTGenerarDocumentos"];
|
||||
|
||||
}
|
||||
set {
|
||||
set
|
||||
{
|
||||
ViewState["DTGenerarDocumentos"] = (DataTable)value;
|
||||
}
|
||||
}
|
||||
@@ -61,7 +60,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
ViewState["DTRecoleccion"] = (DataTable)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool SeleccionEntrega
|
||||
{
|
||||
get
|
||||
@@ -69,18 +68,19 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
if (ViewState["SeleccionEntrega"] == null)
|
||||
{
|
||||
ViewState["SeleccionEntrega"] = false;
|
||||
}
|
||||
return (bool) ViewState["SeleccionEntrega"];
|
||||
}
|
||||
return (bool)ViewState["SeleccionEntrega"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["SeleccionEntrega"] = (bool)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int CveEntregaAlmacen
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
|
||||
if (ViewState["CveEntregaAlmacen"] == null)
|
||||
{
|
||||
@@ -98,35 +98,35 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
{
|
||||
|
||||
SeleccionEntrega = true;
|
||||
SeleccionEntrega = true;
|
||||
CargaCombos();
|
||||
CargaDatos();
|
||||
CargaDatos();
|
||||
|
||||
#region RECOLEECION
|
||||
// CargaDatosRecoleccion();
|
||||
|
||||
// CargaDatosRecoleccion();
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
if(DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
||||
if (DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder SBError = new StringBuilder();
|
||||
ActualizaOrdenDTGenerarDocumentos();
|
||||
@@ -136,16 +136,16 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
bool TieneError = false;
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
ObjGeneral.IniciaTransacSQL();
|
||||
GridViewRowCollection Grid = GvGenerarDocumentos.Rows;
|
||||
GridViewRowCollection Grid = GvGenerarDocumentos.Rows;
|
||||
string Usuario = DdlChofer.SelectedItem.Text;
|
||||
|
||||
|
||||
|
||||
|
||||
int CveDireccionOrigen = -1;
|
||||
foreach (GridViewRow row in Grid)
|
||||
{
|
||||
int Orden = row.DataKey("Orden").ToEntero();
|
||||
int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero();
|
||||
int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero();
|
||||
|
||||
if (CveDireccionDestino <= 0)
|
||||
{
|
||||
@@ -154,12 +154,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
break;
|
||||
}
|
||||
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();
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -178,9 +178,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega almacen. ");
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!TieneError)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
TieneError = true;
|
||||
ModExtensiones.GuardaLog(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!TieneError)
|
||||
@@ -207,16 +207,16 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
bool huboerror = false;
|
||||
|
||||
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);
|
||||
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'>PDF <i class='fa fa-ad-pdf'></i></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre)));
|
||||
MensajeAlert.Append("<br/>");
|
||||
|
||||
|
||||
DdlChofer.SelectedValueExist("-1");
|
||||
DdlUnidadCamion.SelectedValueExist("-1");
|
||||
ChkEmitirCartaPorte.Checked = false;
|
||||
@@ -228,7 +228,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
huboerror = true;
|
||||
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError);
|
||||
}
|
||||
}
|
||||
}
|
||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
@@ -239,10 +239,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
ObjGeneral.RollBack();
|
||||
}
|
||||
ObjGeneral.Dispose();
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert(SBError.ToString(), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -276,11 +277,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
int CveDireccionOrigen = -1;
|
||||
foreach (GridViewRow row in gvR.Rows)
|
||||
{
|
||||
int Orden = row.DataKey("Orden").ToEntero();
|
||||
int Orden = row.DataKey("Orden").ToEntero();
|
||||
int CveEntregaAlmacen = row.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
|
||||
if (row.FCCheckBox("Chk").Checked)
|
||||
{
|
||||
{
|
||||
CveDireccionOrigen = row.DataKey("CveDireccionOrigen").ToEntero();
|
||||
|
||||
if (CveEntregaAlmacen > 0)
|
||||
@@ -345,7 +346,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
foreach (int cvetimbre in ListaTimbres)
|
||||
{
|
||||
Timbres ObjTimbres = new Timbres("Rec", cvetimbre, UsuarioActual);
|
||||
|
||||
|
||||
if (ObjTimbres.Timbrar())
|
||||
{
|
||||
//ClsPaginas.PdfFactura(ref ObjTimbres.ObjFactura,"0",true);
|
||||
@@ -369,7 +370,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
//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)));
|
||||
//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
|
||||
@@ -381,7 +382,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
CargaDatosRecoleccion();
|
||||
DdlChofer.SelectedValueExist("-1");
|
||||
DdlUnidadCamion.SelectedValueExist("-1");
|
||||
|
||||
|
||||
SeleccionEntrega = false;
|
||||
SeleccionarGenerar(1);
|
||||
UpDatos.Update();
|
||||
@@ -400,7 +401,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
private void CargaDatos()
|
||||
{
|
||||
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;
|
||||
DTDatosConsulta = ObjGeneral.DtResultados;
|
||||
@@ -410,12 +411,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
ObjGeneral.Dispose();
|
||||
GvEntregas.DataBind();
|
||||
|
||||
UpDatos.Update();
|
||||
UpDatos.Update();
|
||||
}
|
||||
private void CargaCombos()
|
||||
{
|
||||
|
||||
DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
||||
DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
||||
DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlUnidadCamion.DataBind();
|
||||
DdlUnidadRec.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa);
|
||||
@@ -424,7 +425,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString();
|
||||
TxtFechaF.Text = DateTime.Now.AddDays(3).ToShortDateString();
|
||||
|
||||
|
||||
DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa);
|
||||
DdlChofer.DataBind();
|
||||
DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
@@ -432,21 +433,22 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
DdlChoferRec.DataBind();
|
||||
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();
|
||||
|
||||
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
|
||||
CargarCentrosDeCosto(null, DdlSubProyectoRecoleccion, null, LblSubProyectoRecoleccion);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkGenerarDocumentos_Click(object sender, EventArgs e)
|
||||
{
|
||||
SeleccionarGenerar(1);
|
||||
}
|
||||
private void SeleccionarGenerar(int Opcion ) {
|
||||
}
|
||||
private void SeleccionarGenerar(int Opcion)
|
||||
{
|
||||
|
||||
if (SeleccionEntrega)
|
||||
{
|
||||
@@ -542,7 +544,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -550,8 +552,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
BtnConsultar.Visible = true;
|
||||
SeleccionEntrega = true;
|
||||
LnkGenerarDocumentos.Text = "Preseleccionar";
|
||||
LnkGenerarDocumentos.CssClass = "btn btn-primary";
|
||||
|
||||
LnkGenerarDocumentos.CssClass = "btn btn-primary";
|
||||
|
||||
|
||||
OcultarmostarDatosEntrega(false);
|
||||
|
||||
@@ -561,10 +563,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
UpDatos.Update();
|
||||
UpFiltro.Update();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OcultarmostarDatosEntrega(bool mostrar )
|
||||
private void OcultarmostarDatosEntrega(bool mostrar)
|
||||
{
|
||||
//DVDatosEntrega1.Visible = mostrar;
|
||||
DVDatosEntrega2.Visible = mostrar;
|
||||
@@ -586,21 +588,21 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
DvCartaPorte2.Visible = mostrar;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ActualizaOrdenDTGenerarDocumentos()
|
||||
{
|
||||
string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos");
|
||||
string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos");
|
||||
|
||||
int NumOrden = 1;
|
||||
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;
|
||||
}
|
||||
@@ -608,7 +610,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
DTGenerarDocumentos.AcceptChanges();
|
||||
NumOrden++;
|
||||
}
|
||||
|
||||
|
||||
DataView DTview = new DataView(DTGenerarDocumentos);
|
||||
|
||||
// Sort by State and ZipCode column in descending order
|
||||
@@ -618,13 +620,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
GvGenerarDocumentos.DataBind();
|
||||
UpDatos.Update();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(Tab.ActiveTabIndex == 0)
|
||||
if (Tab.ActiveTabIndex == 0)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
@@ -633,14 +635,14 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
CargaDatosRecoleccion();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region RECOLECCION
|
||||
|
||||
|
||||
private DataTable InitDTRecoleccion()
|
||||
private DataTable InitDTRecoleccion()
|
||||
{
|
||||
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("Cantidad", System.Type.GetType("System.Double"));
|
||||
DT.Columns.Add("CveUnidadMedida", 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("CveUsuario", System.Type.GetType("System.Int32"));
|
||||
DT.Columns.Add("FechaIng", System.Type.GetType("System.DateTime"));
|
||||
DT.Columns.Add("CodigoPS", 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();
|
||||
gvR.DataBind();
|
||||
UpDatosRecoleccion.Update();
|
||||
UpDatosRecoleccion.Update();
|
||||
}
|
||||
|
||||
|
||||
private void CargaDatosRecoleccionDetallePS()
|
||||
{
|
||||
if (CveEntregaAlmacen > 0)
|
||||
@@ -679,18 +681,20 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
if (ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen))
|
||||
{
|
||||
GvModalPSRecoleccion.DataSource = ObjGenerales.DtResultados;
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
GvModalPSRecoleccion.DataSource = null;
|
||||
}
|
||||
}
|
||||
ObjGenerales.Dispose();
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
||||
}
|
||||
GvModalPSRecoleccion.DataBind();
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
}
|
||||
protected void DdlModalRecoleccionCliente_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ModalRecoleccionCargaDirecciones();
|
||||
@@ -698,14 +702,14 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
private void ModalRecoleccionCargaDirecciones()
|
||||
{
|
||||
if(DdlModalRecoleccionCliente.SelectedValue.ToEntero() > 0)
|
||||
if (DdlModalRecoleccionCliente.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
if (ObjClientes.DireccionEnvioGet(-1, DdlModalRecoleccionCliente.SelectedValue.ToEntero(), -1))
|
||||
{
|
||||
DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados.FiltraParametros("CveSubProyecto = " + DdlSubProyectoRecoleccion.SelectedValue.ToEntero());
|
||||
}
|
||||
ObjClientes.Dispose();
|
||||
ObjClientes.Dispose();
|
||||
}
|
||||
|
||||
DdlmodalRecoleccionDireccion.DataBind();
|
||||
@@ -713,11 +717,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void LnkAgregarRecoleccion_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
LtlModalRecoleccionTitulo.Text = "Agregar Recolección";
|
||||
BtnModalRecoleccionGuardar.Text = "Agregar";
|
||||
|
||||
@@ -772,7 +776,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
DdlmodalRecoleccionDireccion.SelectedValueExist(-1);
|
||||
TxtModalRecoleccionCantidad.Text = "";
|
||||
DdlModalRecoleccionUnidad.Items.Clear();
|
||||
DdlModalRecoleccionUnidad.Items.Add(new ListItem("Seleccione una","-1"));
|
||||
DdlModalRecoleccionUnidad.Items.Add(new ListItem("Seleccione una", "-1"));
|
||||
DdlProducto2.txtValue.Value = "";
|
||||
DdlProducto2.txtText.Value = "";
|
||||
|
||||
@@ -799,48 +803,48 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
protected void BtnModalRecoleccionGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (DdlmodalRecoleccionDireccion.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar la dirección de recolección", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bool ProcesoOK = false;
|
||||
bool ProcesoOK = false;
|
||||
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
ObjGenerales.IniciaTransacSQL();
|
||||
|
||||
if( CveEntregaAlmacen == -1)
|
||||
|
||||
if (CveEntregaAlmacen == -1)
|
||||
{
|
||||
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)
|
||||
{
|
||||
//CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);
|
||||
|
||||
//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;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcesoOK = false;
|
||||
break;
|
||||
}
|
||||
ProcesoOK = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcesoOK = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcesoOK = ObjGenerales.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen, DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa);
|
||||
}
|
||||
}
|
||||
|
||||
if (ProcesoOK)
|
||||
{
|
||||
@@ -849,11 +853,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
RegistraScript("$('#DivModalRecoleccion').modal('hide');");
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
ObjGenerales.RollBack();
|
||||
Alert("Ocurrió un error.",ModExtensiones.TipoMensaje.MsgError);
|
||||
Alert("Ocurrió un error.", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
|
||||
ObjGenerales.Dispose();
|
||||
CargaDatosRecoleccion();
|
||||
}
|
||||
@@ -882,7 +886,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer;
|
||||
|
||||
if (CveEntregaAlmacen > 0)
|
||||
{
|
||||
{
|
||||
|
||||
int CveEntregaAlmacenDetalleEliminar = GvRow.DataKey("CveEntregaAlmacenDetalle").ToEntero();
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
@@ -899,17 +903,17 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
DTRecoleccion.Rows[DTIndex].Delete();
|
||||
DTRecoleccion.AcceptChanges();
|
||||
|
||||
}
|
||||
}
|
||||
CargaDatosRecoleccionDetallePS();
|
||||
}
|
||||
|
||||
protected void LnkModalAgregarPS_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(CveEntregaAlmacen > 0)
|
||||
if (CveEntregaAlmacen > 0)
|
||||
{
|
||||
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
|
||||
{
|
||||
DataRow dRow = DTRecoleccion.NewRow() ;
|
||||
DataRow dRow = DTRecoleccion.NewRow();
|
||||
|
||||
dRow["CveEntregaAlmacenDetalle"] = -1;
|
||||
dRow["CveEntregaAlmacen"] = CveEntregaAlmacen;
|
||||
dRow["CvePS"] = DdlProducto2.SelectedValue.ToEntero();
|
||||
dRow["Cantidad"] =TxtModalRecoleccionCantidad.Text.ToEntero();
|
||||
dRow["Cantidad"] = TxtModalRecoleccionCantidad.Text.ToEntero();
|
||||
dRow["CveUnidadMedida"] = DdlModalRecoleccionUnidad.SelectedValue.ToEntero();
|
||||
dRow["CveUsuario"] =UsuarioActual.CveUsuario;
|
||||
dRow["CveUsuario"] = UsuarioActual.CveUsuario;
|
||||
dRow["FechaIng"] = DateTime.Now;
|
||||
dRow["CodigoPS"] = DdlProducto2.txtText.Value;
|
||||
dRow["Abreviatura"] =DdlModalRecoleccionUnidad.SelectedItem.Text;
|
||||
dRow["Abreviatura"] = DdlModalRecoleccionUnidad.SelectedItem.Text;
|
||||
|
||||
DTRecoleccion.Rows.Add(dRow);
|
||||
//GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
||||
@@ -935,8 +939,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
LimpiarControlesPS();
|
||||
CargaDatosRecoleccionDetallePS();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
private void LimpiarControlesPS()
|
||||
{
|
||||
TxtModalRecoleccionCantidad.Text = "";
|
||||
@@ -945,10 +949,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
DdlProducto2.txtValue.Value = "";
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void Tab_ActiveTabChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(Tab.ActiveTabIndex == 0)
|
||||
if (Tab.ActiveTabIndex == 0)
|
||||
{
|
||||
SeleccionEntrega = false;
|
||||
SeleccionarGenerar(1);
|
||||
@@ -958,7 +962,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
OcultarmostarDatosEntrega(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionEnvio)
|
||||
{
|
||||
@@ -989,10 +993,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
|
||||
|
||||
HdnCveVenta.Value = GvRow.DataKey("CveVenta");
|
||||
CargaModalCombosDirecciones(CveCliente, CveDireccion);
|
||||
CargaModalCombosDirecciones(CveCliente, CveDireccion);
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||
}
|
||||
|
||||
protected void BtnModalEditarentrega_Click(object sender, EventArgs e)
|
||||
@@ -1010,12 +1014,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
if (ProcesoOK)
|
||||
{
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal('hide');");
|
||||
Alert("Dirección Actualizada correctamente.",ModExtensiones.TipoMensaje.ToastInformacion);
|
||||
Alert("Dirección Actualizada correctamente.", ModExtensiones.TipoMensaje.ToastInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void gvR_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
@@ -1027,13 +1031,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
LnkEditar.Visible = true;
|
||||
LnkEliminar.Visible = true;
|
||||
|
||||
|
||||
}
|
||||
if (e.Row.DataKey("CveTimbre") != "")
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Visible = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Inventarios_InventarioFisico
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Inventarios_RecepcionAlmacen
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
'Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
|
||||
Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
using Extensiones;
|
||||
using Extensiones;
|
||||
using System;
|
||||
using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
@@ -248,7 +242,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
@@ -259,9 +253,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaEstatus();
|
||||
CargaCombosModalEntrega();
|
||||
CargaCombosModalEntrega();
|
||||
InicializaFechas();
|
||||
CargaChoferes();
|
||||
CargaChoferes();
|
||||
UPFiltros.Update();
|
||||
CargarCentrosDeCosto(null, DdlSucursales, null, LblDdlSucursal);
|
||||
|
||||
@@ -279,7 +273,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -304,22 +298,22 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
||||
{
|
||||
DdlChofer.DataSource = ObjAcar.DtResultados;
|
||||
DdlChofer.DataSource = ObjAcar.DtResultados;
|
||||
}
|
||||
ObjAcar.Dispose();
|
||||
DdlChofer.DataBind();
|
||||
DdlChofer.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void CargaEstatus()
|
||||
{
|
||||
|
||||
DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0"));
|
||||
DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1"));
|
||||
DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2"));
|
||||
}
|
||||
|
||||
DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0"));
|
||||
DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1"));
|
||||
DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2"));
|
||||
}
|
||||
protected void InicializaFechas()
|
||||
{
|
||||
|
||||
@@ -333,7 +327,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
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;
|
||||
GVDatos.DataSource = DTDatos;
|
||||
@@ -342,8 +336,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
ObjGeneral.Dispose();
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BOTONES
|
||||
@@ -355,17 +349,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
protected void imgEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
CveTimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
||||
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero();
|
||||
|
||||
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");
|
||||
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)
|
||||
{
|
||||
DdlRemolque2.SelectedValueExist(GvRow.DataKey("CveCamionRemolque2"));
|
||||
}
|
||||
}
|
||||
CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
||||
|
||||
ModalActualizaDirecciones( CveTimbre);
|
||||
ModalActualizaDirecciones(CveTimbre);
|
||||
|
||||
|
||||
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();
|
||||
|
||||
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 (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();
|
||||
@@ -483,7 +478,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual);
|
||||
StringBuilder MensajeAlert = new StringBuilder();
|
||||
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)));
|
||||
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);
|
||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void LnkCancelaTimbre_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
bool ProcesoOK = false;
|
||||
LinkButton LnkCancelarFolioFiscal = (LinkButton)sender;
|
||||
GridViewRow GvRow = (GridViewRow)LnkCancelarFolioFiscal.BindingContainer;
|
||||
@@ -508,27 +503,29 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
string FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString();
|
||||
string RFCReceptor = GvRow.DataKey("RFCReceptor").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 CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto").ToString();
|
||||
|
||||
|
||||
|
||||
Timbrado ObjCancelacion = new Timbrado();
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
ObjGenerales.IniciaTransacSQL ();
|
||||
ObjGenerales.IniciaTransacSQL();
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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))
|
||||
{
|
||||
@@ -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);
|
||||
//}
|
||||
ProcesoOK = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,17 +585,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
protected void BtnModalEditarentrega_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
bool ProcesoOK = true ;
|
||||
bool ProcesoOK = true;
|
||||
|
||||
ClsGenerales ObjGral = new ClsGenerales();
|
||||
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(),
|
||||
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(),
|
||||
CveConfigAutoTransporte: DdlConfigAuto.SelectedValue.ToEntero()))
|
||||
{
|
||||
ProcesoOK = false;
|
||||
}
|
||||
ObjGral.Dispose();
|
||||
|
||||
|
||||
if (ProcesoOK)
|
||||
{
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal('hide');");
|
||||
@@ -643,17 +640,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
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 (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
|
||||
{
|
||||
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")));
|
||||
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")));
|
||||
}
|
||||
|
||||
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)
|
||||
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
|
||||
{
|
||||
@@ -698,7 +695,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
DdlModalChofer.Items.Clear();
|
||||
|
||||
ClsAcarreos ObjAcar = new ClsAcarreos();
|
||||
|
||||
|
||||
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
||||
{
|
||||
DdlModalChofer.DataSource = ObjAcar.DtResultados;
|
||||
@@ -771,7 +768,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
ValidaConfiguracionVeiculo();
|
||||
}
|
||||
private void ValidaConfiguracionVeiculo()
|
||||
private void ValidaConfiguracionVeiculo()
|
||||
{
|
||||
DvRemolque1.Visible = false;
|
||||
DvRemolque2.Visible = false;
|
||||
@@ -834,7 +831,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
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()}");
|
||||
}
|
||||
try
|
||||
@@ -873,10 +870,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
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;
|
||||
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1))
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1))
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados;
|
||||
}
|
||||
|
||||
@@ -1028,7 +1025,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
DataTable DT = new DataTable();
|
||||
|
||||
if (ObjClientes.DireccionEnvioGet(CveDireccion, -1,-1))
|
||||
if (ObjClientes.DireccionEnvioGet(CveDireccion, -1, -1))
|
||||
{
|
||||
DT = ObjClientes.DtResultados;
|
||||
}
|
||||
@@ -1070,7 +1067,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
//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",
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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 System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
||||
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
@@ -47,8 +44,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
|
||||
int CvePS = -1;
|
||||
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
|
||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||
// aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad
|
||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||
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()))
|
||||
{
|
||||
@@ -62,7 +59,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
{
|
||||
GvDatos.Columns[4].HeaderText = "F.Caducidad";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
ObjInventarios.Dispose();
|
||||
GvDatos.DataBind();
|
||||
@@ -80,7 +77,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
|
||||
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");
|
||||
TxtFechaFin.Text = date.AddMonths(6).AddDays(-1).ToString("dd/MM/yyyy");
|
||||
DdlPS.setEsWebService(true);
|
||||
@@ -106,7 +103,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
DdlSucursal.DataBind();
|
||||
DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1"));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -119,14 +116,14 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
//}
|
||||
//ObjClasificacion.Dispose();
|
||||
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
|
||||
DdlClasificacion.DataBind();
|
||||
DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1"));
|
||||
DdlClasificacion.DataBind();
|
||||
DdlClasificacion.Items.Insert(0, new ListItem("Todas", "-1"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void CargaAlamacenes(int CveSubProyectoFiltro = -1)
|
||||
private void CargaAlamacenes(int CveSubProyectoFiltro = -1)
|
||||
{
|
||||
|
||||
ddlAlmacen.Items.Clear();
|
||||
@@ -138,8 +135,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
else
|
||||
{
|
||||
ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ddlAlmacen.DataBind();
|
||||
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)
|
||||
{
|
||||
@@ -179,10 +176,10 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
@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);
|
||||
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
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Extensiones;
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using static Extensiones.ModExtensiones;
|
||||
@@ -42,12 +41,12 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
||||
}
|
||||
|
||||
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")));
|
||||
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
|
||||
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)
|
||||
@@ -58,9 +57,9 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
||||
}
|
||||
|
||||
protected void LnkCancelarTraspaso_Click(object sender, EventArgs e)
|
||||
}
|
||||
{
|
||||
GridViewRow Gvr = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
Timbrado ObjCancelacion = new Timbrado();
|
||||
DateTime CancelacionFecha = MinFecha;
|
||||
int CveEstatusTimbrado = 0;
|
||||
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);
|
||||
if (resp.Verificado)
|
||||
{
|
||||
int CveMovimiento = Gvr.DataKey("CveMovimiento").ToEntero();
|
||||
CancelacionFecha = ObjCancelacion.CancelacionFecha;
|
||||
SelloCancelacion = ObjCancelacion.CancelacionAcuse;
|
||||
CveEstatusTimbrado = 2;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3161,7 +3161,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ChkTransitorio.Checked Then
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ")
|
||||
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
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
@@ -3171,12 +3171,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Str As String
|
||||
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
|
||||
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
|
||||
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))
|
||||
End If
|
||||
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports System.Data.OleDb
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class CatSubProyectos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "P R O P I E D A D E S"
|
||||
Public Property DtSegmentosNegocio As Data.DataTable
|
||||
Get
|
||||
@@ -33,9 +33,9 @@ Partial Class CatSubProyectos
|
||||
Set(value As Integer)
|
||||
ViewState("CveCentroCosto") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
@@ -90,8 +90,8 @@ Partial Class CatSubProyectos
|
||||
Private Sub RecargaGlobal()
|
||||
GlobalDTSubProyectos(-1, CveEmpresa:=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"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
@@ -114,10 +114,10 @@ Partial Class CatSubProyectos
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C A R G A S"
|
||||
Public Sub CargaDatos()
|
||||
|
||||
@@ -189,9 +189,9 @@ Partial Class CatSubProyectos
|
||||
' 'End If
|
||||
'Next
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GV"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -312,11 +312,11 @@ Partial Class CatSubProyectos
|
||||
CargaRequired()
|
||||
UpAddCentroEstatus.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarCentroCosto"))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G U A R D A R"
|
||||
|
||||
|
||||
Private Function ValidaComercioExterior() As Boolean
|
||||
If ChkAplicaComercioExterior.Checked Then
|
||||
If Not DdlPais.SelectedValue.ToEntero > 0 Then
|
||||
@@ -501,11 +501,11 @@ Partial Class CatSubProyectos
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "E X C E L"
|
||||
Protected Sub downExcel_Click(sender As Object, e As EventArgs)
|
||||
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
@@ -664,12 +664,12 @@ Partial Class CatSubProyectos
|
||||
Select Case Extension
|
||||
Case ".xls"
|
||||
'Excel 97-03
|
||||
conStr = ConfigurationManager.ConnectionStrings("Excel03ConString") _
|
||||
conStr = ConfigurationManager.ConnectionStrings("Excel03ConString") _
|
||||
.ConnectionString
|
||||
Exit Select
|
||||
Case ".xlsx"
|
||||
'Excel 07
|
||||
conStr = ConfigurationManager.ConnectionStrings("Excel07ConString") _
|
||||
conStr = ConfigurationManager.ConnectionStrings("Excel07ConString") _
|
||||
.ConnectionString
|
||||
Exit Select
|
||||
End Select
|
||||
@@ -811,14 +811,14 @@ Partial Class CatSubProyectos
|
||||
|
||||
Private Sub ChkEsSucursal_CheckedChanged(sender As Object, e As EventArgs) Handles ChkEsSucursal.CheckedChanged
|
||||
CargaRequired()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "COMERCIO EXTERIOR"
|
||||
|
||||
|
||||
Private Sub CargaPais()
|
||||
DdlPais.DataSource = GlobalDTGralPaises()
|
||||
DdlPais.DataBind()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Sistemas_PopUpAddUsuario
|
||||
Inherits ClsPaginas
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
@@ -1496,8 +1496,8 @@
|
||||
<tr>
|
||||
<td>Porcentaje Máximo:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtPorcentajeMaximoAutorizacion" runat="server" Width="100px"></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:TextBox ID="TxtPorcentajeMaximoAutorizacion" runat="server" Width="70px"></asp:TextBox>
|
||||
<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>
|
||||
</td>
|
||||
<td></td>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.Threading
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Sistemas_UsuarioDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class Ventas_ActualizarPrecios
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,24 +1,20 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
Imports System.Globalization
|
||||
Imports System.Net.Http
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Threading.Tasks
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Collections.Generic
|
||||
Imports Newtonsoft.Json.Serialization
|
||||
Imports System.Net.Http
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
Partial Class Clientes
|
||||
Inherits ClsPaginas
|
||||
|
||||
'Configuración
|
||||
Inherits ClsPaginas
|
||||
|
||||
'Configuración
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private Const NumeroDecimales As Integer = 2
|
||||
Private CveVentaDeduccion As Integer
|
||||
@@ -503,10 +499,10 @@ Partial Class Clientes
|
||||
Set(value As String)
|
||||
ViewState("linkDescargaPagare") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Documentacion"
|
||||
Private Property DTDocumentacion As DataTable
|
||||
Get
|
||||
@@ -617,21 +613,21 @@ Partial Class Clientes
|
||||
Set(value As String)
|
||||
ViewState("AdjuntoDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
'Private ReadOnly Property CvePersonal As Integer
|
||||
' Get
|
||||
' If ViewState("CvePersonal") Is Nothing Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return ViewState("CvePersonal").ToString().Toentero()
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
End Property
|
||||
'Private ReadOnly Property CvePersonal As Integer
|
||||
' Get
|
||||
' If ViewState("CvePersonal") Is Nothing Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return ViewState("CvePersonal").ToString().Toentero()
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " A C U M U L A D O R E S"
|
||||
Property CveVentaNota As Integer
|
||||
Get
|
||||
@@ -671,10 +667,10 @@ Partial Class Clientes
|
||||
Set(value As String)
|
||||
ViewState("SerieNotaAcumulador") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
@@ -924,10 +920,10 @@ Partial Class Clientes
|
||||
ChkPermiso5.Enabled = False
|
||||
ChkPermiso6.Enabled = False
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " PERMISOS PAGINAS "
|
||||
|
||||
|
||||
Private Sub MostrarTxtDireccionesClienteEnvio()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||
@@ -964,18 +960,18 @@ Partial Class Clientes
|
||||
If Not ChkEsDistribuidor.Checked Then
|
||||
BtnGuardar.Visible = PermiteEditar()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "C A R G A S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CreaDtPago()
|
||||
DtPagos = New DataTable
|
||||
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
||||
@@ -1169,9 +1165,9 @@ Partial Class Clientes
|
||||
|
||||
Select Case HdnCuenta.Value
|
||||
Case "1"
|
||||
CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
|
||||
CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
|
||||
Case "2"
|
||||
CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
|
||||
CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
|
||||
Case "3"
|
||||
CargaDdlCuentasContables(DdlCtaContableRetIVA, -1)
|
||||
Case "4"
|
||||
@@ -1179,11 +1175,11 @@ Partial Class Clientes
|
||||
Case "5"
|
||||
CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1)
|
||||
Case "6"
|
||||
CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
|
||||
CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
|
||||
Case "7"
|
||||
CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1)
|
||||
Case "8"
|
||||
CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
|
||||
CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
|
||||
Case "9"
|
||||
CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero()
|
||||
End Select
|
||||
@@ -2126,12 +2122,12 @@ Partial Class Clientes
|
||||
CargaBancos(51)
|
||||
BtnVerMasBancos.Text = "Ver Más"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#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)
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
'CxC Activas
|
||||
@@ -2194,9 +2190,9 @@ Partial Class Clientes
|
||||
TxtParaMail.Text = TxtCobranzaCorreo.Text
|
||||
UpSendMail.Update()
|
||||
RegistraScript("$('#ModalDivMail').modal('show');")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "B T N ´ S"
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
@@ -2497,18 +2493,18 @@ Partial Class Clientes
|
||||
|
||||
End If
|
||||
|
||||
'CargaSucursal()
|
||||
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
||||
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
'CargaSucursal()
|
||||
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
||||
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
'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
|
||||
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
'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
|
||||
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
|
||||
Dim MsgCuentaContable As String = ""
|
||||
Dim ErrorProceso As Boolean = False
|
||||
@@ -2538,85 +2534,85 @@ Partial Class Clientes
|
||||
|
||||
Dim errorContPaq As Boolean = False
|
||||
Dim IdContPaqi As Integer = 0
|
||||
Dim CodigoPersona As Integer = 0
|
||||
|
||||
|
||||
Dim CodigoPersona As Integer = 0
|
||||
|
||||
|
||||
#Region "comentado"
|
||||
'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
|
||||
|
||||
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").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_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
|
||||
' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
|
||||
|
||||
' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
|
||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' Dim IdContPaqiCliente As Integer
|
||||
|
||||
' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
|
||||
|
||||
' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' Else
|
||||
' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' ObjContPaqi.Commit()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Else
|
||||
' ObjContPaqi.RollBack()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
|
||||
'End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
|
||||
|
||||
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").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_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
|
||||
' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
|
||||
|
||||
' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
|
||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' Dim IdContPaqiCliente As Integer
|
||||
|
||||
' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
|
||||
|
||||
' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' Else
|
||||
' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' ObjContPaqi.Commit()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Else
|
||||
' ObjContPaqi.RollBack()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
|
||||
'End If
|
||||
#End Region
|
||||
|
||||
|
||||
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
|
||||
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
|
||||
|
||||
@@ -2867,11 +2863,11 @@ Partial Class Clientes
|
||||
ObjClientes.Dispose()
|
||||
objDoc.Dispose()
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "G L O B L A L"
|
||||
Private Sub RecargaGlobal()
|
||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
||||
@@ -2885,10 +2881,10 @@ Partial Class Clientes
|
||||
' Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||
'End If
|
||||
'Objclientes.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#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
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -3049,11 +3045,11 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "R H"
|
||||
|
||||
|
||||
Private Sub CargaPersonalAsignado()
|
||||
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
|
||||
@@ -3126,9 +3122,9 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "S U C U R S A L E S"
|
||||
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
||||
ChkEstatusSucursal.Checked = True
|
||||
@@ -3260,7 +3256,7 @@ Partial Class Clientes
|
||||
|
||||
UpModalDivMapa.Update()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#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
|
||||
|
||||
@@ -3382,9 +3378,9 @@ Partial Class Clientes
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#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
|
||||
If e.CommandName = "RestablecerContraseña" Then
|
||||
@@ -3536,9 +3532,9 @@ Partial Class Clientes
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub CargaGrid(Orden As String, gvi As Integer)
|
||||
If gvi = 0 Then
|
||||
@@ -3570,12 +3566,12 @@ Partial Class Clientes
|
||||
UPPUsuarios.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "U S U A R I O S"
|
||||
Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
@@ -3757,9 +3753,9 @@ Partial Class Clientes
|
||||
ChkPermiso5.Checked = False
|
||||
ChkPermiso6.Checked = False
|
||||
ChkPermiso7.Checked = False
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#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
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -3968,11 +3964,11 @@ Partial Class Clientes
|
||||
BtnActivaRegistroISR.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " I M P R I M I R P D F"
|
||||
|
||||
|
||||
Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs)
|
||||
DdlTipoDocto.ClearSelection()
|
||||
If ChkAntIXCNC.Checked Then
|
||||
@@ -4294,9 +4290,9 @@ Partial Class Clientes
|
||||
End Using
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "E N V I O C O R R E O"
|
||||
Private Sub EnviaCorreo(Liga As String, LigaActivar As String)
|
||||
|
||||
@@ -4364,11 +4360,11 @@ Partial Class Clientes
|
||||
a.GuardaLog()
|
||||
Dim Mail As New ClsSisMail()
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " COTIZACIONES "
|
||||
|
||||
|
||||
Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs)
|
||||
If BtnVerMasCot.Text = "Ver Más" Then
|
||||
CargaCotizaciones(-1)
|
||||
@@ -4438,11 +4434,11 @@ Partial Class Clientes
|
||||
HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "D I R E C C I O N E N V I O "
|
||||
|
||||
|
||||
Private Sub CargaCombosDirecionesClientesSAT()
|
||||
CargaDirClientePais()
|
||||
CargaDirClienteEstado()
|
||||
@@ -4657,12 +4653,12 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
CargaDireccionesEnvio()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " IMPORTAR SALDOS "
|
||||
|
||||
|
||||
Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click
|
||||
CargaClientesImportarSaldos()
|
||||
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.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo")))
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Cuentas/Equipos"
|
||||
Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs)
|
||||
HdnModalidad.Value = "I"
|
||||
@@ -5358,9 +5354,9 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GPS"
|
||||
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
|
||||
If hdnArrayDispositivo.Value.Length > 0 Then
|
||||
@@ -5501,10 +5497,10 @@ Partial Class Clientes
|
||||
UpMoverDispositivo.Update()
|
||||
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Sucursales"
|
||||
Public Sub CreaDTSucursales()
|
||||
|
||||
@@ -5738,14 +5734,14 @@ Partial Class Clientes
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G P S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
||||
|
||||
Try
|
||||
@@ -5816,16 +5812,16 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O N T R A T O S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDatosContrato()
|
||||
If CveCliente <= 0 Then
|
||||
Exit Sub
|
||||
@@ -5870,10 +5866,10 @@ Partial Class Clientes
|
||||
e.Row.CssClass = "Totales white"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "M E T O D O S "
|
||||
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
||||
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
|
||||
@@ -6283,13 +6279,13 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "IMPRIMIR GVHistorial"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||
Dim retorno As Byte() = Nothing
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -6372,18 +6368,18 @@ Partial Class Clientes
|
||||
ObjClientes.Dispose()
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O B R A N Z A"
|
||||
Public Sub Visitas_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Usuarios"
|
||||
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()
|
||||
@@ -6418,12 +6414,12 @@ Partial Class Clientes
|
||||
e.Row.Cells(5).Visible = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#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)
|
||||
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
@@ -6596,8 +6592,8 @@ Partial Class Clientes
|
||||
TxtNumeroCuenta2.Text = ""
|
||||
TxtConvenioCIE2.Text = ""
|
||||
TxtReferencia2.Text = ""
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "GRIDVIEW - CUENTAS BANCARIAS"
|
||||
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -6653,10 +6649,10 @@ Partial Class Clientes
|
||||
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Private Sub CargaPSGridCuentasBancos()
|
||||
If CveCliente > 0 Then
|
||||
GvBancosCuentas.DataSource = DTCuentasBancos
|
||||
@@ -6714,9 +6710,9 @@ Partial Class Clientes
|
||||
divestatus.Visible = True
|
||||
UpAddBancos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
|
||||
End Sub
|
||||
End Sub
|
||||
#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"
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
||||
GenerarPDF("Excel")
|
||||
@@ -6742,11 +6738,11 @@ Partial Class Clientes
|
||||
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "VENTAS"
|
||||
|
||||
|
||||
Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim Vta As Modelos.Factura = Nothing
|
||||
@@ -6977,10 +6973,10 @@ Partial Class Clientes
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Return PdfFactura(Vta)
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "COMERCIO EXTERIOR"
|
||||
Public Sub CargaCombosComercioExterior()
|
||||
|
||||
@@ -7104,12 +7100,12 @@ Partial Class Clientes
|
||||
End Sub
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaColonia()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "D O C U M E N T A C I O N "
|
||||
|
||||
|
||||
Private Sub CargaDocumentacionCliente()
|
||||
Dim objRH As New ClsEdocumentacion()
|
||||
|
||||
@@ -8607,9 +8603,9 @@ Partial Class Clientes
|
||||
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE MARCAS"
|
||||
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
|
||||
@@ -8833,9 +8829,9 @@ Partial Class Clientes
|
||||
|
||||
ObjPS.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
|
||||
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
|
||||
@@ -9071,12 +9067,12 @@ Partial Class Clientes
|
||||
|
||||
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
|
||||
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2)
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " A C U M U L A D O R E S"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs)
|
||||
'CveVentaNota = 0
|
||||
|
||||
@@ -9715,11 +9711,11 @@ Partial Class Clientes
|
||||
|
||||
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#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"
|
||||
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
|
||||
@@ -9794,7 +9790,7 @@ Partial Class Clientes
|
||||
End If
|
||||
Acum.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class MetasVendedoresDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Linq
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Globalization
|
||||
Imports System.Net.Http
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports ADSSession
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class PV
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
using System;
|
||||
using Extensiones;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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.Text;
|
||||
using System.Web.UI.WebControls;
|
||||
using static Extensiones.ModExtensiones;
|
||||
|
||||
public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
@@ -77,7 +71,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
GvRefacturaciones.DataSource = DtRefacturar;
|
||||
GvRefacturaciones.DataBind();
|
||||
}
|
||||
|
||||
|
||||
|
||||
GvDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
@@ -107,9 +101,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
Msg = resp.Mensaje;
|
||||
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");
|
||||
}
|
||||
@@ -228,7 +222,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
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>");
|
||||
}
|
||||
else if (respCancelacion.CveEstatus == 23)
|
||||
@@ -589,9 +583,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
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";
|
||||
}
|
||||
//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;
|
||||
//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;
|
||||
}
|
||||
@@ -810,7 +804,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
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($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||
}
|
||||
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>");
|
||||
}
|
||||
|
||||
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.");
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.Globalization
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Ventas_RepPS
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Ventas_RepProductosServicios
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -3,9 +3,9 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.IO.Compression
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO.Compression
|
||||
|
||||
Partial Class Ventas_RepProductosServiciosDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -3,9 +3,9 @@ Option Strict On
|
||||
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
Partial Class Ventas_RepRecuperacionDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class RepRemisiones
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -63,8 +63,8 @@ Partial Class RepRemisiones
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
@@ -75,8 +75,8 @@ Partial Class RepRemisiones
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
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>"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
Private Sub CargaCliente()
|
||||
'CargaClientes
|
||||
@@ -186,15 +186,15 @@ Partial Class RepRemisiones
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "DDLS SELECTED INDEX CHANGED"
|
||||
Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaContrato()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PDF"
|
||||
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
If DtVentas IsNot Nothing Then
|
||||
@@ -232,7 +232,7 @@ Partial Class RepRemisiones
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
End Sub
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
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.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
|
||||
Inherits ClsPaginas
|
||||
@@ -34798,48 +34798,48 @@ Partial Class Ventas
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
|
||||
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||
If Relacionados IsNot Nothing Then
|
||||
Dim sbExtra As New StringBuilder()
|
||||
If Relacionados.Codigo = 500 Then
|
||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||
Else
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
If Relacionados IsNot Nothing Then
|
||||
Dim sbExtra As New StringBuilder()
|
||||
If Relacionados.Codigo = 500 Then
|
||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||
Else
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
|
||||
Dim SbHijos = New StringBuilder()
|
||||
Dim SbPadres = New StringBuilder()
|
||||
Dim SbHijos = 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
|
||||
|
||||
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
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
End If
|
||||
|
||||
If sbExtra.Length > 0 Then
|
||||
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
||||
End If
|
||||
End Using
|
||||
|
||||
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 Class
|
||||
|
||||
Reference in New Issue
Block a user