Commit inicial Ventas Productivo
This commit is contained in:
261
Acumuladores/CatFoliosGarantia.aspx
Normal file
261
Acumuladores/CatFoliosGarantia.aspx
Normal file
@@ -0,0 +1,261 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFoliosGarantia.aspx.vb" Inherits="Acumuladores_CatFoliosGarantia" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Folios de Garantía
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarFolioGarantia" data-toggle="tooltip" data-placement="left" title="Agregar un Folio de Garantía" Text="<i class='fa fa-plus'></i> Agregar Folio "></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:5px">
|
||||
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolioGarantia" runat="server" Text='<%# Eval("FolioGarantia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" 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>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<%-- <ajax:TabContainer ID="TabBit" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabBitacora" runat="server" HeaderText="Bitácora">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBitacora" runat="server" AutoGenerateColumns="False" Width="80%"
|
||||
EmptyDataText="" data-sort="true" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tamaño" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTamaño" runat="server" Text='<%# Eval("Tamaño")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="60%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Lblusuario" runat="server" Text='<%# Eval("Usuario", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
<div id="DivAgregarFolioGarantia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalFolioGarantia" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalFolioGarantia" runat="server">Agregar Folio Garantia</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtCargo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cargo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCargo.ClientID.ToString()%>">Cargo:</label>
|
||||
<i></i>
|
||||
</div>|
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:DropDownList ID="DdlPS" runat="server" CssClass="form-control input-sm select2me" DataValueField="CvePS" DataTextField="PSCodigo" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtBonificacion" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtBonificacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Bonificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtBonificacion.ClientID.ToString()%>">Bonificación:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCompra" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCompra" runat="server" ControlToValidate="TxtCompra" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compra''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCompra.ClientID.ToString()%>">Compra:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtPuntos" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPuntos" runat="server" ControlToValidate="TxtPuntos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puntos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPuntos.ClientID.ToString()%>">Puntos:</label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarFolioGarantiaModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpFolioGarantia" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
217
Acumuladores/CatFoliosGarantia.aspx.vb
Normal file
217
Acumuladores/CatFoliosGarantia.aspx.vb
Normal file
@@ -0,0 +1,217 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Acumuladores_CatFoliosGarantia
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveFolioGarantia As Integer
|
||||
Get
|
||||
If Not ViewState("CveFolioGarantia") Is Nothing Then
|
||||
Return ViewState("CveFolioGarantia").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveFolioGarantia") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargadatosGvFolioGarantia()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "Folios Garantía"
|
||||
|
||||
Private Sub CargadatosGvFolioGarantia()
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
GvFolioGarantia.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvFolioGarantia.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
UPGvFolioGarantia.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
'CargaGvTamanioBitacora()
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaGvTamanioBitacora()
|
||||
|
||||
' Dim objAcum As New ClsAcumuladores
|
||||
|
||||
' If objAcum.TamañoBitacoraGet(UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' GvBitacora.DataSource = objAcum.DtResultados
|
||||
' Else
|
||||
' GvBitacora.DataSource = Nothing
|
||||
' End If
|
||||
|
||||
' objAcum.Dispose()
|
||||
|
||||
' UpGvBitacora.DataBind()
|
||||
' UpGral.Update()
|
||||
|
||||
|
||||
'End Sub
|
||||
Protected Sub BtnAgregarFolioGarantia_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantia.Click
|
||||
LtlTituloModalFolioGarantia.Text = "Agregar Folio Garantía"
|
||||
BtnAgregarFolioGarantiaModal.Text = "Agregar"
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarFolioGarantia"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarFolioGarantiaModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantiaModal.Click
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
'Dim Cargo, Bonificacion, Compra, Puntos As Decimal
|
||||
|
||||
'Cargo = If(TxtCargo.Text.ToDecimal > 0, TxtCargo.Text.ToDecimal, -1)
|
||||
'Bonificacion = If(TxtBonificacion.Text.ToDecimal > 0, TxtBonificacion.Text.ToDecimal, -1)
|
||||
'Compra = If(TxtCompra.Text.ToDecimal > 0, TxtCompra.Text.ToDecimal, -1)
|
||||
'Puntos = If(TxtPuntos.Text.ToDecimal > 0, TxtPuntos.Text.ToDecimal, -1)
|
||||
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
UpGral.Update()
|
||||
|
||||
Alert("Folio de Garantía Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario) Then
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
UpModalFolioGarantia.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
|
||||
UpGral.Update()
|
||||
Alert("Folio de Garantía Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Actualizar el Folio de Garantía", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
CveFolioGarantia = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjAcum.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Remove_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia")
|
||||
|
||||
If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Eliminar el Folio de Garantía", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
CveFolioGarantia = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalFolioGarantia.Text = "Editar Folio Garantía"
|
||||
Actualizar = True
|
||||
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||
|
||||
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
'DdlPS.Items.Clear()
|
||||
'DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
'DdlPS.DataBind()
|
||||
'DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
|
||||
|
||||
BtnAgregarFolioGarantiaModal.Text = "Actualizar"
|
||||
|
||||
UpModalFolioGarantia.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarFolioGarantia"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
251
Acumuladores/CatGarantiasMeses.aspx
Normal file
251
Acumuladores/CatGarantiasMeses.aspx
Normal file
@@ -0,0 +1,251 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatGarantiasMeses.aspx.vb" Inherits="Acumuladores_CatFoliosGarantia" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Garantías de Meses
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarFolioGarantia" data-toggle="tooltip" data-placement="left" title="Agregar una Garantía de Mes" Text="<i class='fa fa-plus'></i> Agregar Garantía Mes"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%--Tabla con los campos para filtrar--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate" style="text-align: right!important">Marca</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMarca" DataTextField="Marca" DataValueField="CveMarca" CssClass="form-control input-sm select2me" runat="server" Width="200px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Uso</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoUso" DataTextField="TipoUso" DataValueField="CveTipoUso" CssClass="form-control input-sm select2me" runat="server" Width="200px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:5px">
|
||||
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveGarantiaMes,Marca,CveMarca,TipoUso,CveTipoUso,Mes,Valor,Usuario,CveUsuario,FechaIng"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Marca">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMarca" runat="server" Text='<%# Eval("Marca") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Uso" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTiposUso" runat="server" Text='<%# Eval("TipoUso")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Mes" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Valor" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlValor" runat="server" Text='<%# Eval("Valor", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" 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>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div id="DivAgregarFolioGarantia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalFolioGarantia" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalFolioGarantia" runat="server">Agregar Garantía de Mes</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:DropDownList ID="DdlMarcaM" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveMarca" DataTextField="Marca" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlMarcaM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlMarcaM.ClientID.ToString()%>">Marca:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:DropDownList ID="DdlTipoUsoM" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveTipoUso" DataTextField="TipoUso" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" InitialValue="-1" runat="server" ControlToValidate="DdlTipoUsoM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlTipoUsoM.ClientID.ToString()%>">Tipo Uso:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtMes" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtMes" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mes''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtMes.ClientID.ToString()%>">Mes:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtValor" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtValor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtValor.ClientID.ToString()%>">Valor:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:CheckBox ID="ChkSeguir" runat="server" Checked="true" />
|
||||
<label for="<%= ChkSeguir.ClientID.ToString()%>">Seguir Registrando:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarFolioGarantiaModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTamanio" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
232
Acumuladores/CatGarantiasMeses.aspx.vb
Normal file
232
Acumuladores/CatGarantiasMeses.aspx.vb
Normal file
@@ -0,0 +1,232 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Acumuladores_CatFoliosGarantia
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveGarantiaMes As Integer
|
||||
Get
|
||||
If Not ViewState("CveGarantiaMes") Is Nothing Then
|
||||
Return ViewState("CveGarantiaMes").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveGarantiaMes") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
CargadatosGvFolioGarantia()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Folios Garantía"
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargadatosGvFolioGarantia()
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.GarantiasMesesGet(-1, UsuarioActual.Empresa.CveEmpresa, DdlMarca.SelectedValue.ToEntero, DdlTipoUso.SelectedValue.ToEntero) Then
|
||||
GvFolioGarantia.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvFolioGarantia.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
UPGvFolioGarantia.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
'CargaGvTamanioBitacora()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarca.DataSource = ObjPS.DtResultados
|
||||
DdlMarca.DataBind()
|
||||
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlMarca.SelectedValue = "-1"
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
DdlTipoUso.DataSource = GlobalDTAcumTiposUso()
|
||||
DdlTipoUso.DataBind()
|
||||
DdlTipoUso.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlTipoUso.SelectedValue = "-1"
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarFolioGarantia_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantia.Click
|
||||
LtlTituloModalFolioGarantia.Text = "Agregar Garantía de Mes"
|
||||
BtnAgregarFolioGarantiaModal.Text = "Agregar"
|
||||
CargaCombosModal()
|
||||
|
||||
If DdlMarca.SelectedValue <> -1 Then DdlMarcaM.SelectedValueExist(DdlMarca.SelectedValue.ToEntero)
|
||||
If DdlTipoUso.SelectedValue <> -1 Then DdlTipoUsoM.SelectedValueExist(DdlTipoUso.SelectedValue.ToEntero)
|
||||
|
||||
TxtMes.Text = ""
|
||||
TxtValor.Text = ""
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarFolioGarantia"))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombosModal()
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaM.DataSource = ObjPS.DtResultados
|
||||
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
DdlMarcaM.DataBind()
|
||||
|
||||
DdlTipoUsoM.DataSource = GlobalDTAcumTiposUso()
|
||||
DdlTipoUsoM.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarFolioGarantiaModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantiaModal.Click
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.GarantiasMesesAdd(DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtMes.Text = ""
|
||||
TxtValor.Text = ""
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
If Not ChkSeguir.Checked Then
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
Alert("Garantía de Mes Agregada Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
End If
|
||||
UpGral.Update()
|
||||
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar la Garantía de Mes", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If ObjAcum.GarantiasMesesUpdate(CveGarantiaMes, DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, UsuarioActual.CveUsuario) Then
|
||||
|
||||
TxtMes.Text = ""
|
||||
TxtValor.Text = ""
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
UpModalFolioGarantia.Update()
|
||||
|
||||
If Not ChkSeguir.Checked Then
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
Alert("Garantía de Mes Actualizada Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
End If
|
||||
|
||||
UpGral.Update()
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al Actualizar la Garantía de Mes", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
CveGarantiaMes = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjAcum.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Remove_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveGarantiaMes")
|
||||
|
||||
If objAcum.GarantiasMesesRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Eliminar la Garantía de Mes", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
CargadatosGvFolioGarantia()
|
||||
|
||||
CveGarantiaMes = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalFolioGarantia.Text = "Editar Garantía de Mes"
|
||||
Actualizar = True
|
||||
|
||||
CveGarantiaMes = GvRow.DataKey("CveGarantiaMes")
|
||||
|
||||
TxtMes.Text = GvRow.DataKey("Mes")
|
||||
TxtValor.Text = GvRow.DataKey("Valor")
|
||||
CargaCombosModal()
|
||||
DdlMarcaM.SelectedValueExist(GvRow.DataKey("CveMarca").ToEntero)
|
||||
DdlTipoUsoM.SelectedValueExist(GvRow.DataKey("CveTipoUso").ToEntero)
|
||||
|
||||
BtnAgregarFolioGarantiaModal.Text = "Actualizar"
|
||||
|
||||
UpModalFolioGarantia.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarFolioGarantia"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
261
Acumuladores/CatTiposDefecto.aspx
Normal file
261
Acumuladores/CatTiposDefecto.aspx
Normal file
@@ -0,0 +1,261 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatTiposDefecto.aspx.vb" Inherits="Acumuladores_CatTiposDefecto" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Tipos de Defecto
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarTiposD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i> Agregar Defecto"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%--<asp:DropDownList ID="ddl" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveTipoDefecto" DataTextField="TipoDefecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px"></asp:DropDownList>--%>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposD.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:5px">
|
||||
<asp:UpdatePanel ID="UPGvTiposD" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvTiposD" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveTipoDefecto,TipoDefecto,Estatus,CveUsuario,Usuario,FechaIng"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo Defecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTiposD" runat="server" Text='<%# Eval("TipoDefecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickTiposD" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickTiposD" runat="server" AlternateText="Eliminar" CausesValidation="False" 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>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<%-- <ajax:TabContainer ID="TabBit" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabBitacora" runat="server" HeaderText="Bitácora">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBitacora" runat="server" AutoGenerateColumns="False" Width="80%"
|
||||
EmptyDataText="" data-sort="true" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tamaño" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTamaño" runat="server" Text='<%# Eval("Tamaño")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="60%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Lblusuario" runat="server" Text='<%# Eval("Usuario", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
<div id="DivAgregarTiposD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Agregar Tipo Defecto</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTiposD" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtTiposD" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTiposD.ClientID.ToString()%>">Tipo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtCargo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cargo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCargo.ClientID.ToString()%>">Cargo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:DropDownList ID="DdlPS" runat="server" CssClass="form-control input-sm select2me" DataValueField="CvePS" DataTextField="PSCodigo" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtBonificacion" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtBonificacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Bonificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtBonificacion.ClientID.ToString()%>">Bonificación:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCompra" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCompra" runat="server" ControlToValidate="TxtCompra" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compra''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCompra.ClientID.ToString()%>">Compra:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtPuntos" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPuntos" runat="server" ControlToValidate="TxtPuntos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puntos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPuntos.ClientID.ToString()%>">Puntos:</label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarTiposDModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
228
Acumuladores/CatTiposDefecto.aspx.vb
Normal file
228
Acumuladores/CatTiposDefecto.aspx.vb
Normal file
@@ -0,0 +1,228 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Acumuladores_CatTiposDefecto
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveTipoDefecto As Integer
|
||||
Get
|
||||
If Not ViewState("CveTipoDefecto") Is Nothing Then
|
||||
Return ViewState("CveTipoDefecto").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoDefecto") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargadatosGvTiposD()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "Tipos Defecto"
|
||||
|
||||
Private Sub CargadatosGvTiposD()
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.TiposDefectoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
GvTiposD.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvTiposD.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
UPGvTiposD.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
'CargaGvTamanioBitacora()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraGlobalDT()
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
If ObjAcum.TiposDefectoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then Application("GlobalDTAcumTiposDefecto") = ObjAcum.DtResultados
|
||||
|
||||
ObjAcum.Dispose()
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaGvTamanioBitacora()
|
||||
|
||||
' Dim objAcum As New ClsAcumuladores
|
||||
|
||||
' If objAcum.TamañoBitacoraGet(UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' GvBitacora.DataSource = objAcum.DtResultados
|
||||
' Else
|
||||
' GvBitacora.DataSource = Nothing
|
||||
' End If
|
||||
|
||||
' objAcum.Dispose()
|
||||
|
||||
' UpGvBitacora.DataBind()
|
||||
' UpGral.Update()
|
||||
|
||||
|
||||
'End Sub
|
||||
Protected Sub BtnAgregarTiposD_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposD.Click
|
||||
LtlTituloModalTiposD.Text = "Agregar Tipo Defecto"
|
||||
BtnAgregarTiposDModal.Text = "Agregar"
|
||||
|
||||
TxtTiposD.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarTiposDModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposDModal.Click
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
'Dim Cargo, Bonificacion, Compra, Puntos As Decimal
|
||||
|
||||
'Cargo = If(TxtCargo.Text.ToDecimal > 0, TxtCargo.Text.ToDecimal, -1)
|
||||
'Bonificacion = If(TxtBonificacion.Text.ToDecimal > 0, TxtBonificacion.Text.ToDecimal, -1)
|
||||
'Compra = If(TxtCompra.Text.ToDecimal > 0, TxtCompra.Text.ToDecimal, -1)
|
||||
'Puntos = If(TxtPuntos.Text.ToDecimal > 0, TxtPuntos.Text.ToDecimal, -1)
|
||||
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.TiposDefectoAdd(TxtTiposD.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtTiposD.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvTiposD()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"), "jsHideModalTiposD")
|
||||
GeneraGlobalDT()
|
||||
UpGral.Update()
|
||||
|
||||
Alert("Tipo de Defecto Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al guardar el Tipo de Defecto", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If ObjAcum.TiposDefectoUpdate(CveTipoDefecto, TxtTiposD.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario) Then
|
||||
|
||||
TxtTiposD.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvTiposD()
|
||||
GeneraGlobalDT()
|
||||
UpModalTiposD.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"), "jsHideModalTiposD")
|
||||
|
||||
UpGral.Update()
|
||||
Alert("Tipo de Defecto Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al Actualizar el Tipo de Defecto", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
CveTipoDefecto = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjAcum.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Remove_ClickTiposD(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoDefecto")
|
||||
|
||||
If objAcum.TiposDefectoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvTiposD()
|
||||
GeneraGlobalDT()
|
||||
|
||||
Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al Eliminar el Tipo de Defecto", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
CargadatosGvTiposD()
|
||||
|
||||
CveTipoDefecto = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickTiposD(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalTiposD.Text = "Editar Tipo Defecto"
|
||||
Actualizar = True
|
||||
|
||||
CveTipoDefecto = GvRow.DataKey("CveTipoDefecto")
|
||||
|
||||
TxtTiposD.Text = GvRow.DataKey("TipoDefecto")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
'DdlPS.Items.Clear()
|
||||
'DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
'DdlPS.DataBind()
|
||||
'DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
|
||||
|
||||
BtnAgregarTiposDModal.Text = "Actualizar"
|
||||
|
||||
UpModalTiposD.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
262
Acumuladores/CatTiposUso.aspx
Normal file
262
Acumuladores/CatTiposUso.aspx
Normal file
@@ -0,0 +1,262 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatTiposUso.aspx.vb" Inherits="Acumuladores_CatTiposUso" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Tipos de Uso
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarTiposUso" data-toggle="tooltip" data-placement="left" title="Agregar Tipo de Uso" Text="<i class='fa fa-plus'></i> Agregar Uso"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<%--<asp:DropDownList ID="ddl" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveTipoUso" DataTextField="TipoUso" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px"></asp:DropDownList>--%>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposUso.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposUso.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:5px">
|
||||
<asp:UpdatePanel ID="UPGvTiposUso" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvTiposUso" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveTipoUso,TipoUso,Estatus,CveUsuario,Usuario,FechaIng"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo Uso">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTiposUso" runat="server" Text='<%# Eval("TipoUso") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickTiposUso" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickTiposUso" runat="server" AlternateText="Eliminar" CausesValidation="False" 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>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<%-- <ajax:TabContainer ID="TabBit" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabBitacora" runat="server" HeaderText="Bitácora">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBitacora" runat="server" AutoGenerateColumns="False" Width="80%"
|
||||
EmptyDataText="" data-sort="true" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tamaño" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTamaño" runat="server" Text='<%# Eval("Tamaño")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="60%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Lblusuario" runat="server" Text='<%# Eval("Usuario", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
<div id="DivAgregarTiposUso" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposUso" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposUso" runat="server">Agregar TiposUso</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTiposUso" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTiposUso" runat="server" ControlToValidate="TxtTiposUso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposUso"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTiposUso.ClientID.ToString()%>">Tipo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtCargo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cargo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCargo.ClientID.ToString()%>">Cargo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:DropDownList ID="DdlPS" runat="server" CssClass="form-control input-sm select2me" DataValueField="CvePS" DataTextField="PSCodigo" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtBonificacion" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtBonificacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Bonificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtBonificacion.ClientID.ToString()%>">Bonificación:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCompra" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCompra" runat="server" ControlToValidate="TxtCompra" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compra''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCompra.ClientID.ToString()%>">Compra:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtPuntos" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPuntos" runat="server" ControlToValidate="TxtPuntos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puntos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPuntos.ClientID.ToString()%>">Puntos:</label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarTiposUsoModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposUso" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
229
Acumuladores/CatTiposUso.aspx.vb
Normal file
229
Acumuladores/CatTiposUso.aspx.vb
Normal file
@@ -0,0 +1,229 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Acumuladores_CatTiposUso
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveTipoUso As Integer
|
||||
Get
|
||||
If Not ViewState("CveTipoUso") Is Nothing Then
|
||||
Return ViewState("CveTipoUso").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoUso") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargadatosGvTiposUso()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "Tipos Uso"
|
||||
|
||||
Private Sub CargadatosGvTiposUso()
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.TiposUsoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
GvTiposUso.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvTiposUso.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
UPGvTiposUso.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
'CargaGvTamanioBitacora()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraGlobalDT()
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
If ObjAcum.TiposUsoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then Application("GlobalDTAcumTiposUso") = ObjAcum.DtResultados
|
||||
|
||||
ObjAcum.Dispose()
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaGvTamanioBitacora()
|
||||
|
||||
' Dim objAcum As New ClsAcumuladores
|
||||
|
||||
' If objAcum.TamañoBitacoraGet(UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' GvBitacora.DataSource = objAcum.DtResultados
|
||||
' Else
|
||||
' GvBitacora.DataSource = Nothing
|
||||
' End If
|
||||
|
||||
' objAcum.Dispose()
|
||||
|
||||
' UpGvBitacora.DataBind()
|
||||
' UpGral.Update()
|
||||
|
||||
|
||||
'End Sub
|
||||
Protected Sub BtnAgregarTiposUso_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposUso.Click
|
||||
LtlTituloModalTiposUso.Text = "Agregar Tipo Uso"
|
||||
BtnAgregarTiposUsoModal.Text = "Agregar"
|
||||
|
||||
TxtTiposUso.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposUso"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarTiposUsoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposUsoModal.Click
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
'Dim Cargo, Bonificacion, Compra, Puntos As Decimal
|
||||
|
||||
'Cargo = If(TxtCargo.Text.ToDecimal > 0, TxtCargo.Text.ToDecimal, -1)
|
||||
'Bonificacion = If(TxtBonificacion.Text.ToDecimal > 0, TxtBonificacion.Text.ToDecimal, -1)
|
||||
'Compra = If(TxtCompra.Text.ToDecimal > 0, TxtCompra.Text.ToDecimal, -1)
|
||||
'Puntos = If(TxtPuntos.Text.ToDecimal > 0, TxtPuntos.Text.ToDecimal, -1)
|
||||
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.TiposUsoAdd(TxtTiposUso.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtTiposUso.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvTiposUso()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposUso"), "jsHideModalTiposUso")
|
||||
UpGral.Update()
|
||||
GeneraGlobalDT()
|
||||
|
||||
Alert("Tipo de Uso Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar el Tipo de Uso", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If ObjAcum.TiposUsoUpdate(CveTipoUso, TxtTiposUso.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario) Then
|
||||
|
||||
TxtTiposUso.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvTiposUso()
|
||||
UpModalTiposUso.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposUso"), "jsHideModalTiposUso")
|
||||
|
||||
UpGral.Update()
|
||||
GeneraGlobalDT()
|
||||
|
||||
Alert("Tipo de Uso Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Actualizar el Tipo de Uso", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
CveTipoUso = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjAcum.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Remove_ClickTiposUso(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoUso")
|
||||
|
||||
If objAcum.TiposUsoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvTiposUso()
|
||||
GeneraGlobalDT()
|
||||
|
||||
Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Eliminar el Tipo de Uso", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
CargadatosGvTiposUso()
|
||||
|
||||
CveTipoUso = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickTiposUso(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalTiposUso.Text = "Editar Tipo Uso"
|
||||
Actualizar = True
|
||||
|
||||
CveTipoUso = GvRow.DataKey("CveTipoUso")
|
||||
|
||||
TxtTiposUso.Text = GvRow.DataKey("TipoUso")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
'DdlPS.Items.Clear()
|
||||
'DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
'DdlPS.DataBind()
|
||||
'DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
|
||||
|
||||
BtnAgregarTiposUsoModal.Text = "Actualizar"
|
||||
|
||||
UpModalTiposUso.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposUso"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
88
Acumuladores/RepUsados.aspx
Normal file
88
Acumuladores/RepUsados.aspx
Normal file
@@ -0,0 +1,88 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepUsados.aspx.cs" Inherits="Ventas_RepUsados" %>
|
||||
|
||||
<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">
|
||||
Reporte de Usados
|
||||
</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="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Cliente:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Inicial:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Final:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAcum" Width="100%" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False" OnRowDataBound="GvAcum_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="NombreComercial" DataNavigateUrlFields ="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="SaldoInicial" HeaderText="Saldo Inicial" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Salida" HeaderText="Salida" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Entrada" HeaderText="Entrada" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="SaldoActual" HeaderText="SaldoActual" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="SaldoXFacturar" HeaderText="SaldoXFacturar" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
65
Acumuladores/RepUsados.aspx.cs
Normal file
65
Acumuladores/RepUsados.aspx.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Ventas_RepUsados : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
CargaCliente();
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString();
|
||||
UpFiltros.Update();
|
||||
}
|
||||
|
||||
private void CargaCliente()
|
||||
{
|
||||
if (UsuarioActual.CveEmpresa == 119) {
|
||||
DdlClientes.setEsWebService(true);
|
||||
}else
|
||||
{
|
||||
DdlClientes.setEsWebService(false);
|
||||
DdlClientes.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
|
||||
DdlClientes.DataBind();
|
||||
DdlClientes.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Consulta();
|
||||
}
|
||||
|
||||
private void Consulta()
|
||||
{
|
||||
ClsAcumuladores ObjAcum = new ClsAcumuladores();
|
||||
|
||||
if (ObjAcum.RepUsadosGet(DdlClientes.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvAcum.DataSource = ObjAcum.DtResultados;
|
||||
}
|
||||
ObjAcum.Dispose();
|
||||
GvAcum.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void GvAcum_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.RowIndex == 0)
|
||||
335
Acumuladores/Tamaños.aspx
Normal file
335
Acumuladores/Tamaños.aspx
Normal file
@@ -0,0 +1,335 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Tamaños.aspx.vb" Inherits="Acumuladores_Tamaños" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Tamaños
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarTamanio" data-toggle="tooltip" data-placement="left" title="Agregar un Tamaño" Text="<i class='fa fa-plus'></i> Agregar Tamaño"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTamanios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTamanios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin: 10px">
|
||||
<asp:UpdatePanel ID="UPGvTamanios" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvTamanios" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveTamaño,Tamaño,Cargo,Bonificacion,Compra,Puntos,CveUsuario,Usuario,Fecha,CvePSCargo"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tamaño">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTamanio" runat="server" Text='<%# Eval("Tamaño") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cargo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblCargo" runat="server" Text='<%# Eval("Cargo", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Bonificación" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblBonificacion" runat="server" Text='<%# Eval("Bonificacion", "{0:F2}") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Compra" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblCompra" runat="server" Text='<%# Eval("Compra", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Puntos" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Puntos", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPS" runat="server" Text='<%# Eval("CodigoPS")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="250px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickTamanio" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickTamanio" runat="server" AlternateText="Eliminar" CausesValidation="False" 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>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpGvBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Bitácora</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<br />
|
||||
<asp:GridView ID="GvBitacora" runat="server" AutoGenerateColumns="False" Width="80%"
|
||||
EmptyDataText="" data-sort="true" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tamaño" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTamaño" runat="server" Text='<%# Eval("Tamaño")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="60%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Lblusuario" runat="server" Text='<%# Eval("Usuario", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<%-- <ajax:TabContainer ID="TabBit" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabBitacora" runat="server" HeaderText="Bitácora">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBitacora" runat="server" AutoGenerateColumns="False" Width="80%"
|
||||
EmptyDataText="" data-sort="true" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tamaño" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTamaño" runat="server" Text='<%# Eval("Tamaño")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="60%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Lblusuario" runat="server" Text='<%# Eval("Usuario", "{0:F2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
<div id="DivAgregarTamanio" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTamanio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTamanio" runat="server">Agregar Tamaño</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTamanio" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTamanio" runat="server" ControlToValidate="TxtTamanio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tamaño''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTamanio.ClientID.ToString()%>">Tamaño:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtCargo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cargo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCargo.ClientID.ToString()%>">Cargo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:DropDownList ID="DdlPS" runat="server" CssClass="form-control input-sm select2me" DataValueField="CvePS" DataTextField="PSCodigo" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtTamanio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tamaño''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtBonificacion" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtBonificacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Bonificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtBonificacion.ClientID.ToString()%>">Bonificación:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCompra" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCompra" runat="server" ControlToValidate="TxtCompra" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compra''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCompra.ClientID.ToString()%>">Compra:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtPuntos" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPuntos" runat="server" ControlToValidate="TxtPuntos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puntos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPuntos.ClientID.ToString()%>">Puntos:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarTamanioModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTamanio" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
223
Acumuladores/Tamaños.aspx.vb
Normal file
223
Acumuladores/Tamaños.aspx.vb
Normal file
@@ -0,0 +1,223 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Acumuladores_Tamaños
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveTamaño As Integer
|
||||
Get
|
||||
If Not ViewState("CveTamaño") Is Nothing Then
|
||||
Return ViewState("CveTamaño").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTamaño") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub RH_Tamanios_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargadatosGvTamanio()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "Tamaño"
|
||||
|
||||
Private Sub CargadatosGvTamanio()
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.TamañoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
GvTamanios.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvTamanios.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
UPGvTamanios.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
CargaGvTamanioBitacora()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGvTamanioBitacora()
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.TamañoBitacoraGet(UsuarioActual.Empresa.CveEmpresa) Then
|
||||
GvBitacora.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvBitacora.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
UpGvBitacora.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnAgregarTamanio_Click(sender As Object, e As EventArgs) Handles BtnAgregarTamanio.Click
|
||||
LtlTituloModalTamanio.Text = "Agregar Tamaño"
|
||||
BtnAgregarTamanioModal.Text = "Agregar"
|
||||
|
||||
|
||||
TxtTamanio.Text = ""
|
||||
TxtCargo.Text = ""
|
||||
TxtBonificacion.Text = ""
|
||||
TxtCompra.Text = ""
|
||||
TxtPuntos.Text = ""
|
||||
|
||||
DdlPS.Items.Clear()
|
||||
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DdlPS.DataBind()
|
||||
DdlPS.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTamanio"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarTamanioModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTamanioModal.Click
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
Dim Cargo, Bonificacion, Compra, Puntos As Decimal
|
||||
|
||||
Cargo = If(TxtCargo.Text.ToDecimal > 0, TxtCargo.Text.ToDecimal, -1)
|
||||
Bonificacion = If(TxtBonificacion.Text.ToDecimal > 0, TxtBonificacion.Text.ToDecimal, -1)
|
||||
Compra = If(TxtCompra.Text.ToDecimal > 0, TxtCompra.Text.ToDecimal, -1)
|
||||
Puntos = If(TxtPuntos.Text.ToDecimal > 0, TxtPuntos.Text.ToDecimal, -1)
|
||||
|
||||
|
||||
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.TamañoAdd(TxtTamanio.Text, Cargo, Bonificacion, Compra, Puntos, DdlPS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtTamanio.Text = ""
|
||||
TxtCargo.Text = ""
|
||||
TxtBonificacion.Text = ""
|
||||
TxtCompra.Text = ""
|
||||
TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvTamanio()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTamanio"), "jsHideModalTamanio")
|
||||
UpGral.Update()
|
||||
|
||||
Alert("Tamaño Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al guardar el Tamaño", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If ObjAcum.TamañoUpdate(CveTamaño, TxtTamanio.Text, Cargo, Bonificacion, Compra, Puntos, DdlPS.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
TxtTamanio.Text = ""
|
||||
TxtCargo.Text = ""
|
||||
TxtBonificacion.Text = ""
|
||||
TxtCompra.Text = ""
|
||||
TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvTamanio()
|
||||
UpModalTamanio.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTamanio"), "jsHideModalTamanio")
|
||||
|
||||
UpGral.Update()
|
||||
Alert("Tamaño Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al Actualizar el Tamaño", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
CveTamaño = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjAcum.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Remove_ClickTamanio(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTamaño")
|
||||
|
||||
If objAcum.TamañoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvTamanio()
|
||||
|
||||
Alert("Capacitador Elimino Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al Eliminar el Tamaño", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
CargadatosGvTamanio()
|
||||
|
||||
CveTamaño = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickTamanio(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalTamanio.Text = "Editar Tamaño"
|
||||
Actualizar = True
|
||||
|
||||
CveTamaño = GvRow.DataKey("CveTamaño")
|
||||
|
||||
TxtTamanio.Text = GvRow.DataKey("Tamaño")
|
||||
TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
|
||||
TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00")
|
||||
TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
|
||||
TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
DdlPS.Items.Clear()
|
||||
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DdlPS.DataBind()
|
||||
DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
|
||||
|
||||
BtnAgregarTamanioModal.Text = "Actualizar"
|
||||
|
||||
UpModalTamanio.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTamanio"))
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user