Files
SIG/Ventas/CatFamiliaSubFamilia.aspx
JORGE LUIS CAUDILLO ESPARZA c35cf91883 Commit inicial Ventas Productivo
2019-08-14 16:40:54 -07:00

294 lines
24 KiB
Plaintext

<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFamiliaSubFamilia.aspx.vb" Inherits="Ventas_CatFamiliaSubFamilia" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Catálogo de Familias y SubFamilias
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<ajax:TabContainer ID="tabs" runat="server" ActiveTabIndex="0" Width="100%">
<ajax:TabPanel ID="TabFam" runat="server" HeaderText="Familia">
<ContentTemplate>
<asp:UpdatePanel ID="UpTitulosF" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="table table-striped table-advance table-hover">
<thead>
<tr class="Titulos">
<th style="width:250px">
<asp:LinkButton ID="LbCategoria" runat="server" CausesValidation="false" Text="" CommandArgument="Categoria" OnClick="LbOrden_Click">
Familia
<asp:Literal ID="ImgCategoria" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:100px">
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
Estatus
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:100px">
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
Fecha
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:100px">
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
Usuario
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:165px">Comandos</th>
</tr>
</thead>
<tr>
<td>
<asp:TextBox ID="TxtCategoria" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="234px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCategoria" runat="server" ControlToValidate="TxtCategoria" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Familia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCCategoria" runat="server" HighlightCssClass="vco" TargetControlID="RFVCategoria" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align: center"><asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatosF" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCategoria" EmptyDataText="No se encontraron Familias Registradas" ToolTip="Listado de Familias" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlCategoria" runat="server" Text='<%# Eval("Categoria", "{0}")%>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtCategoria" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Categoria") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCategoria" runat="server" ControlToValidate="TxtCategoria" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Familia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCCategoria" runat="server" HighlightCssClass="vco" TargetControlID="RFVCategoria" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
&nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabSub" runat="server" HeaderText="SubFamilia">
<ContentTemplate>
<asp:UpdatePanel ID="UpTitulosS" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="table table-striped table-advance table-hover" id="TbHeaderS" runat="server"> <%--style="width: 100%" --%>
<thead>
<tr class="Titulos">
<th style="width:250px">
<asp:LinkButton ID="LbClasificacionS" runat="server" CausesValidation="false" Text="" CommandArgument="Clasificacion" OnClick="LbOrdenS_Click">
SubFamilia
<asp:Literal ID="ImgClasificacionS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<%-- <th style="width:120px">
<asp:LinkButton ID="LbCuentaGastoS" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaGasto" OnClick="LbOrdenS_Click">
Cuenta Gasto
<asp:Literal ID="ImgCuentaGastoS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:120px">
<asp:LinkButton ID="LbCuentaAnticipoS" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaAnticipo" OnClick="LbOrdenS_Click">
Cuenta Anticipo
<asp:Literal ID="ImgCuentaAnticipoS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:135px">
<asp:LinkButton ID="LbCuentaInventarioS" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaInventario" OnClick="LbOrdenS_Click">
Cuenta Inventario
<asp:Literal ID="ImgCuentaInventarioS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>--%>
<th style="width:150px">
<asp:LinkButton ID="LbCategoriaS" runat="server" CausesValidation="false" Text="" CommandArgument="Categoria" OnClick="LbOrdenS_Click">
Familia
<asp:Literal ID="ImgCategoriaS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:100px">
<asp:LinkButton ID="LbEstatusS" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrdenS_Click">
Estado
<asp:Literal ID="ImgEstatusS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:100px">
<asp:LinkButton ID="LbFechaS" runat="server" CausesValidation="false" Text="" CommandArgument="Fecha" OnClick="LbOrdenS_Click">
Fecha
<asp:Literal ID="ImgFechaS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:100px">
<asp:LinkButton ID="LbUsuarioS" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrdenS_Click">
Usuario
<asp:Literal ID="ImgUsuarioS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width:200px">Comandos</th>
</tr>
</thead>
<tr>
<td style="text-align: center">
<asp:TextBox ID="TxtClasificacionS" runat="server" CausesValidation="true" MaxLength="200" ValidationGroup="GrpGuardarS" Width="184px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVClasificacionS" runat="server" ControlToValidate="TxtClasificacionS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubFamilia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCClasificacionS" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionS" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<%-- <td style="text-align: center">
<asp:DropDownList ID="DdlCuentaGastoS" DataTextField="CtaCodigo" DataValueField="Id" runat="server" Width="104px"></asp:DropDownList></td>
<td style="text-align: center">
<asp:DropDownList ID="DdlCuentaAnticipoS" DataTextField="CtaCodigo" DataValueField="Id" runat="server" Width="104px"></asp:DropDownList></td>
<td style="text-align: center">
<asp:DropDownList ID="DdlCuentaInventarioS" DataTextField="CtaCodigo" DataValueField="Id" runat="server" Width="104px"></asp:DropDownList></td>--%>
<td style="text-align: center">
<asp:DropDownList ID="DdlCategoriaS" DataTextField="Categoria" DataValueField="CveCategoria" runat="server" Width="114px"></asp:DropDownList></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align: center">
<asp:LinkButton ID="LbAgregarS" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarS"></asp:LinkButton></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatosS" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatosS" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacion" EmptyDataText="No se encontraron SubFamilias Registradas" ToolTip="Listado de SubFamilias" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:Label ID="LtlClasificacion" runat="server" Text='<%# Eval("Clasificacion", "{0}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtClasificacion" runat="server" CausesValidation="true" MaxLength="200" Text='<%# Eval("Clasificacion") %>' ValidationGroup="GrpGVS" Width="184px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVClasificacion" runat="server" ControlToValidate="TxtClasificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGVS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField>
<ItemTemplate>
<asp:Label ID="LtlCuentaGasto" runat="server" Text='<%# Eval("CuentaGasto")%>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="DdlCuentaGasto" DataTextField="CtaCodigo" DataValueField="Id" runat="server" Width="110px"></asp:DropDownList>
<ajax:ListSearchExtender ID="LSEDdlCuenta" runat="server" TargetControlID="DdlCuentaGasto" PromptCssClass="Titulos" PromptText="Escriba el Nombre " QueryPattern="Contains" PromptPosition="Top" IsSorted="false" QueryTimeout="0"></ajax:ListSearchExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlCuentaAnticipo" runat="server" Text='<%# Eval("CuentaAnticipo")%>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="DdlCuentaAnticipo" DataTextField="CtaCodigo" DataValueField="Id" runat="server" Width="110px"></asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlCuentaInventario" runat="server" Text='<%# Eval("CuentaInventario")%>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="DdlCuentaInventario" DataTextField="CtaCodigo" DataValueField="Id" runat="server" Width="110px"></asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlCategoria" runat="server" Text='<%# Eval("Categoria")%>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="DdlCategoria" DataTextField="Categoria" DataValueField="CveCategoria" runat="server" Width="110px"></asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEstado" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstado" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGVS" />
&nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>