|
|
|
|
@@ -661,6 +661,19 @@ Partial Class Clientes
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Property CveAlmacenAsignadoSucursal As Integer
|
|
|
|
|
Get
|
|
|
|
|
If ViewState("CveAlmacenAsignadoSucursal") Is Nothing Then
|
|
|
|
|
ViewState("CveAlmacenAsignadoSucursal") = -1
|
|
|
|
|
End If
|
|
|
|
|
Return ViewState("CveAlmacenAsignadoSucursal").ToString().ToEntero()
|
|
|
|
|
End Get
|
|
|
|
|
Set(value As Integer)
|
|
|
|
|
ViewState("CveAlmacenAsignadoSucursal") = value
|
|
|
|
|
End Set
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
|
|
|
If Not IsPostBack Then
|
|
|
|
|
|
|
|
|
|
@@ -1234,7 +1247,7 @@ Partial Class Clientes
|
|
|
|
|
DdlPrecioLista.DataBind()
|
|
|
|
|
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
|
|
|
|
|
|
|
|
|
|
If CveFuncionalidad404.Contiene(30) Then
|
|
|
|
|
If CveFuncionalidad404.Contiene(30) And DdlTipoCliente.SelectedValue.ToEntero = 1 Then
|
|
|
|
|
DivCrearPrecioLista.Visible = True
|
|
|
|
|
DdlPrecioListaClonar.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
|
|
|
|
|
DdlPrecioListaClonar.DataBind()
|
|
|
|
|
@@ -2523,7 +2536,7 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
If Not ErrorProceso Then
|
|
|
|
|
If UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlAlmacenAsignado.SelectedValue.ToEntero = -1 Then 'limpiar ddl alamcen temporal que se agrego temporalmente
|
|
|
|
|
If Not GeneraGuardaAlmacenCliente(ObjClientes.IniciaTransacSQL) Then
|
|
|
|
|
If Not GeneraGuardaAlmacenAsignado(TxtNombre.Text.Trim, ObjClientes.IniciaTransacSQL) Then
|
|
|
|
|
ErrorProceso = True
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
@@ -2569,13 +2582,28 @@ Partial Class Clientes
|
|
|
|
|
If Not ErrorProceso Then
|
|
|
|
|
For Each Row As DataRow In TempDTSucursales.Rows
|
|
|
|
|
If Not CveCliente > 0 Then
|
|
|
|
|
If Not ObjClientes.AddSucursal(CveClienteNuevo, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(),
|
|
|
|
|
|
|
|
|
|
Dim CveAlmacenAsignadoSucursal As Integer = -1
|
|
|
|
|
If DdlTipoCliente.SelectedValue.ToEntero = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
|
|
|
|
CveAlmacenAsignadoSucursal = GeneraGuardaAlmacenAsignadoSucursal(Row("SucursalCliente").ToString(), ObjClientes.IniciaTransacSQL())
|
|
|
|
|
If Not CveAlmacenAsignadoSucursal > 0 Then
|
|
|
|
|
ErrorProceso = True
|
|
|
|
|
Alert($"Se presento un erro al agregar el almacen de la sucursal {Row("SucursalCliente").ToString()}", TipoMensaje.MsgAdvertencia)
|
|
|
|
|
Exit For
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If Not ErrorProceso Then
|
|
|
|
|
If Not ObjClientes.AddSucursal(CveClienteNuevo, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(),
|
|
|
|
|
Row("PaisSucursal").ToString(), Row("NumExtSucursal").ToString(), Row("NumIntSucursal").ToString(), Row("TelefonoSucursal").ToString(), Row("CorreoSucursal").ToString(), Row("CorreoCotiziacionSucursal").ToString(), Row("ContactoSucursal").ToString(),
|
|
|
|
|
Row("CveVendedorSucursal").ToString().ToEntero(), Row("NumCuenta").ToString(), Row("CveMetodoPago").ToString().ToEntero(), Row("LimiteCredito").ToString().ToDecimal(), Row("CveResponsableCobranza").ToString().ToEntero(),
|
|
|
|
|
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString()) Then
|
|
|
|
|
ErrorProceso = True
|
|
|
|
|
Exit For
|
|
|
|
|
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString(), CveAlmacenAsignado:=CveAlmacenAsignadoSucursal) Then
|
|
|
|
|
ErrorProceso = True
|
|
|
|
|
Exit For
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
Next
|
|
|
|
|
End If
|
|
|
|
|
@@ -2971,11 +2999,13 @@ Partial Class Clientes
|
|
|
|
|
#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
|
|
|
|
|
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
|
|
|
|
|
|
|
|
|
ChkEstatusSucursal.Checked = True
|
|
|
|
|
DivEstatusSucursal.Visible = False
|
|
|
|
|
TxtNumeroCuenta.Text = ""
|
|
|
|
|
DdlMetodoPagoSucursal.SelectedIndex = 0
|
|
|
|
|
CveAlmacenAsignadoSucursal = -1
|
|
|
|
|
UpAgregarSucursal.Update()
|
|
|
|
|
Me.CveClienteSuc = -1
|
|
|
|
|
Me.Actualizar = False
|
|
|
|
|
@@ -3008,70 +3038,93 @@ Partial Class Clientes
|
|
|
|
|
End If
|
|
|
|
|
Return Retorno
|
|
|
|
|
End Function
|
|
|
|
|
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarSucursal.Click
|
|
|
|
|
Dim ObjCliente As New ClsClientes
|
|
|
|
|
|
|
|
|
|
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarSucursal.Click
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dim LT As String = If(txtLt.Text.ToDouble <> 0, txtLt.Text, "0")
|
|
|
|
|
Dim LG As String = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0")
|
|
|
|
|
Dim RFC As String = If(String.IsNullOrEmpty(TxtRFCSucursal.Text), "-1", TxtRFCSucursal.Text)
|
|
|
|
|
|
|
|
|
|
If CveCliente > 0 Then
|
|
|
|
|
If Actualizar Then
|
|
|
|
|
|
|
|
|
|
Dim Estatus As Boolean = ChkEstatusSucursal.Checked
|
|
|
|
|
|
|
|
|
|
If ObjCliente.UpdateSucursal(TxtNombreSucursal.Text.Trim, Estatus, CveCliente, CveClienteSuc, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim,
|
|
|
|
|
TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim, DdlVendedorSucursal.SelectedValue.ToEntero(), TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero(), TxtLimiteCreditoSucursal.Text.ToDecimal(), DdlResponsableSucursal.SelectedValue.ToEntero(),
|
|
|
|
|
DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG, RFC:=RFC) Then
|
|
|
|
|
GVSucursales.EditIndex = -1
|
|
|
|
|
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
|
|
|
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
|
|
|
|
End If
|
|
|
|
|
ObjCliente.Dispose()
|
|
|
|
|
|
|
|
|
|
If ViewState("Orden").ToString() <> String.Empty Then
|
|
|
|
|
CargaGrid(ViewState("Orden").ToString(), 0)
|
|
|
|
|
Else
|
|
|
|
|
CargaGrid("", 0)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Else
|
|
|
|
|
If ObjCliente.AddSucursal(CveCliente, TxtNombreSucursal.Text.Trim, UsuarioActual.CveUsuario, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim, TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim,
|
|
|
|
|
DdlVendedorSucursal.SelectedValue.ToEntero(), TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero(), TxtLimiteCreditoSucursal.Text.ToDecimal(), DdlResponsableSucursal.SelectedValue.ToEntero(),
|
|
|
|
|
DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG, RFC:=RFC) Then
|
|
|
|
|
TxtNombreSucursal.Text = ""
|
|
|
|
|
TxtCiudadSucursal.Text = ""
|
|
|
|
|
TxtColoniaSucursal.Text = ""
|
|
|
|
|
TxtCPSucursal.Text = ""
|
|
|
|
|
TxtDireccionSucursal.Text = ""
|
|
|
|
|
TxtEstadoSucursal.Text = ""
|
|
|
|
|
TxtLocalidadSucursal.Text = ""
|
|
|
|
|
TxtPaisSucursal.Text = ""
|
|
|
|
|
TxtNumExtSucursal.Text = ""
|
|
|
|
|
TxtNumIntSucursal.Text = ""
|
|
|
|
|
TxtTelefonoSucursal.Text = ""
|
|
|
|
|
TxtCorreoSucursal.Text = ""
|
|
|
|
|
TxtCorreoSucursalCotizacion.Text = ""
|
|
|
|
|
TxtContactoSucursal.Text = ""
|
|
|
|
|
DdlVendedorSucursal.SelectedIndex = 0
|
|
|
|
|
DdlMetodoPagoSucursal.SelectedIndex = 0
|
|
|
|
|
TxtNumeroCuenta.Text = ""
|
|
|
|
|
TxtLimiteCreditoSucursal.Text = ""
|
|
|
|
|
DdlResponsableSucursal.SelectedIndex = 0
|
|
|
|
|
DdlSucursalUsoCFDI.SelectedIndex = 0
|
|
|
|
|
DdlSucursalFormaPago33.SelectedIndex = 0
|
|
|
|
|
DdlSucursalMetodoPago33.SelectedIndex = 0
|
|
|
|
|
Alert("La nueva Sucursal del Cliente se guardó correctamente.", TipoMensaje.MsgInformacion)
|
|
|
|
|
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
|
|
|
|
|
|
|
|
|
If ViewState("Orden").ToString() <> String.Empty Then
|
|
|
|
|
CargaGrid(ViewState("Orden").ToString(), 0)
|
|
|
|
|
Else
|
|
|
|
|
CargaGrid("", 0)
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Dim CveAlmacenAgregadoSucursal As Integer = -1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If CveCliente > 0 Then
|
|
|
|
|
|
|
|
|
|
Dim ProcesoOK As Boolean = True
|
|
|
|
|
Dim ObjCliente As New ClsClientes
|
|
|
|
|
ObjCliente.IniciaTransacSQL()
|
|
|
|
|
|
|
|
|
|
If CveAlmacenAsignadoSucursal <= 0 AndAlso DdlTipoCliente.SelectedValue.ToEntero = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
|
|
|
|
CveAlmacenAgregadoSucursal = GeneraGuardaAlmacenAsignadoSucursal(TxtNombreSucursal.Text.Trim, ObjCliente.IniciaTransacSQL())
|
|
|
|
|
If Not CveAlmacenAgregadoSucursal > 0 Then
|
|
|
|
|
ProcesoOK = False
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If ProcesoOK Then
|
|
|
|
|
If Actualizar Then
|
|
|
|
|
Dim Estatus As Boolean = ChkEstatusSucursal.Checked
|
|
|
|
|
If ObjCliente.UpdateSucursal(TxtNombreSucursal.Text.Trim, Estatus, CveCliente, CveClienteSuc, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim,
|
|
|
|
|
TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim, DdlVendedorSucursal.SelectedValue.ToEntero(), TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero(), TxtLimiteCreditoSucursal.Text.ToDecimal(), DdlResponsableSucursal.SelectedValue.ToEntero(),
|
|
|
|
|
DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG, RFC:=RFC, CveAlmacenAsignado:=CveAlmacenAgregadoSucursal) Then
|
|
|
|
|
GVSucursales.EditIndex = -1
|
|
|
|
|
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
|
|
|
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
|
|
|
|
Else
|
|
|
|
|
ProcesoOK = False
|
|
|
|
|
End If
|
|
|
|
|
ObjCliente.Dispose()
|
|
|
|
|
|
|
|
|
|
Else
|
|
|
|
|
If ObjCliente.AddSucursal(CveCliente, TxtNombreSucursal.Text.Trim, UsuarioActual.CveUsuario, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim, TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim,
|
|
|
|
|
DdlVendedorSucursal.SelectedValue.ToEntero(), TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero(), TxtLimiteCreditoSucursal.Text.ToDecimal(), DdlResponsableSucursal.SelectedValue.ToEntero(),
|
|
|
|
|
DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG, RFC:=RFC, CveAlmacenAsignado:=CveAlmacenAgregadoSucursal) Then
|
|
|
|
|
TxtNombreSucursal.Text = ""
|
|
|
|
|
TxtCiudadSucursal.Text = ""
|
|
|
|
|
TxtColoniaSucursal.Text = ""
|
|
|
|
|
TxtCPSucursal.Text = ""
|
|
|
|
|
TxtDireccionSucursal.Text = ""
|
|
|
|
|
TxtEstadoSucursal.Text = ""
|
|
|
|
|
TxtLocalidadSucursal.Text = ""
|
|
|
|
|
TxtPaisSucursal.Text = ""
|
|
|
|
|
TxtNumExtSucursal.Text = ""
|
|
|
|
|
TxtNumIntSucursal.Text = ""
|
|
|
|
|
TxtTelefonoSucursal.Text = ""
|
|
|
|
|
TxtCorreoSucursal.Text = ""
|
|
|
|
|
TxtCorreoSucursalCotizacion.Text = ""
|
|
|
|
|
TxtContactoSucursal.Text = ""
|
|
|
|
|
DdlVendedorSucursal.SelectedIndex = 0
|
|
|
|
|
DdlMetodoPagoSucursal.SelectedIndex = 0
|
|
|
|
|
TxtNumeroCuenta.Text = ""
|
|
|
|
|
TxtLimiteCreditoSucursal.Text = ""
|
|
|
|
|
DdlResponsableSucursal.SelectedIndex = 0
|
|
|
|
|
DdlSucursalUsoCFDI.SelectedIndex = 0
|
|
|
|
|
DdlSucursalFormaPago33.SelectedIndex = 0
|
|
|
|
|
DdlSucursalMetodoPago33.SelectedIndex = 0
|
|
|
|
|
Alert("La nueva Sucursal del Cliente se guardó correctamente.", TipoMensaje.MsgInformacion)
|
|
|
|
|
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
|
|
|
|
Else
|
|
|
|
|
ProcesoOK = False
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If ProcesoOK Then
|
|
|
|
|
|
|
|
|
|
ObjCliente.Commit()
|
|
|
|
|
|
|
|
|
|
If ViewState("Orden").ToString() <> String.Empty Then
|
|
|
|
|
CargaGrid(ViewState("Orden").ToString(), 0)
|
|
|
|
|
Else
|
|
|
|
|
CargaGrid("", 0)
|
|
|
|
|
End If
|
|
|
|
|
Else
|
|
|
|
|
ObjCliente.RollBack()
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ObjCliente.Dispose()
|
|
|
|
|
|
|
|
|
|
Else
|
|
|
|
|
AddSucursalTemp()
|
|
|
|
|
End If
|
|
|
|
|
@@ -3080,12 +3133,10 @@ Partial Class Clientes
|
|
|
|
|
txtLt.Text = ""
|
|
|
|
|
|
|
|
|
|
UpModalDivMapa.Update()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UpAgregarSucursal.Update()
|
|
|
|
|
CargaDdlSucursalCliente()
|
|
|
|
|
ObjCliente.Dispose()
|
|
|
|
|
|
|
|
|
|
CargaDdlSucursalCliente()
|
|
|
|
|
|
|
|
|
|
Me.Actualizar = False
|
|
|
|
|
Me.CveClienteSuc = -1
|
|
|
|
|
RegistraScript("hideDivEC();")
|
|
|
|
|
@@ -3116,7 +3167,7 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If Not CveCliente > 0 Then
|
|
|
|
|
e.Row.Cells(3).Visible = False
|
|
|
|
|
e.Row.Cells(1).Visible = False
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
@@ -3162,8 +3213,8 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
Me.Actualizar = True
|
|
|
|
|
'Me.DivRFCSucursal.Visible = False
|
|
|
|
|
Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString().ToEntero()
|
|
|
|
|
|
|
|
|
|
Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString().ToEntero()
|
|
|
|
|
CveAlmacenAsignadoSucursal = -1
|
|
|
|
|
|
|
|
|
|
Dim ObjCliente As New ClsClientes
|
|
|
|
|
|
|
|
|
|
@@ -3203,6 +3254,8 @@ Partial Class Clientes
|
|
|
|
|
txtLt.Text = ObjCliente.DtResultados.Rows(0)("LT").ToString()
|
|
|
|
|
HDMAPOP.Value = "2"
|
|
|
|
|
|
|
|
|
|
CveAlmacenAsignadoSucursal = ObjCliente.DtResultados.Rows(0)("CveAlmacenAsignado").ToString().ToEntero
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UpAgregarSucursal.Update()
|
|
|
|
|
UpModalDivMapa.Update()
|
|
|
|
|
@@ -5431,8 +5484,20 @@ Partial Class Clientes
|
|
|
|
|
TempDTSucursales.Columns.Add("Usuario", Type.GetType("System.String"))
|
|
|
|
|
TempDTSucursales.Columns.Add("LT", Type.GetType("System.String"))
|
|
|
|
|
TempDTSucursales.Columns.Add("LG", Type.GetType("System.String"))
|
|
|
|
|
TempDTSucursales.Columns.Add()
|
|
|
|
|
|
|
|
|
|
TempDTSucursales.Columns.Add("CveAlmacenAsignado", Type.GetType("System.Int32"))
|
|
|
|
|
TempDTSucursales.Columns.Add("CveUsoCFDI", Type.GetType("System.Int32"))
|
|
|
|
|
TempDTSucursales.Columns.Add("CveFormaPago33", Type.GetType("System.Int32"))
|
|
|
|
|
TempDTSucursales.Columns.Add("CveMetodoPago33", Type.GetType("System.Int32"))
|
|
|
|
|
TempDTSucursales.Columns.Add("Correo", Type.GetType("System.String"))
|
|
|
|
|
TempDTSucursales.Columns.Add("CorreoCotizacion", Type.GetType("System.String"))
|
|
|
|
|
TempDTSucursales.Columns.Add("LimiteCredito", Type.GetType("System.Decimal"))
|
|
|
|
|
TempDTSucursales.Columns.Add("CveResponsableCobranza", Type.GetType("System.Int32"))
|
|
|
|
|
|
|
|
|
|
TempDTSucursales.Columns.Add()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
@@ -5458,15 +5523,20 @@ Partial Class Clientes
|
|
|
|
|
RowSucursal("CveMetodoPago") = DdlMetodoPagoSucursal.SelectedValue.ToEntero()
|
|
|
|
|
RowSucursal("CveUsuario") = UsuarioActual.CveUsuario
|
|
|
|
|
RowSucursal("FechaIng") = NowADS().ToShortDateString()
|
|
|
|
|
RowSucursal("Usuario") = UsuarioActual.Usuario
|
|
|
|
|
|
|
|
|
|
RowSucursal("Usuario") = UsuarioActual.Usuario
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero()
|
|
|
|
|
RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero()
|
|
|
|
|
RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero()
|
|
|
|
|
|
|
|
|
|
RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero()
|
|
|
|
|
|
|
|
|
|
RowSucursal("LimiteCredito") = TxtLimiteCreditoSucursal.Text.ToDecimal
|
|
|
|
|
RowSucursal("CveResponsableCobranza") = DdlResponsableSucursal.SelectedValue.ToEntero
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowSucursal("LT") = If(txtLt.Text.ToDouble <> 0, txtLt.Text, "0")
|
|
|
|
|
RowSucursal("LG") = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0")
|
|
|
|
|
|
|
|
|
|
RowSucursal("LG") = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0")
|
|
|
|
|
|
|
|
|
|
TempDTSucursales.Rows.Add(RowSucursal)
|
|
|
|
|
|
|
|
|
|
GVSucursales.DataSource = TempDTSucursales
|
|
|
|
|
@@ -9738,6 +9808,14 @@ Partial Class Clientes
|
|
|
|
|
Protected Sub DdlTipoCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
|
|
|
TabSistema.Enabled = DdlTipoCliente.SelectedValue = "1"
|
|
|
|
|
|
|
|
|
|
Dim CveFuncionalidad404 As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
|
|
|
|
If CveFuncionalidad404.Contiene(30) And DdlTipoCliente.SelectedValue.ToEntero = 1 Then
|
|
|
|
|
DivCrearPrecioLista.Visible = True
|
|
|
|
|
Else
|
|
|
|
|
DivCrearPrecioLista.Visible = True
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UpDatos.Update()
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
@@ -9866,8 +9944,9 @@ Partial Class Clientes
|
|
|
|
|
Return retorno
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
Public Property Token As String = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdmVQbGF0YWZvcm1hIjoiMSIsIkN2ZVVzdWFyaW8iOiIxNTM4IiwiQ3ZlRW1wcmVzYSI6IjIiLCJDdmVSb2wiOiIxIiwiRmVjaGEiOiJzw6FiYWRvLCAyMCBkZSBtYXJ6byBkZSAyMDIxIiwibmJmIjoxNjE2MjYzMzg2LCJleHAiOjE2MTYyNzQxODYsImlhdCI6MTYxNjI2MzM4Nn0.N_4yHZ0J41GgcXbAFfvyLvXiV-U8nRm85LoZhG1riNc"
|
|
|
|
|
|
|
|
|
|
Public Property Token As String = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdmVQbGF0YWZvcm1hIjoiMSIsIkN2ZVVzdWFyaW8iOiIxNTM4IiwiQ3ZlRW1wcmVzYSI6IjIiLCJDdmVSb2wiOiIxIiwiRmVjaGEiOiJzw6FiYWRvLCAyMCBkZSBtYXJ6byBkZSAyMDIxIiwibmJmIjoxNjE2MjYzMzg2LCJleHAiOjE2MTYyNzQxODYsImlhdCI6MTYxNjI2MzM4Nn0.N_4yHZ0J41GgcXbAFfvyLvXiV-U8nRm85LoZhG1riNc"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Public Class MResult
|
|
|
|
|
Public Property isSuccess As Boolean
|
|
|
|
|
Public Property message As String
|
|
|
|
|
@@ -10421,12 +10500,12 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
Private Function GeneraGuardaAlmacenCliente(ByRef transaccionSQL As SqlTransaction) As Boolean
|
|
|
|
|
Private Function GeneraGuardaAlmacenAsignado(NombreAlmacen As String, ByRef transaccionSQL As SqlTransaction) As Boolean
|
|
|
|
|
|
|
|
|
|
Dim respuesta As Boolean = True
|
|
|
|
|
Dim ObjInv As New ClsInventarios(transaccionSQL)
|
|
|
|
|
|
|
|
|
|
If ObjInv.AddAlmacen(TxtNombre.Text.Trim, 1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlSubProyecto.SelectedValue.ToEntero) Then
|
|
|
|
|
If ObjInv.AddAlmacen(NombreAlmacen, 1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlSubProyecto.SelectedValue.ToEntero) Then
|
|
|
|
|
|
|
|
|
|
DdlAlmacenAsignado.Items.Add(New ListItem(TxtNombre.Text.Trim, ObjInv.CveAlmacenAgregado.ToString))
|
|
|
|
|
DdlAlmacenAsignado.SelectedValueExist(ObjInv.CveAlmacenAgregado.ToString)
|
|
|
|
|
@@ -10441,5 +10520,20 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
Private Function GeneraGuardaAlmacenAsignadoSucursal(NombreAlmacen As String, ByRef transaccionSQL As SqlTransaction) As Integer
|
|
|
|
|
|
|
|
|
|
Dim CveAlmacenAgregado As Integer = -1
|
|
|
|
|
Dim ObjInv As New ClsInventarios(transaccionSQL)
|
|
|
|
|
|
|
|
|
|
If ObjInv.AddAlmacen(NombreAlmacen, 1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlSubProyecto.SelectedValue.ToEntero) Then
|
|
|
|
|
CveAlmacenAgregado = ObjInv.CveAlmacenAgregado
|
|
|
|
|
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Return CveAlmacenAgregado
|
|
|
|
|
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
End Class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|