nuevos campos para ecommerce

This commit is contained in:
2023-09-27 07:15:19 -07:00
parent aaef88e243
commit 727789040c
3 changed files with 84 additions and 42 deletions

View File

@@ -411,7 +411,8 @@ Public Class ClsProductosServicios
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "") As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd") DataAdapter("PA_ProductosServiciosAdd")
@@ -509,6 +510,8 @@ Public Class ClsProductosServicios
'Nuevo MLopez 18/11/2022 'Nuevo MLopez 18/11/2022
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
End With End With
@@ -643,7 +646,8 @@ Public Class ClsProductosServicios
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1,
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -740,6 +744,8 @@ Public Class ClsProductosServicios
'Nuevo MLopez 18/11/2022 'Nuevo MLopez 18/11/2022
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
End With End With

View File

@@ -530,6 +530,41 @@
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12" id="DiveCommerce" runat="server" visible="false">
<div class="portlet xspadding light bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-briefcase font-green"></i>
<span class="caption-subject bold uppercase">Ecommerce</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreComercial" CssClass="form-control input-sm" runat="server" >
</asp:TextBox>
<label for="<%= TxtNombreComercial.ClientID.ToString()%>">Nombre Comercial:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtEcommerceNota" CssClass="form-control input-sm" runat="server" >
</asp:TextBox>
<label for="<%= TxtEcommerceNota.ClientID.ToString()%>">Notas Adicionales:</label>
<i></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>

View File

@@ -430,6 +430,9 @@ Partial Class ProductosyServicios
DivCitricos.Visible = True DivCitricos.Visible = True
CargaPanelCitricos() CargaPanelCitricos()
End If End If
If UsuarioActual.CveEmpresa = 2 Then
DiveCommerce.Visible = True
End If
End Sub End Sub
@@ -1469,7 +1472,8 @@ Partial Class ProductosyServicios
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad,
CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) > 0 Then CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1540,7 +1544,8 @@ Partial Class ProductosyServicios
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal,
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) Then RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True TieneError = True
@@ -1704,7 +1709,7 @@ Partial Class ProductosyServicios
#Region "GV ALIAS" #Region "GV ALIAS"
Protected Sub GVAlias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlias.RowDeleting Protected Sub GVAlias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlias.RowDeleting
Dim ObjAliasDelete As New ClsProductosServicios Dim ObjAliasDelete As New ClsProductosServicios
Dim TieneError = False Dim TieneError As Boolean = False
If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, UsuarioActual.CveUsuario) Then If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, UsuarioActual.CveUsuario) Then
GVAlias.EditIndex = -1 GVAlias.EditIndex = -1
@@ -1783,11 +1788,11 @@ Partial Class ProductosyServicios
CargaGvEquivalencias() CargaGvEquivalencias()
End Sub End Sub
Private Sub GvEquivalencia_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvEquivalencia.RowUpdating Private Sub GvEquivalencia_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvEquivalencia.RowUpdating
Dim TieneError = False Dim TieneError As Boolean = False
Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
Dim UnidadBase = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True" Dim UnidadBase As Boolean = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True"
Dim Cantidad = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal Dim Cantidad As Decimal = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal
Dim ObjProductosServicios As New ClsProductosServicios() Dim ObjProductosServicios As New ClsProductosServicios()
If Not ObjProductosServicios.UpdatePSEquivalencias(CvePS, CveUM, Cantidad, UnidadBase, 0, UsuarioActual.CveUsuario) Then If Not ObjProductosServicios.UpdatePSEquivalencias(CvePS, CveUM, Cantidad, UnidadBase, 0, UsuarioActual.CveUsuario) Then
@@ -1807,9 +1812,9 @@ Partial Class ProductosyServicios
End Sub End Sub
Private Sub GvEquivalencia_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvEquivalencia.RowDeleting Private Sub GvEquivalencia_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvEquivalencia.RowDeleting
Dim TieneError = False Dim TieneError As Boolean = False
Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
Dim ObjProductosServicios As New ClsProductosServicios() Dim ObjProductosServicios As New ClsProductosServicios()
If Not ObjProductosServicios.RemovePSEquivalencias(CvePS, CveUM) Then If Not ObjProductosServicios.RemovePSEquivalencias(CvePS, CveUM) Then
@@ -2349,7 +2354,7 @@ Partial Class ProductosyServicios
Public Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged Public Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
If DdlClasificacion.SelectedValue.ToEntero > 0 Then If DdlClasificacion.SelectedValue.ToEntero > 0 Then
If Me.CvePS <= 0 AndAlso (Not CveSATPS > 0 Or CveSATPS = 46920) Then If Me.CvePS <= 0 AndAlso (Not CveSATPS > 0 Or CveSATPS = 46920) Then
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
DdlSATPS.SelectedValue = Dr("CveSATPS").ToString DdlSATPS.SelectedValue = Dr("CveSATPS").ToString
@@ -2367,7 +2372,7 @@ Partial Class ProductosyServicios
If DdlClasificacion.SelectedValue.ToEntero > 0 Then If DdlClasificacion.SelectedValue.ToEntero > 0 Then
Try Try
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
If Boolean.Parse(Dr("EsAcumulador").ToString) Then If Boolean.Parse(Dr("EsAcumulador").ToString) Then
MostarOcultarDivTamanio(True) MostarOcultarDivTamanio(True)
Else Else
@@ -2381,10 +2386,6 @@ Partial Class ProductosyServicios
OnError("Ocurrió un error al mostrar los tamaños", ex) OnError("Ocurrió un error al mostrar los tamaños", ex)
End Try End Try
End If End If
End Sub End Sub
Private Sub MostarOcultarDivTamanio(Mostrar As Boolean) Private Sub MostarOcultarDivTamanio(Mostrar As Boolean)
@@ -2479,7 +2480,7 @@ Partial Class ProductosyServicios
UpEcommercePSRelacionados.Update() UpEcommercePSRelacionados.Update()
End Sub End Sub
Private Function GuardaEcommerce() As Boolean Private Function GuardaEcommerce() As Boolean
Dim TieneError = False Dim TieneError As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then
@@ -2494,10 +2495,10 @@ Partial Class ProductosyServicios
End If End If
End If End If
Dim Descripcion = TxtEcommerceDescripcion.Text.Trim Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
Dim Disponible = ChkEcommerceDisponible.Checked Dim Disponible As Boolean = ChkEcommerceDisponible.Checked
Dim ObjEcommerce As New ClsECommerce Dim ObjEcommerce As New ClsECommerce
If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
@@ -2510,11 +2511,11 @@ Partial Class ProductosyServicios
Return TieneError Return TieneError
End Function End Function
Private Function ValidaGuardarEcommerce() As Boolean Private Function ValidaGuardarEcommerce() As Boolean
Dim Retorno = True Dim Retorno As Boolean = True
Dim Mensaje As New StringBuilder Dim Mensaje As New StringBuilder
'DESCRIPCION 'DESCRIPCION
Dim Descripcion = TxtEcommerceDescripcion.Text.Trim Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
If Descripcion.Length = 0 Then If Descripcion.Length = 0 Then
Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>") Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
End If End If
@@ -2523,7 +2524,7 @@ Partial Class ProductosyServicios
End If End If
'PRECIO BASE 'PRECIO BASE
Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
If PrecioBase = 0 Then If PrecioBase = 0 Then
Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>") Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>")
End If End If
@@ -2532,7 +2533,7 @@ Partial Class ProductosyServicios
End If End If
'PRECIO FINAL 'PRECIO FINAL
Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
If PrecioPromocion < 0 Then If PrecioPromocion < 0 Then
Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>") Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
End If End If
@@ -2567,8 +2568,8 @@ Partial Class ProductosyServicios
Exit Sub Exit Sub
End If End If
Dim TieneError = False Dim TieneError As Boolean = False
Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
'AGREGAR 'AGREGAR
Dim ObjEcommerce As New ClsECommerce Dim ObjEcommerce As New ClsECommerce
@@ -2585,11 +2586,11 @@ Partial Class ProductosyServicios
End If End If
End Sub End Sub
Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean
Dim Retorno = True Dim Retorno As Boolean = True
Dim Mensaje As New StringBuilder Dim Mensaje As New StringBuilder
'INSIGNIA 'INSIGNIA
Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
If CveInsignia = 0 Then If CveInsignia = 0 Then
Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>") Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
End If End If
@@ -2609,8 +2610,8 @@ Partial Class ProductosyServicios
Return Retorno Return Retorno
End Function End Function
Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
Dim TieneError = False Dim TieneError As Boolean = False
Dim GvRow = GvEcommercePSInsignias.Rows(e.RowIndex) Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex)
Dim ObjEcommerce As New ClsECommerce Dim ObjEcommerce As New ClsECommerce
If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
@@ -2645,11 +2646,11 @@ Partial Class ProductosyServicios
Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs) Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs)
Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
Dim FileMove = "" Dim FileMove As String = ""
Dim Archivo = "" Dim Archivo As String = ""
Dim DirectorioTemporal = "" Dim DirectorioTemporal As String = ""
Dim DirectorioDestino = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\" Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
If Not Directory.Exists(DirectorioDestino) Then If Not Directory.Exists(DirectorioDestino) Then
Directory.CreateDirectory(DirectorioDestino) Directory.CreateDirectory(DirectorioDestino)
End If End If
@@ -2712,8 +2713,8 @@ Partial Class ProductosyServicios
Exit Sub Exit Sub
End If End If
Dim TieneError = False Dim TieneError As Boolean = False
Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
'AGREGAR 'AGREGAR
Dim ObjEcommerce As New ClsECommerce Dim ObjEcommerce As New ClsECommerce
@@ -2731,11 +2732,11 @@ Partial Class ProductosyServicios
End If End If
End Sub End Sub
Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean
Dim Retorno = True Dim Retorno As Boolean = True
Dim Mensaje As New StringBuilder Dim Mensaje As New StringBuilder
'PS 'PS
Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
If CvePS = 0 Then If CvePS = 0 Then
Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>") Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
End If End If
@@ -2755,8 +2756,8 @@ Partial Class ProductosyServicios
Return Retorno Return Retorno
End Function End Function
Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
Dim TieneError = False Dim TieneError As Boolean = False
Dim GvRow = GvEcommercePSRealacionados.Rows(e.RowIndex) Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
Dim ObjEcommerce As New ClsECommerce Dim ObjEcommerce As New ClsECommerce
If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then