This commit is contained in:
2024-12-31 06:32:36 -07:00
parent 45ea3f7b44
commit da53652af6
2 changed files with 53 additions and 56 deletions

View File

@@ -110,9 +110,12 @@
<div class="portlet-body form">
<div class="row">
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
<i></i>
<asp:Panel ID="PnlCodigo" runat="server" DefaultButton="BtnConsultaCodigo">
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
<i></i>
<asp:Button ID="BtnConsultaCodigo" runat="server" Text="" Visible="false" style="display:none;" OnClick="BtnConsultaCodigo_Click" />
</asp:Panel>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumeroParte" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
@@ -644,7 +647,42 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" id="DivListaPrecios" 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">Lista de Precios &nbsp;&nbsp;</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">
<asp:GridView ID="GvPLMultiple" Width="100%" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false" DataKeyNames="CvePrecioLista,PrecioLista,Precio"
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" EmptyDataText="No se encontraron registros" OnRowDataBound="GvMultiple_RowDataBound">
<Columns>
<asp:BoundField DataField="PrecioLista" HeaderText="Lista de Precio" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LtlLista" runat="server">Precio</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" MaxLength="39" Text='<%# Eval("Precio") %>' onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" id="DivImagen" runat="server" visible="false">
<div class="portlet xspadding light bordered">
@@ -723,42 +761,7 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" id="DivListaPrecios" 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">Lista de Precios &nbsp;&nbsp;</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">
<asp:GridView ID="GvMultiple" Width="100%" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false" DataKeyNames="CvePrecioLista,PrecioLista,Precio"
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" EmptyDataText="No se encontraron registros" OnRowDataBound="GvMultiple_RowDataBound">
<Columns>
<asp:BoundField DataField="PrecioLista" HeaderText="Lista de Precio" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LtlLista" runat="server">Precio</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" MaxLength="39" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -142,14 +142,6 @@ Partial Class ProductosyServicios
End Set
End Property
Private Property DtPreciosMultiple As DataTable
Get
Return If(IsNothing(ViewState("DtPreciosMultiple")), Nothing, CType(ViewState("DtPreciosMultiple"), DataTable))
End Get
Set(value As DataTable)
ViewState("DtPreciosMultiple") = value
End Set
End Property
#End Region
Private ReadOnly Property PermiteClasificacion2 As Boolean
@@ -2984,14 +2976,12 @@ Partial Class ProductosyServicios
Private Sub CargaListaPrecios()
If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
Dim objPS As New ClsProductosServicios
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CveClasificacion:=-1, CvePS:=CvePS,
CveProveedor:=-1, Estado:=-1, Marcas:="-1", CveModelo:=-1) Then
DtPreciosMultiple = objPS.DtResultados.Copy()
GvMultiple.DataSource = DtPreciosMultiple
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
GvPLMultiple.DataSource = objPS.DtResultados
End If
objPS.Dispose()
DivListaPrecios.Visible = True
GvMultiple.DataBind()
GvPLMultiple.DataBind()
End If
End Sub
@@ -2999,9 +2989,9 @@ Partial Class ProductosyServicios
Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(2).ToString().ToDecimal()
' Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(2).ToString().ToDecimal()
e.Row.FCTextBox("TxtPrecio").Text = Valor.FormatoNumero(2)
' e.Row.FCTextBox("TxtPrecio").Text = Valor.FormatoNumero(2)
End If
End Sub
@@ -3010,7 +3000,7 @@ Partial Class ProductosyServicios
Dim TieneError As Boolean = False
Try
For Each GvRow As GridViewRow In GvMultiple.Rows
For Each GvRow As GridViewRow In GvPLMultiple.Rows
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal()
@@ -3865,4 +3855,8 @@ Partial Class ProductosyServicios
End Sub
Protected Sub BtnConsultaCodigo_Click(sender As Object, e As EventArgs)
Alert(TxtCodigo.Text)
End Sub
End Class