Cumpleaños del mes
This commit is contained in:
@@ -5977,7 +5977,7 @@ Public Class ClsVentas
|
||||
|
||||
#Region "AGENTES"
|
||||
|
||||
Public Function GetMedicos(CveMedico As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
|
||||
Public Function GetMedicos(CveMedico As Integer, CveEmpresa As Integer, Estatus As Integer, Optional Mes As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosGet")
|
||||
@@ -5986,13 +5986,16 @@ Public Class ClsVentas
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@Mes", SqlDbType.Int).Value = Mes
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los Medicos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkCumpleanios" OnClick="LnkCumpleanios_Click" data-toggle="tooltip" data-placement="left" title="Cumpleaños Del Mes" Text="<i class='fa fa-calendar'></i> Cumpleaños Del Mes"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
@@ -313,7 +316,7 @@
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Vendedor</asp:Literal></h4>
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Médico</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
@@ -477,6 +480,86 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DVModalCumple" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpDVModalCumple" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal1" runat="server">Cumpleaños del Mes</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlmesCumple" CssClass="form-control select2me">
|
||||
<asp:ListItem Value="1">Enero</asp:ListItem>
|
||||
<asp:ListItem Value="2">Febrero</asp:ListItem>
|
||||
<asp:ListItem Value="3">Marzo</asp:ListItem>
|
||||
<asp:ListItem Value="4">Abril</asp:ListItem>
|
||||
<asp:ListItem Value="5">Mayo</asp:ListItem>
|
||||
<asp:ListItem Value="6">Junio</asp:ListItem>
|
||||
<asp:ListItem Value="7">Julio</asp:ListItem>
|
||||
<asp:ListItem Value="8">Agosto</asp:ListItem>
|
||||
<asp:ListItem Value="9">Septiembre</asp:ListItem>
|
||||
<asp:ListItem Value="10">Octubre</asp:ListItem>
|
||||
<asp:ListItem Value="11">Noviembre</asp:ListItem>
|
||||
<asp:ListItem Value="12">Diciembre</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<label for="<%= DdlmesCumple.ClientID.ToString()%>">Mes:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align:right!important">
|
||||
<asp:Button Text="Consultar" runat="server" class="btn btn-success" ID="btnConsultarcumpleAnios" OnClick="btnConsultarcumpleAnios_Click" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvCumple" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveMedico, Medico, CedulaProfesional, FechaNacimiento, Notas, DiasAtencion, Horario, Lugar, Estatus, CveUsuario, FechaIng, CveEmpresa,Telefono, Mail, Especialidad, Celular, Consultorio"
|
||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Médico" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMedico" runat="server" Text='<%# Eval("Medico") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Nacimiento" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button id="BtnCerrarCumpleaños" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:none!important">
|
||||
<%--<asp:Button runat="server" ClientIDMode="Static" ID="BtnValidaExcelTab" OnClick="BtnValidaExcelTab_Click" />--%>
|
||||
</div>
|
||||
|
||||
@@ -271,5 +271,40 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CUMPLEAÑOS"
|
||||
|
||||
Private Sub CargaCyumpleAnios()
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1, DdlmesCumple.SelectedValue.ToEntero()) Then
|
||||
GvCumple.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
GvCumple.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvCumple.DataBind()
|
||||
|
||||
UpDVModalCumple.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkCumpleanios_Click(sender As Object, e As EventArgs)
|
||||
|
||||
DdlmesCumple.SelectedValueExist(NowADS.Month)
|
||||
CargaCyumpleAnios()
|
||||
RegistraScript("$('#DVModalCumple').modal();")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub btnConsultarcumpleAnios_Click(sender As Object, e As EventArgs)
|
||||
CargaCyumpleAnios()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user