Guardar Modelo y BCI

This commit is contained in:
janeth arvizu
2019-10-15 13:07:04 -07:00
parent ee9ba21525
commit 72b3b627ce
4 changed files with 17 additions and 11 deletions

View File

@@ -3976,7 +3976,7 @@ Public Class ClsVentas
#Region " U S A D O S "
Public Function AddVentaUsado(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal) As Boolean
Public Function AddVentaUsado(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, Optional CveBCI As Integer = -1, Optional CveModeloAuto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUsadosAdd", CommandType.StoredProcedure)
@@ -3986,6 +3986,8 @@ Public Class ClsVentas
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
.Add("@PU", SqlDbType.Money).Value = PU
.Add("@CveBCI", SqlDbType.Int).Value = CveBCI
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
End With
Try

View File

@@ -1808,7 +1808,7 @@ Namespace Modelos
If TipoDocto.Contiene("Rem") Then
If DtRecepcionUsados IsNot Nothing Then
For Each drow As DataRow In DtRecepcionUsados.Rows
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal) Then
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
Resultado = False
Exit For
End If

View File

@@ -2675,7 +2675,7 @@
</div>
</div>
<br />
<%-- <br />
<div class="row">
<div class="col-md-7">
<label>BCI:</label>
@@ -2683,7 +2683,7 @@
<asp:DropDownList ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="200px">
</asp:DropDownList>
</div>
</div>
</div>--%>
<br />

View File

@@ -3608,14 +3608,14 @@ Partial Class PV
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"))
End Sub
Private Sub CargaBCI()
Dim ObjGral As New ClsGenerales
'Dim ObjGral As New ClsGenerales
If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
DdlBCIUsado.DataSource = ObjGral.DtResultados
End If
DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlBCIUsado.SelectedValueExist(-1)
DdlBCIUsado.DataBind()
'If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
' DdlBCIUsado.DataSource = ObjGral.DtResultados
'End If
'DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlBCIUsado.SelectedValueExist(-1)
'DdlBCIUsado.DataBind()
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -5277,6 +5277,8 @@ Partial Class PV
TmpDTRecepcionUsados.Columns.Add("CveUM", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
End Sub
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
@@ -5319,6 +5321,8 @@ Partial Class PV
Row("CveUM") = Gvr.DataKey("CveUM").ToEntero
Row("CveVentaDetalle") = -1
Row("PU") = Gvr.DataKey("Cargo").ToDouble
Row("CveBCIUsado") = -1
Row("CveModeloAuto") = -1
TmpDTRecepcionUsados.Rows.Add(Row)
End If