Guardar Modelo y BCI
This commit is contained in:
@@ -3976,7 +3976,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
#Region " U S A D O S "
|
#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
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_VentasUsadosAdd", CommandType.StoredProcedure)
|
DataAdapter("PA_Vta_VentasUsadosAdd", CommandType.StoredProcedure)
|
||||||
@@ -3986,6 +3986,8 @@ Public Class ClsVentas
|
|||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||||
.Add("@PU", SqlDbType.Money).Value = PU
|
.Add("@PU", SqlDbType.Money).Value = PU
|
||||||
|
.Add("@CveBCI", SqlDbType.Int).Value = CveBCI
|
||||||
|
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -1808,7 +1808,7 @@ Namespace Modelos
|
|||||||
If TipoDocto.Contiene("Rem") Then
|
If TipoDocto.Contiene("Rem") Then
|
||||||
If DtRecepcionUsados IsNot Nothing Then
|
If DtRecepcionUsados IsNot Nothing Then
|
||||||
For Each drow As DataRow In DtRecepcionUsados.Rows
|
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
|
Resultado = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -2675,7 +2675,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<%-- <br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<label>BCI:</label>
|
<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 ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="200px">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|||||||
@@ -3608,14 +3608,14 @@ Partial Class PV
|
|||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaBCI()
|
Private Sub CargaBCI()
|
||||||
Dim ObjGral As New ClsGenerales
|
'Dim ObjGral As New ClsGenerales
|
||||||
|
|
||||||
If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
|
'If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
|
||||||
DdlBCIUsado.DataSource = ObjGral.DtResultados
|
' DdlBCIUsado.DataSource = ObjGral.DtResultados
|
||||||
End If
|
'End If
|
||||||
DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
'DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlBCIUsado.SelectedValueExist(-1)
|
'DdlBCIUsado.SelectedValueExist(-1)
|
||||||
DdlBCIUsado.DataBind()
|
'DdlBCIUsado.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
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("CveUM", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
|
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
|
||||||
|
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
|
||||||
|
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
|
||||||
@@ -5319,6 +5321,8 @@ Partial Class PV
|
|||||||
Row("CveUM") = Gvr.DataKey("CveUM").ToEntero
|
Row("CveUM") = Gvr.DataKey("CveUM").ToEntero
|
||||||
Row("CveVentaDetalle") = -1
|
Row("CveVentaDetalle") = -1
|
||||||
Row("PU") = Gvr.DataKey("Cargo").ToDouble
|
Row("PU") = Gvr.DataKey("Cargo").ToDouble
|
||||||
|
Row("CveBCIUsado") = -1
|
||||||
|
Row("CveModeloAuto") = -1
|
||||||
TmpDTRecepcionUsados.Rows.Add(Row)
|
TmpDTRecepcionUsados.Rows.Add(Row)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user