This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-07-29 06:43:12 -07:00
parent fcc738ef05
commit e615e6395a
14 changed files with 443 additions and 97 deletions

View File

@@ -1973,7 +1973,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateSalarios") SqlDataAdapter("PA_RH_PersonalUpdateSalarios")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -1984,6 +1984,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
.Add("@SDI", SqlDbType.Money).Value = SDI .Add("@SDI", SqlDbType.Money).Value = SDI
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS .Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -61,7 +61,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim correo As String = "" Dim correo As String = ""
Dim sitio As String = "" Dim sitio As String = ""
Dim cuerpo As String = "" Dim cuerpo As String = ""
Dim obj = context.Request("Nombre") Dim obj = context.Request("Nombre") 'Nombre=' + $('#Nombre').val() +'Correo=' + $('#Correo').val() +'Sitio=' + $('#Sitio').val() +'Cuerpo=' + $('#Cuerpo').val() +
If Not IsNothing(obj) Then If Not IsNothing(obj) Then
nombre = obj.ToString() nombre = obj.ToString()
End If End If
@@ -75,11 +75,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
obj = context.Request("Cuerpo") obj = context.Request("Cuerpo")
If Not IsNothing(obj) Then If Not IsNothing(obj) Then
cuerpo = obj.ToString() cuerpo = obj.ToString().Replace("< ", "<")
End If End If
Dim Body As String = String.Format("Nombre : {0}<br/>Nombre : {0}<br/>Correo : {1}<br/>Sitio : {2}<br/><br/>{3}", nombre, correo, sitio, cuerpo) Dim Body As String = String.Format("Prospecto : {0}<br/>Correo : {1}<br/>Sitio : {2}<br/><br/>{3}", nombre, correo, sitio, cuerpo)
Dim para As String = "rene.molina@adssistemas.mx,sig.buzon@gmail.com,julian@adssistemas.mx;paola@adssistemas.mx;" Dim para As String = "rene.molina@adssistemas.mx,sig.buzon@gmail.com,julian@adssistemas.mx;paola@adssistemas.mx;caudillo.90d@gmail.com;"
para = "caudillo.90d@gmail.com" 'para = ""
Dim Mail As New ClsSisMail() Dim Mail As New ClsSisMail()
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, para, "NotificaciónProspecto", Body) Then If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, para, "NotificaciónProspecto", Body) Then
retorno = "true" retorno = "true"

View File

@@ -5,8 +5,7 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
.Filtros { .Filtros {
padding: 10px; padding: 10px;background-color: #95A5A6;
background-color: #C3C3C3;
} }
.Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label { .Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label {
@@ -48,7 +47,7 @@
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatosRepA" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="upDatosRepA" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="Filtros portlet solid grey-cascade portlet-filter"> <%--<div class="Filtros portlet solid grey-cascade portlet-filter">
<div class="row"> <div class="row">
<div class="col-md-2" style="width: 85%"> <div class="col-md-2" style="width: 85%">
<div class="row"> <div class="row">
@@ -140,8 +139,95 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>--%>
<div class="Filtros">
<div class="row">
<div class="col-sm-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
</div>
</div>
<div class="col-md-2">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
</div>
</div>
<div class="col-sm-1 text-right">
<br />
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall">
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
</div>
</div>
<div class="col-md-3" style="display:none;">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall">
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
</div>
</div>
<div class="col-md-2">
<div class="">
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
<div class="col-md-2">
<div class="">
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
</div>
</div>
<asp:GridView ID="GVRepAcercamientosEtapas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRep" AutoGenerateColumns="False" <asp:GridView ID="GVRepAcercamientosEtapas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRep" AutoGenerateColumns="False"
DataKeyNames="CveGrupo1,Grupo1,CveGrupo2,Grupo2" ShowHeaderWhenEmpty="true"> DataKeyNames="CveGrupo1,Grupo1,CveGrupo2,Grupo2" ShowHeaderWhenEmpty="true">
<Columns> <Columns>

View File

@@ -144,6 +144,15 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
BoundField test = new BoundField(); BoundField test = new BoundField();
test.DataField = "Grupo1"; test.DataField = "Grupo1";
test.HeaderText = ""; test.HeaderText = "";
HyperLinkField hypt = new HyperLinkField();
hypt.DataTextField = $"Total";
hypt.HeaderText = $"Total";
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2", "Grupo1" };
string strfilstros =string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
switch (idgrupo1) switch (idgrupo1)
{ {
case 1: case 1:
@@ -161,15 +170,11 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
case 4: case 4:
test.HeaderText = "Fecha"; test.HeaderText = "Fecha";
Agrupador = "Fecha"; Agrupador = "Fecha";
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={{2}}&FechaFin={{2}}{strfilstros}";
break; break;
} }
GVRepAcercamientosEtapas.Columns.Add(test); GVRepAcercamientosEtapas.Columns.Add(test);
HyperLinkField hypt = new HyperLinkField();
hypt.DataTextField = $"Total";
hypt.HeaderText = $"Total";
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" };
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}";
GVRepAcercamientosEtapas.Columns.Add(hypt); GVRepAcercamientosEtapas.Columns.Add(hypt);
foreach (DataRow row in dte.Rows) foreach (DataRow row in dte.Rows)
{ {

View File

@@ -1,12 +1,12 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepAcercamientosProcesosDetalle.aspx.cs" Inherits="CRM_RepAcercamientosProcesosDetalle" %> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepAcercamientosProcesosDetalle.aspx.cs" Inherits="CRM_RepAcercamientosProcesosDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
.Filtros { .Filtros {
padding: 10px; padding: 10px;
background-color: #C3C3C3; background-color: #95A5A6;
} }
.Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label { .Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label {
@@ -27,29 +27,46 @@
width: 100%; width: 100%;
height: 500px; height: 500px;
} }
.GVRepAcercamientosDetalle a {
-webkit-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease;
color: #3699FF !important;
text-decoration: none;
font-weight: 700;
width: 100%;
}
.GVRepAcercamientosDetalle a:hover {
-webkit-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte Detalle de los Acercamientos Procesos Reporte Detalle de los Acercamientos Procesos
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li></li>
</li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatosRepA" runat ="server" UpdateMode="Conditional" > <asp:UpdatePanel ID="upDatosRepA" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="Filtros portlet solid grey-cascade portlet-filter"> <%-- <div class="Filtros portlet solid grey-cascade portlet-filter">
<div class="row"> <div class="row">
<div class="col-md-2" style="width: 85%"> <div class="col-md-2" style="width: 85%">
<div class="row"> <div class="row">
@@ -141,23 +158,112 @@
</div> </div>
</div> </div>
</div> </div>
</div>--%>
<div class="Filtros">
<div class="row">
<div class="col-sm-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
</div>
</div>
<div class="col-md-2">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
</div>
</div>
<div class="col-sm-1 text-right">
<br />
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
</div>
</div>
<div class="row">
<div class="col-md-3" style="display: none;">
<div class="form-group form-md-line-input input-iconright ">
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall">
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
</div>
</div>
<div class="col-md-3" style="display: none;">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall">
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
</div>
</div>
<div class="col-md-2">
<div class="">
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
<div class="col-md-2">
<div class="">
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
</div>
</div> </div>
<asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento">
<asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRepAcercamientosDetalle" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento">
<Columns> <Columns>
<asp:TemplateField HeaderText="Prospecto"> <asp:TemplateField HeaderText="Prospecto">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink href='<%# Eval("Empresa","/{0}")%>' runat="server" Text='<%# Eval("Empresa")%>'>HyperLink</asp:HyperLink> <asp:HyperLink href='<%# Eval("CveAcercamiento","/CRM/Acercamiento.aspx?CveAcercamiento={0}")%>' runat="server" Text='<%# Eval("Empresa")%>'></asp:HyperLink>
<%--<asp:Label ID="lblempresa" runat="server" Text='<%# Eval("Empresa")%>'> </asp:Label>--%> <%--<asp:Label ID="lblempresa" runat="server" Text='<%# Eval("Empresa")%>'> </asp:Label>--%>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Vendedor"> <asp:TemplateField HeaderText="Vendedor">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblvendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label> <asp:HyperLink href='<%# Eval("CveAcercamiento","/CRM/Acercamiento.aspx?CveAcercamiento={0}")%>' runat="server" Text='<%# Eval("Vendedor")%>'></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Nombre Acercamiento"> <asp:TemplateField HeaderText="Nombre Acercamiento">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblnombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:Label> <asp:HyperLink href='<%# Eval("CveAcercamiento","/CRM/Acercamiento.aspx?CveAcercamiento={0}")%>' runat="server" Text='<%# Eval("NombreAcercamiento")%>'></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Medio Captacion"> <asp:TemplateField HeaderText="Medio Captacion">
@@ -195,6 +301,6 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -80,7 +80,6 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
CargaDdl();
RCveTipoProceso = Request["CveTipoProceso"] == null ? -1 : Request["CveTipoProceso"].ToString().ToEntero(); RCveTipoProceso = Request["CveTipoProceso"] == null ? -1 : Request["CveTipoProceso"].ToString().ToEntero();
RcveVendedor = Request["cveVendedor"] == null ? -1 : Request["cveVendedor"].ToString().ToEntero(); RcveVendedor = Request["cveVendedor"] == null ? -1 : Request["cveVendedor"].ToString().ToEntero();
RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero(); RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero();
@@ -109,6 +108,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
break; break;
} }
DdlTipoProceso.SelectedValueExist(RCveTipoProceso); DdlTipoProceso.SelectedValueExist(RCveTipoProceso);
CargaDdl();
//DdlGrupo1.SelectedValueExist(idgrupo1); //DdlGrupo1.SelectedValueExist(idgrupo1);
@@ -202,22 +202,22 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
protected void LnkConsultar_Click(object sender, EventArgs e) protected void LnkConsultar_Click(object sender, EventArgs e)
{ {
RCveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero(); //RCveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
switch (RCveTipoProceso) //switch (RCveTipoProceso)
{ //{
case 1: // case 1:
RcveVendedor = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero(); // RcveVendedor = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break; // break;
case 2: // case 2:
RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero(); // RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break; // break;
case 3: // case 3:
RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero(); // RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break; // break;
case 4: // case 4:
RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString(); // RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
break; // break;
} //}
RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : ""; RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : ""; RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RcveVendedor = DdlVendedor.SelectedValue.ToEntero(); RcveVendedor = DdlVendedor.SelectedValue.ToEntero();

View File

@@ -128,6 +128,12 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
BoundField test = new BoundField(); BoundField test = new BoundField();
test.DataField = "Grupo1"; test.DataField = "Grupo1";
test.HeaderText = ""; test.HeaderText = "";
HyperLinkField hypt = new HyperLinkField();
hypt.DataTextField = $"Total";
hypt.HeaderText = $"Total";
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" };
string strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
switch (idgrupo1) switch (idgrupo1)
{ {
case 1: case 1:
@@ -145,15 +151,11 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
case 4: case 4:
test.HeaderText = "Fecha"; test.HeaderText = "Fecha";
Agrupador = "Fecha"; Agrupador = "Fecha";
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={{2}}&FechaFin={{2}}{strfilstros}";
break; break;
} }
GVRepAcercamientosEtapas.Columns.Add(test); GVRepAcercamientosEtapas.Columns.Add(test);
HyperLinkField hypt = new HyperLinkField();
hypt.DataTextField = $"Total";
hypt.HeaderText = $"Total";
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" };
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}";
GVRepAcercamientosEtapas.Columns.Add(hypt); GVRepAcercamientosEtapas.Columns.Add(hypt);
foreach (DataRow row in dte.Rows) foreach (DataRow row in dte.Rows)
{ {

View File

@@ -69,13 +69,13 @@
<br /> <br />
<div class="form-group"> <div class="form-group">
<i class="fa fa-user fa-2 icontxt"></i> <i class="fa fa-user fa-2 icontxt"></i>
<asp:TextBox ID="txtUsuario" runat="server" CssClass="form-control" placeholder="Usuario" ClientIDMode="Static"></asp:TextBox> <asp:TextBox ID="txtUsuario" runat="server" CssClass="form-control txtUsuario" placeholder="Usuario" ClientIDMode="Static"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvUsuario" runat="server" ControlToValidate="TxtUsuario" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Usuario''</b> es necesario.</span></span>" ValidationGroup="LogIn"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvUsuario" runat="server" ControlToValidate="TxtUsuario" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Usuario''</b> es necesario.</span></span>" ValidationGroup="LogIn"></asp:RequiredFieldValidator>
</div> </div>
<div class="form-group"> <div class="form-group">
<i class="fa fa-lock fa-2 icontxt"></i> <i class="fa fa-lock fa-2 icontxt"></i>
<asp:TextBox ID="TxtContraseña" runat="server" CssClass="form-control" placeholder="Contraseña" type="password" ClientIDMode="Static"></asp:TextBox> <asp:TextBox ID="TxtContraseña" runat="server" CssClass="form-control TxtContraseña" placeholder="Contraseña" type="password" ClientIDMode="Static"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvContraseña" runat="server" ControlToValidate="TxtContraseña" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Contraseña''</b> es necesario.</span></span>" ValidationGroup="LogIn"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvContraseña" runat="server" ControlToValidate="TxtContraseña" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Contraseña''</b> es necesario.</span></span>" ValidationGroup="LogIn"></asp:RequiredFieldValidator>
</div> </div>
<div class="row " style="display: none"> <div class="row " style="display: none">
@@ -126,18 +126,33 @@
<asp:HiddenField ID="HdfImagenes" ClientIDMode="Static" runat="server" /> <asp:HiddenField ID="HdfImagenes" ClientIDMode="Static" runat="server" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<iframe id="framexd" style="display:none"></iframe>
</div> </div>
<script type="text/javascript" src="/Metronic/assets/global/scripts/JSNoCustom"></script> <script type="text/javascript" src="/Metronic/assets/global/scripts/JSNoCustom"></script>
<%--<script type="text/javascript" src="/Scripts/Notificaciones.js"></script>--%> <%--<script type="text/javascript" src="/Scripts/Notificaciones.js"></script>--%>
<script> <script>
function opennewlocation(returnurl,token) {
//let fram = $('#framexd');
//let Pagina =
// "http://localhost:2536/auth/login?authtoken=" + token;
// Metronic.blockUI();
//fram.unbind("load");
//fram.load(function () {
// setTimeout(function () { document.location = returnurl; },1500)
// Metronic.unblockUI();
//});
//fram.prop('src', Pagina);
document.location = returnurl;
}
// aqui debe de llammarse siganalr, para desconectar // aqui debe de llammarse siganalr, para desconectar
function exitsignalr() { function exitsignalr() {
let ADSCloseConection = "ADSCloseConection"; let ADSCloseConection = "ADSCloseConection";
let varreconected = localStorage.getItem(ADSCloseConection);//obtengo la variable para cambiarla y dispara el evento local change let varreconected = localStorage.getItem(ADSCloseConection);//obtengo la variable para cambiarla y dispara el evento local change
if (varreconected == "1") { if (varreconected == "1") {
localStorage.removeItem(ADSCloseConection); localStorage.removeItem(ADSCloseConection);
} else { localStorage.setItem(ADSCloseConection, "1"); } } else { localStorage.setItem(ADSCloseConection, "1"); }
localStorage.removeItem('AdsNotificacionesIsConnected'); localStorage.removeItem('AdsNotificacionesIsConnected');
} exitsignalr(); } exitsignalr();
var prm = Sys.WebForms.PageRequestManager.getInstance(); var prm = Sys.WebForms.PageRequestManager.getInstance();

View File

@@ -1,6 +1,9 @@
Imports System.Data Imports System.Data
Imports System.IdentityModel.Tokens.Jwt
Imports System.Security.Claims
Imports ADSSession Imports ADSSession
Imports Extensiones Imports Extensiones
Imports Microsoft.IdentityModel.Tokens
Partial Class LogIn Partial Class LogIn
Inherits System.Web.UI.Page Inherits System.Web.UI.Page
@@ -28,7 +31,9 @@ Partial Class LogIn
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
'"187.158.96.163" es la de mi casa '"187.158.96.163" es la de mi casa
'If (Context.Session("UsuarioSIG") IsNot Nothing) OrElse Not User.Identity.IsAuthenticated Then 'If (Context.Session("UsuarioSIG") IsNot Nothing) OrElse Not User.Identity.IsAuthenticated Then
'Request.Headers.Add("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJOb21icmUiOiJhZG1pbiIsIkN2ZVVzdWFyaW8iOiIyMDA5IiwiQ3ZlRW1wcmVzYSI6IjIiLCJDdmVQZXJmaWwiOiIyIiwiTWFpbCI6ImFkbWluQGFkbWluLmNvbSIsImV4cCI6MTU5NDY3MzQ2NCwiaXNzIjoiVGVzdC5jb20iLCJhdWQiOiJUZXN0LmNvbSJ9.vmPRxGfxzR10Rf-4Luk2Ej0SVs7w2XGDGJBCyx5VSQI")
'Response.AddHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJOb21icmUiOiJhZG1pbiIsIkN2ZVVzdWFyaW8iOiIyMDA5IiwiQ3ZlRW1wcmVzYSI6IjIiLCJDdmVQZXJmaWwiOiIyIiwiTWFpbCI6ImFkbWluQGFkbWluLmNvbSIsImV4cCI6MTU5NDY3MzQ2NCwiaXNzIjoiVGVzdC5jb20iLCJhdWQiOiJUZXN0LmNvbSJ9.vmPRxGfxzR10Rf-4Luk2Ej0SVs7w2XGDGJBCyx5VSQI")
'Response.End()
'End If 'End If
Dim iplist As String() = New String() {"", ""} Dim iplist As String() = New String() {"", ""}
If HttpContext.Current.Request.ServerVariables("REMOTE_ADDR").ToString().Contiene(iplist) Then If HttpContext.Current.Request.ServerVariables("REMOTE_ADDR").ToString().Contiene(iplist) Then
@@ -71,7 +76,7 @@ Partial Class LogIn
End If End If
HdfImagenes.Value = strimg.ToString() HdfImagenes.Value = strimg.ToString()
TxtUsuario.Focus() txtUsuario.Focus()
Me.Form.DefaultButton = BtnLogIn.ClientID Me.Form.DefaultButton = BtnLogIn.ClientID
If Request("p") IsNot Nothing AndAlso Request("p") <> "" Then If Request("p") IsNot Nothing AndAlso Request("p") <> "" Then
Dim Salida As String = Decripta(Request("p")) Dim Salida As String = Decripta(Request("p"))
@@ -179,6 +184,14 @@ Partial Class LogIn
If Request("ReturnUrl") IsNot Nothing Then If Request("ReturnUrl") IsNot Nothing Then
ReturnUrl = Request("ReturnUrl").ToString() ReturnUrl = Request("ReturnUrl").ToString()
End If End If
If Not IsNothing(Request("port")) Then
Dim strdomain = Request.Url.AbsoluteUri.Replace(Request.Url.PathAndQuery, "")
If Request.Url.Port <> 80 Then
strdomain = strdomain.Replace(String.Format(":{0}", Request.Url.Port), "")
End If
ReturnUrl = String.Format("{0}:{1}/{2}", strdomain, Request("port"), ReturnUrl)
End If
If BtnLogIn_Clickenter = 0 Then 'esta variable se recicla con cada postaback If BtnLogIn_Clickenter = 0 Then 'esta variable se recicla con cada postaback
BtnLogIn_Clickenter = 1 BtnLogIn_Clickenter = 1
Dim ObjUsuario As New ClsSisUsuarios Dim ObjUsuario As New ClsSisUsuarios
@@ -235,11 +248,29 @@ Partial Class LogIn
dt.Dispose() dt.Dispose()
End If End If
Dim cookie = FormsAuthentication.GetAuthCookie(Encripta(Usuario.CveUsuario), False) Dim cookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario, False)
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.SetAspSig, ASPSIG:=Request.Cookies.Get(".ASPXSIG").Value)
Response.Cookies.Add(cookie) Response.Cookies.Add(cookie)
'RegistraScript(String.Format("iniciaSesion('{0}')", ReturnUrl.Replace("'", "\'"))) 'RegistraScript(String.Format("iniciaSesion('{0}')", ReturnUrl.Replace("'", "\'")))
Response.Redirect(ReturnUrl, True)
'Public Property CveUsuario As Integer
'Public Property Mail As String
'Public Property Nombre As String
'Public Property Contraseña As String
'Public Property CvePerfil As Integer
'Public Property CveUsuarioModifico As Integer
'Public Property CveEmpresa As Integer
'Public Property CveUsuarioRegistro As Integer
Dim userm As New UserModel()
userm.CveUsuario = Usuario.CveUsuario
userm.Mail = Usuario.Usuario
userm.Nombre = Usuario.Nombre
userm.Contraseña = Usuario.Contraseña
userm.CvePerfil = Usuario.CveRol
userm.CveEmpresa = 119 'Usuario.CveEmpresa
userm.CveUsuarioModifico = Usuario.CveEmpresa
userm.CveUsuarioRegistro = Usuario.CveEmpresa
RegistraScript(String.Format("opennewlocation('{0}','{1}')", ReturnUrl, GenerateJSONWebToken(userm)))
'Response.Redirect(ReturnUrl, True)
Else Else
Alert("El usuario no esta autorizado en este equipo, favor de contactar al administrador de usuarios.", TipoMensaje.MsgAdvertencia) Alert("El usuario no esta autorizado en este equipo, favor de contactar al administrador de usuarios.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -307,4 +338,28 @@ Partial Class LogIn
End If End If
End If End If
End Sub End Sub
Public Function GenerateJSONWebToken(ByVal user As UserModel) As String
Dim securityKey = New SymmetricSecurityKey(Encoding.UTF8.GetBytes("ThisismySecretKey"))
Dim credentials = New SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256)
Dim claims = {New Claim("Nombre", user.Nombre), New Claim("CveUsuario", user.CveUsuario.ToString()), New Claim("CveEmpresa", user.CveEmpresa.ToString()), New Claim("CvePerfil", user.CvePerfil.ToString()), New Claim("Mail", user.Mail.ToString())}
Dim token = New JwtSecurityToken("Test.com", "Test.com", claims, expires:=DateTime.Now.AddMinutes(120), signingCredentials:=credentials)
Return New JwtSecurityTokenHandler().WriteToken(token)
End Function
Public Class UserModel
Public Sub New()
Me.CveUsuario = -1
End Sub
Public Property CveUsuario As Integer
Public Property Mail As String
Public Property Nombre As String
Public Property Contraseña As String
Public Property CvePerfil As Integer
Public Property CveUsuarioModifico As Integer
Public Property CveEmpresa As Integer
Public Property CveUsuarioRegistro As Integer
End Class
End Class End Class

View File

@@ -138,6 +138,14 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Left" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="80px">
<HeaderTemplate>¿CALCULAR SDI?</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="ChkCalcularSDI" runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
</Columns> </Columns>
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" /> <HeaderStyle CssClass="Titulos" />
@@ -190,6 +198,10 @@
</div> </div>
</div> </div>
<div class="portlet-body rowpadding "> <div class="portlet-body rowpadding ">
<div class="row">
<div class="col-sm-6">Calcular Salario Diario Integrado</div>
<div class="col-sm-6"> <asp:CheckBox ID="ChkCalcularSDIXLS" Text=" " CssClass="chksino" runat="server" /></div>
</div>
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox> <asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
</div> </div>
</div> </div>

View File

@@ -204,7 +204,9 @@ Partial Class RH_ActualizacionMasiva
' ObjPersonal.RollBack() ' ObjPersonal.RollBack()
' Exit For ' Exit For
'End If 'End If
If ObjPersonal.UpdateSalarios(Row.DataKey("CvePersonal").ToEntero(), DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row.FCTextBox("TxtSalarioDiario").Text.ToDecimal(), Row.FCTextBox("TxtSDI").Text.ToDecimal(), Row.FCTextBox("TxtSalarioCotizado").Text.ToDecimal(), Row.FCTextBox("TxtSalarioDiario").Text.ToDecimal()) Then If ObjPersonal.UpdateSalarios(Row.DataKey("CvePersonal").ToEntero(), DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row.FCTextBox("TxtSalarioDiario").Text.ToDecimal(),
Row.FCTextBox("TxtSDI").Text.ToDecimal(), Row.FCTextBox("TxtSalarioCotizado").Text.ToDecimal(), Row.FCTextBox("TxtSalarioDiario").Text.ToDecimal(),
Row.FCCheckBox("ChkCalcularSDI").Checked) Then
Else Else
OcurrioError = True OcurrioError = True
@@ -356,7 +358,8 @@ Partial Class RH_ActualizacionMasiva
If Not IsNothing(drow) Then If Not IsNothing(drow) Then
Dim CvePersonal As Integer = drow("CvePersonal").ToString().ToEntero() Dim CvePersonal As Integer = drow("CvePersonal").ToString().ToEntero()
If ObjPersonal.UpdateSalarios(CvePersonal, DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(), Row("SD IMSS").ToString().ToDecimal(), Row("SDD").ToString().ToDecimal()) Then If ObjPersonal.UpdateSalarios(CvePersonal, DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(),
Row("SD IMSS").ToString().ToDecimal(), Row("SDD").ToString().ToDecimal(), ChkCalcularSDIXLS.Checked) Then
contador = contador + 1 contador = contador + 1
Else Else
OcurrioError = True OcurrioError = True

View File

@@ -8,13 +8,16 @@
.node { .node {
width: 150px; width: 150px;
background-color: whitesmoke; background-color: whitesmoke;
font-weight:normal; font-weight: normal;
}
#chart_div{
overflow:auto;
} }
</style> </style>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript"> <script type="text/javascript">
google.charts.load('current', { packages: ["orgchart"] }); //google.charts.load('current', { packages: ["orgchart"] });
google.charts.setOnLoadCallback(drawChart); //google.charts.setOnLoadCallback(drawb);
function drawChart() {//esta funcion se ejecuta cada vez que se el boton "Consultar" es seleccionado y se ejecuta el metodo "GenerarOrg" en el VB function drawChart() {//esta funcion se ejecuta cada vez que se el boton "Consultar" es seleccionado y se ejecuta el metodo "GenerarOrg" en el VB
@@ -30,16 +33,17 @@
contentType: "application/json", contentType: "application/json",
dataType: "json", dataType: "json",
success: function (r) { success: function (r) {
debugger;
var options = { var options = {
allowHtml: true, allowHtml: true,
size: "large", size: "large",
nodeClass: "node" nodeClass: "node"
}; };
r.d = JSON.parse(r.d);
if (r.d.length > 0) { if (r.d.length > 0) {
var formatedData = []; var formatedData = [];
for (var i = 0; i < r.d.length; i++) { for (var i = 0; i < r.d.length; i++) {
let arregloAux = [JSON.parse(r.d[i][0]),i!=0?r.d[i][1]:"", r.d[i][2]]//por cada registro convertimos en JSON los titulos y subtitulos(llegan en String) y damos formato al header let arregloAux = [JSON.parse(r.d[i][0]), i != 0 ? r.d[i][1] : "", r.d[i][2]]//por cada registro convertimos en JSON los titulos y subtitulos(llegan en String) y damos formato al header
formatedData.push(arregloAux); formatedData.push(arregloAux);
} }
data.addRows(formatedData); data.addRows(formatedData);
@@ -111,9 +115,9 @@
<i></i> <i></i>
</div> </div>
<div class="col-md-1 truncate" style="text-align: right!important; width: 200px; margin-left:110px">Nivel de cadena de mando: </div> <div class="col-md-1 truncate" style="text-align: right!important; width: 200px; margin-left: 110px">Nivel de cadena de mando: </div>
<div class="col-md-1"> <div class="col-md-1">
<asp:TextBox runat="server" ID="txtNivel" Style="width:35px"></asp:TextBox> <asp:TextBox runat="server" ID="txtNivel" Style="width: 35px"></asp:TextBox>
</div> </div>
</div> </div>
@@ -123,6 +127,7 @@
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> <div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
</div> </div>
</div> </div>
<asp:Label ID="LblJson" CssClass="LblJson hidden" runat="server" Text="[]"></asp:Label>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -130,8 +135,45 @@
<div id="chart_div"></div> <div id="chart_div"></div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function drawb() {
let r = {};
var options = {
allowHtml: true,
size: "large",
nodeClass: "node"
};
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('string', 'Manager');
data.addColumn('string', 'ToolTip');
r.d = JSON.parse($('.LblJson').text());
if (r.d.length > 0) {
var formatedData = [];
for (var i = 0; i < r.d.length; i++) {
let arregloAux = [JSON.parse(r.d[i][0]), i != 0 ? r.d[i][1] : "", r.d[i][2]]//por cada registro convertimos en JSON los titulos y subtitulos(llegan en String) y damos formato al header
formatedData.push(arregloAux);
}
data.addRows(formatedData);
var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
for (let i = 0; i < data.getNumberOfRows(); i++) {
data.setRowProperty(i, 'style', "font-weight:normal");
}
chart.draw(data, options);
} else {
let contenedor = document.getElementById('chart_div');
contenedor.innerHTML = '';
console.log('vacio')
}
}
function ADSBegin() {
google.charts.load('current', { packages: ["orgchart"] });
google.charts.setOnLoadCallback(drawb);
}
</script>
</asp:Content> </asp:Content>

View File

@@ -86,14 +86,8 @@ Partial Class RH_Organigrama
CveEmpresaFiltro = UsuarioActual.CveEmpresa CveEmpresaFiltro = UsuarioActual.CveEmpresa
NivelOrg = If(rgx.IsMatch(txtNivel.Text), txtNivel.Text.ToEntero, NivelOrg) NivelOrg = If(rgx.IsMatch(txtNivel.Text), txtNivel.Text.ToEntero, NivelOrg)
txtNivel.Text = "" txtNivel.Text = ""
DdlSupervisorOrganigrama.SelectedIndex = 0 'DdlSupervisorOrganigrama.SelectedIndex = 0
ScriptManager.RegisterClientScriptBlock(Me, [GetType], "mykey", "drawChart()", True) 'ejecutamos la funcion de js para que haga la consulta de los registros
End Sub
#End Region
<WebMethod()>
Public Shared Function FetchData() As List(Of Object)
Dim ObjRH As New ClsRH Dim ObjRH As New ClsRH
Dim DtTemporal As New DataTable Dim DtTemporal As New DataTable
Dim chartData As New List(Of Object)() Dim chartData As New List(Of Object)()
@@ -110,8 +104,33 @@ Partial Class RH_Organigrama
chartData.Add(New Object() {headerEmpleado, If(nombreEmpleado = nombreSuperior, "", nombreSuperior), puesto}) chartData.Add(New Object() {headerEmpleado, If(nombreEmpleado = nombreSuperior, "", nombreSuperior), puesto})
Next Next
End If End If
Dim str As String = (New Script.Serialization.JavaScriptSerializer()).Serialize(chartData)
LblJson.Text = str
'ScriptManager.RegisterClientScriptBlock(Me, [GetType], "mykey", "drawChart()", True) 'ejecutamos la funcion de js para que haga la consulta de los registros
End Sub
Return chartData #End Region
<WebMethod()>
Public Shared Function FetchData() As String
Dim ObjRH As New ClsRH
Dim DtTemporal As New DataTable
Dim chartData As New List(Of Object)()
If ObjRH.GetOrganigrama(CveEmpresaFiltro, CveCabecera, NivelOrg) Then
DtTemporal = ObjRH.DtResultados.Copy
For Each renglon As DataRow In DtTemporal.Rows
Dim nombreEmpleado As String = renglon("nombreEmpleado").ToString
Dim nombreSuperior As String = renglon("nombreSuperior").ToString
Dim puesto As String = renglon("puesto").ToString
Dim headerEmpleado As String = String.Format("{{{2}v{2}:{2}{0}{2},{2}f{2}:{2}{0}<div style='color:#32A1CF;font-size:10px;font-style:italic'>{1}</div>{2}}}", nombreEmpleado, puesto, ControlChars.Quote) 'este es el JSON que da formato a los subtitulos se hace en String y la funcion lo hace JSON
chartData.Add(New Object() {headerEmpleado, If(nombreEmpleado = nombreSuperior, "", nombreSuperior), puesto})
Next
End If
Dim str As String = (New Script.Serialization.JavaScriptSerializer()).Serialize(chartData)
Return str
End Function End Function
End Class End Class

View File

@@ -715,7 +715,7 @@
<asp:DropDownList ID="DdlSupervisor" runat="server" AppendDataBoundItems="True" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar" Width="100%"> <asp:DropDownList ID="DdlSupervisor" runat="server" AppendDataBoundItems="True" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar" Width="100%">
<asp:ListItem Selected="True" Text="Sin Supervisor Asignado" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Sin Supervisor Asignado" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlSupervisor.ClientID.ToString()%>">Supervisor RH: </label> <asp:Label AssociatedControlID="DdlSupervisor" runat="server" Text="Supervisor RH:"></asp:Label>
<i></i> <i></i>
</div> </div>
<div runat="server" id="DivSuperiorInmediato" class="form-group form-md-line-input input-iconright"> <div runat="server" id="DivSuperiorInmediato" class="form-group form-md-line-input input-iconright">
@@ -723,7 +723,7 @@
<asp:ListItem Selected="True" Text="Sin Asignar" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Sin Asignar" Value="-1"></asp:ListItem>
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem> <asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlSupervisor.ClientID.ToString()%>">Superior Inmediato: </label> <asp:Label AssociatedControlID="DdlSupervisorOrganigrama" runat="server" Text="Superior Inmediato:"></asp:Label>
<i></i> <i></i>
</div> </div>
</div> </div>