- correción el PU al cargar por excel
This commit is contained in:
@@ -274,7 +274,7 @@ Partial Class Ventas_Promociones
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetPromociones(CvePromocion, "-1", -1, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjVentas.DtResultados.Rows.Count = 1 Then
|
||||
Dim Dr = ObjVentas.DtResultados.Rows(0)
|
||||
Dim Dr As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
TxtPromocion.Text = Dr("Promocion").ToString
|
||||
TxtFechaI.Text = Dr("FechaInicio").ToString.ToDate.ToShortDateString
|
||||
TxtFechaF.Text = Dr("FechaFin").ToString.ToDate.ToShortDateString
|
||||
@@ -475,7 +475,7 @@ Partial Class Ventas_Promociones
|
||||
Private Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvDatos.RowCommand
|
||||
|
||||
If e.CommandName = "Editar" Then
|
||||
Dim Gvr = GvDatos.Rows(e.CommandArgument.ToString.ToEntero)
|
||||
Dim Gvr As GridViewRow = GvDatos.Rows(e.CommandArgument.ToString.ToEntero)
|
||||
|
||||
RegistraScript("$('#DivAgregar').modal('show')")
|
||||
CveConsecutivo = e.CommandArgument.ToString.ToEntero
|
||||
@@ -517,7 +517,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
End Sub
|
||||
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim DbRow = TempDT.Rows(e.RowIndex)
|
||||
Dim DbRow As DataRow = TempDT.Rows(e.RowIndex)
|
||||
|
||||
If CvePromocion > 0 Then
|
||||
DbRow("Estatus") = 2
|
||||
@@ -543,7 +543,7 @@ Partial Class Ventas_Promociones
|
||||
Private Sub GuardaPromocion()
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
CvePromocion = ObjVentas.AddPromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
|
||||
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
@@ -588,7 +588,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
Dim ObjGral As New ClsGenerales(ObjVentas.IniciaTransacSQL)
|
||||
@@ -854,7 +854,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||
@@ -973,8 +973,8 @@ Partial Class Ventas_Promociones
|
||||
|
||||
Dim ProcesoOK As Boolean = False
|
||||
Dim DTPlantilla As New DataTable
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Dim ErrorExcel As Boolean = False
|
||||
DTPlantilla = ReadExcelFile(Ruta + FileName, True)
|
||||
'Alert(DT.Rows.Count.ToString)
|
||||
|
||||
@@ -1014,18 +1014,13 @@ Partial Class Ventas_Promociones
|
||||
Dr("CvePS") = CvePS
|
||||
End If
|
||||
|
||||
|
||||
Dr("CodigoPS") = dRowTemplate("CodigoPS").ToString
|
||||
Dr("PUAnterior") = 0
|
||||
|
||||
Dr("CveTipoPromocion") = CveTipoPromosicion
|
||||
Dr("TipoPromocion") = dRowTemplate("TipoPromocion").ToString
|
||||
Dr("Promocion") = Promocion
|
||||
|
||||
Dr("PUPromocion") = 0
|
||||
|
||||
Dr("PUPromocion") = Promocion
|
||||
Dr("CantidadMinima") = CantidadMinima
|
||||
|
||||
Dr("AplicaRestriccionTexto") = "No"
|
||||
Dr("AplicaRestriccion") = False
|
||||
Dr("HoraInicio") = MinFecha.ToDateTime
|
||||
@@ -1046,18 +1041,11 @@ Partial Class Ventas_Promociones
|
||||
Else
|
||||
Dr("CveRinTamaño") = -1
|
||||
End If
|
||||
|
||||
TempDT.Rows.Add(Dr)
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
CargaGrid()
|
||||
RegistraScript("$('#DivAgregarPlantilla').modal('hide')")
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ValidaDTPlantilla(ByRef DTPlantilla As DataTable) As Boolean
|
||||
|
||||
Reference in New Issue
Block a user