Agregar BCI

This commit is contained in:
janeth arvizu
2019-10-14 14:06:05 -07:00
parent fa1697099d
commit cf80724402
3 changed files with 90 additions and 12 deletions

View File

@@ -2926,5 +2926,66 @@ Public Class ClsGenerales
End Sub End Sub
#End Region #End Region
#Region " P O L I Z A V I R T U A L "
Public Function ModelosAutosGet(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_ModelosAutosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los Modelos de Autos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function MarcasAutosGet(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_MarcasAutosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las Marcas de Autos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function MarcasUsadoGet(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_MarcasUsadoGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las Marcas de Usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function BCIUsadoGet(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_BCIUsadoGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los BCI de Usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
End Class End Class

View File

@@ -2659,12 +2659,12 @@
<asp:TextBox ID="TxtObsPS" runat="server" Height="100%" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox> <asp:TextBox ID="TxtObsPS" runat="server" Height="100%" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
</div> </div>
<div class="col-md-5" id="DivRecepcionUsados" runat="server" visible="false"> <div class="col-md-5" id="DivRecepcionUsados" runat="server" visible="false">
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn" <asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-height="100" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-height="100"
DataKeyNames="CvePSCargo,CveUM,Cargo,CveTamaño"> DataKeyNames="CvePSCargo,CveUM,Cargo,CveTamaño">
<Columns> <Columns>
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70%" /> <asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70%" />
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%" > <asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtCantidad" runat="server" Width="80%"></asp:TextBox> <asp:TextBox ID="TxtCantidad" runat="server" Width="80%"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="FTBECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
@@ -2674,6 +2674,17 @@
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
<br />
<div class="row">
<div class="col-md-7">
<label>BCI:</label>
<br />
<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>
<br /> <br />
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -3134,8 +3145,7 @@
$("#DivAnticipos").show(); $("#DivAnticipos").show();
$("#DivAnticipos").center(); $("#DivAnticipos").center();
} }
catch (e) catch (e) { alert(e); }
{ alert(e); }
} }
@@ -3144,8 +3154,7 @@
$("#ModalOtrosConceptos").show(); $("#ModalOtrosConceptos").show();
$("#ModalOtrosConceptos").center(); $("#ModalOtrosConceptos").center();
} }
catch (e) catch (e) { alert(e); }
{ alert(e); }
} }
@@ -3155,8 +3164,7 @@
$("#DivEstadoCaja").show(); $("#DivEstadoCaja").show();
$("#DivEstadoCaja").center(); $("#DivEstadoCaja").center();
} }
catch (e) catch (e) { alert(e); }
{ alert(e); }
} }
@@ -3169,8 +3177,7 @@
return false; return false;
} }
catch (e) catch (e) { alert(e); }
{ alert(e); }
} }
@@ -3189,8 +3196,7 @@
$get("HdnTipoMovimiento").value = "1"; $get("HdnTipoMovimiento").value = "1";
} }
} }
catch (e) catch (e) { alert(e); }
{ alert(e); }
} }

View File

@@ -3598,6 +3598,7 @@ Partial Class PV
Private Sub CargaAgregar() Private Sub CargaAgregar()
Modalidad = "A" Modalidad = "A"
LnkAgregarPS.Text = "Agregar" LnkAgregarPS.Text = "Agregar"
CargaBCI()
LimpiaAgregar() LimpiaAgregar()
LimpiaAjuste() LimpiaAjuste()
ModalidadAjuste = "A" ModalidadAjuste = "A"
@@ -3606,6 +3607,16 @@ Partial Class PV
UpVenta.Update() UpVenta.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta")) RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"))
End Sub End Sub
Private Sub CargaBCI()
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()
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)
Modalidad = "U" Modalidad = "U"