This commit is contained in:
2021-01-29 16:10:22 -07:00
27 changed files with 10654 additions and 538 deletions

View File

@@ -4350,11 +4350,13 @@ Public Class ClsBancos
Return Retorno
End Function
Public Function GetAcreedoresReporte(CveEmpresa As Integer) As Boolean
Public Function GetAcreedoresReporte(CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_AcreedorReporte")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -540,6 +540,33 @@ Public Class ClsNominas
Return Retorno
End Function
Public Function PA_Nom_NominasAutorizarUP(cvePersonal As Int32, cvePeriodo As Int32, salarioDiario As Decimal, sBC As Decimal, sDI As Decimal, horasDobles As Int16, horasTriples As Int16, total As Double, subTotal As Double, diasPagados As Double, diasFaltados As Int32, diasVacaciones As Int32, diasIncapacidad As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Nom_NominasAutorizarUP", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = cvePersonal
.Add("@CvePeriodo", SqlDbType.Int).Value = cvePeriodo
.Add("@SalarioDiario", SqlDbType.SmallMoney).Value = salarioDiario
.Add("@SBC", SqlDbType.SmallMoney).Value = sBC
.Add("@SDI", SqlDbType.SmallMoney).Value = sDI
.Add("@HorasDobles", SqlDbType.SmallInt).Value = horasDobles
.Add("@HorasTriples", SqlDbType.SmallInt).Value = horasTriples
.Add("@Total", SqlDbType.Float).Value = total
.Add("@SubTotal", SqlDbType.Float).Value = subTotal
.Add("@DiasPagados", SqlDbType.Float).Value = diasPagados
.Add("@DiasFaltados", SqlDbType.Int).Value = diasFaltados
.Add("@DiasVacaciones", SqlDbType.Int).Value = diasVacaciones
.Add("@DiasIncapacidad", SqlDbType.Int).Value = diasIncapacidad
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al autorizar la nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function AddNom_Nominas(FolioNom As Integer, CveNominaTipo As Integer, CvePersonal As Integer, CvePeriodo As Integer, SubTotal As Double, Descuento As Double, RetISR As Double, Total As Double,
CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, Fecha As Date, MotivoDescuento As String, Observaciones As String,
Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double,

View File

@@ -5124,7 +5124,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
'PaginaDict.Add("/Compras/Efacturas.aspx".ToUpper(), 2007)
'PaginaDict.Add("/Compras/Compras.aspx".ToUpper(), 2008)
@@ -7468,11 +7468,11 @@ Public Class ClsPaginas
' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
'End If
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126, 158) Then
params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
End If
'DATOS PARA DESCUENTO
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126, 158) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString))
Else

View File

@@ -0,0 +1,9 @@
Imports Microsoft.VisualBasic
Namespace Models.Request
Public Class RequestLogin
Public Property UserName As String
Public Property Password As String
End Class
End Namespace

View File

@@ -0,0 +1,10 @@
Imports Microsoft.VisualBasic
Namespace Models.Response
Public Class ResponseGenericModel(Of T)
Public Property IsSuccess As Boolean
Public Property Msg As String
Public Property Result As T
End Class
End Namespace

View File

@@ -0,0 +1,93 @@
Imports Microsoft.VisualBasic
Imports Newtonsoft.Json
Namespace Models.Response
Public Class ResponseLogin
Public Property CveUsuario As Long
Public Property Usuario As String
Public Property Nombre As String
Public Property Correo As String
Public Property CveEmpresa As Long
Public Property Empresa As String
Public Property CvePlataforma As Long
Public Property Estatus As Boolean
Public Property CveRol As Integer
Public Property Rol As String
Public Property CveToken As Long
Public Property AccessToken As String
Public Property RefreshToken As String
Public Property UsuarioModulos As List(Of UsuarioModulo)
Public Property UsuarioEmpresas As List(Of UsuarioEmpresa)
Public Property EmpresaFuncionalidades As List(Of EmpresaFuncionalidad)
End Class
Public Class UsuarioModulo
Public Property CveModulo As Long
Public Property Modulo As String
Public Property CveUsuario As Long
Public Property Agrupacion As String
Public Property Descripcion As String
Public Property Liga As String
Public Property CveModuloAcceso As Long
Public Property CveProcesoAcceso As Long
Public Property Permitir As Long
Public Property Estilo As String
Public Property Padre As String
Public Property CvePadre As Long
Public Property Usuario As String
Public Property CveRol As Long
Public Property Rol As String
Public Property CvePlataforma As Long
Public Property Parametros As String
End Class
Public Class UsuarioEmpresa
Public Property Tipo_CentroCosto As Long
Public Property CveEmpresa As Long
Public Property Empresa As String
Public Property CveUsuario As Long
Public Property Usuario As String
Public Property Contraseña As String
Public Property CveCliente As Long
Public Property Cliente As String
Public Property CveProveedor As Long
Public Property Proveedor As String
Public Property FechaUltimoAcceso As DateTime
Public Property Nombre As String
Public Property CveRol As Long
Public Property Rol As String
Public Property Telefono As String
Public Property Correo As String
Public Property Estatus As Boolean
Public Property FechaIng As DateTime
Public Property EsSupervisorRH As Boolean
Public Property CveSupervisa As Long
Public Property CveAutoriza As Long
Public Property CvePersonal As Long
Public Property CveVendedor As Long
Public Property CvePlataforma As Long
Public Property ComprasProgramadas As Long
Public Property ProveedoresResponsables As Long
Public Property CveSubProyecto As Long
Public Property CveUsuarioIng As Long
Public Property CveEncuestaCRM As Long
<JsonIgnore>
Public Property EmpresaFuncionalidades As List(Of EmpresaFuncionalidad)
Public Function Funcionalidad(ByVal CveFuncionalidad As Long) As String
Return If(EmpresaFuncionalidades IsNot Nothing AndAlso EmpresaFuncionalidades.FirstOrDefault(Function(x) x.CveFuncionalidad = CveFuncionalidad) IsNot Nothing, EmpresaFuncionalidades.FirstOrDefault(Function(x) x.CveFuncionalidad = CveFuncionalidad).Valor, "")
End Function
End Class
Public Class EmpresaFuncionalidad
Public Property CveEmpresa As Long
Public Property CveFuncionalidad As Long
Public Property Valor As String
Public Property Descripción As String
Public Property Funcionalidad As String
End Class
End Namespace

36
App_Code/TimbradoB.vb Normal file
View File

@@ -0,0 +1,36 @@
Imports Microsoft.VisualBasic
Public Class TimbradoB
'Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
' Dim Retorno As Boolean = False
' Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
' If CvePACEspecial <> -1 Then tCvePAC = CvePACEspecial
' Dim objs As ADSTimbrado.TimbradoEmpresa
' Dim result = ADSTimbrado.Timbrado.TimbrarFactura(Ventas, objs, ADSTimbrado.PacTimbrado.PADEv)
' Retorno = result.isOK
' If result.isOK Then
' Else
' End If
' Return Retorno
'End Function
End Class
'Public Class TimbradoEmpresa
' Inherits ADSTimbradoLibrary.TimbradoEmpresa
' Public Overrides Function UpdateEstatusFactura(FolioFiscal As String, ObjCFDITimbre As ADSTimbradoLibrary.CFDITimbre, facturaCFDI As ADSTimbradoLibrary.Factura, CvePAC As Integer) As String
' Throw New NotImplementedException()
' End Function
' Public Overrides Function Timbre() As String
' Throw New NotImplementedException()
' End Function
'End Class

View File

@@ -385,6 +385,93 @@
<ajax:TabPanel ID="TabReporte" runat="server" HeaderText="Reporte">
<ContentTemplate>
<div id="PFiltroReporte" class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style="">
<div class="tools">
<asp:Button ID="BtnConsultarReporte" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultarReporte_Click" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row text-size-12">
<div class="col-md-1"><span>Fecha Inicio:</span></div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<%--width: 120px !important;--%>
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="METxtFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkTxtFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 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>--%>
<asp:CompareValidator ID="CVTxtFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" 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="GpoReporte"></asp:CompareValidator>
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="margin-left: 20px"><span>Fecha Fin:</span></div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<%--width: 120px !important;--%>
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="METxtFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkTxtFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
<asp:CompareValidator ID="CVTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" 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="GpoReporte"></asp:CompareValidator>
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<ajax:ValidatorCalloutExtender ID="VCECVTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:UpdatePanel ID="UpReporte" runat="server" UpdateMode="Conditional">

View File

@@ -931,14 +931,29 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
#region"REPORTE"
protected void CargaReporte()
{
DateTime FInicio = MinFecha;
DateTime FFin = MaxFecha;
if(TxtFechaInicio.Text.Length == 10)
{
FInicio = TxtFechaInicio.Text.ToDate();
}
if(TxtFechaFin.Text.Length == 10)
{
FFin = TxtFechaFin.Text.ToDate();
}
ClsBancos bancos = new ClsBancos();
if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa))
if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa, FInicio, FFin))
{
GvReporte.DataSource = bancos.DtResultados;
GvReporte.DataBind();
}
bancos.Dispose();
UpReporte.Update();
}
protected void GvReporte_RowDataBound(object sender, GridViewRowEventArgs e)
{
@@ -970,4 +985,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
UpDatos.Update();
UpMovAcreedor.Update();
}
protected void BtnConsultarReporte_Click(object sender, EventArgs e)
{
CargaReporte();
}
}

View File

@@ -13,11 +13,14 @@
<li>
<asp:HyperLink ID="LnkAgregar" NavigateUrl="/CRM/EmpresaCRM.aspx" runat="server" Target="_blank"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar</span></asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkCargaProspectos" runat="server" OnClick="LnkCargaProspectos_Click"><i class="fa fa-plus"></i><span style="padding-left:5px;">Cargar Prospectos</span></asp:LinkButton>
</li>
</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">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
@@ -47,9 +50,9 @@
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-right: 10px; margin-top: 18px;margin-bottom: 5px;" align="right">
<div class="row" style="margin-right: 10px; margin-top: 18px; margin-bottom: 5px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -59,7 +62,7 @@
<Columns>
<asp:TemplateField HeaderText="Empresa" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink ID="HplEmpresa" Target="_blank" runat="server" Text='<%# Eval("Empresa")%>' data-toggle="tooltip" title="Ir a Detalle"> </asp:HyperLink>
<asp:HyperLink ID="HplEmpresa" Target="_blank" runat="server" Text='<%# Eval("Empresa")%>' data-toggle="tooltip" title="Ir a Detalle"> </asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RFC" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
@@ -72,21 +75,21 @@
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Medio de Captacion" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<asp:TemplateField HeaderText="Medio de Captacion" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Contactos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField>
<asp:TemplateField HeaderText="Contactos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblNoContactos" runat="server" Text='<%# Eval("NoContactos")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Acercamientos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField>
<asp:TemplateField HeaderText="Acercamientos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblNoAcercamientos" runat="server" Text='<%# Eval("NoAcercamientos")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
@@ -95,14 +98,49 @@
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="10%" HeaderText="Comandos">
<ItemTemplate>
<asp:HyperLink ID="HplEditar" Target="_blank" runat="server" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="Sí" />
<asp:HyperLink ID="HplEditar" Target="_blank" runat="server" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="Sí" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivCargasMasivas" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpCargasMasivas" 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">Cargar Prospectos</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2" style="margin-left: 30px;text-align: left">
<asp:Button ID="BtnDescargar" runat="server" OnClick="BtnDescargar_Click" CssClass="btn btn-warning" Text="Descargar Formato" />
</div>
</div>
<br />
<div class="row">
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 50px;">
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAgregarProspectos" OnClick="BtnAgregarProspectos_Click" 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>
<Triggers>
<asp:PostBackTrigger ControlID="BtnDescargar"/>
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,11 +1,12 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using GemBox.Spreadsheet;
using Extensiones;
public partial class CRM_CatEmpresasCRM : ClsPaginas
@@ -124,4 +125,172 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
CargaMediosCaptacion();
UPFiltros.Update();
}
protected void LnkCargaProspectos_Click(object sender, EventArgs e)
{
RegistraScript(String.Format("$('#{0}').modal();", "DivCargasMasivas"));
}
protected void BtnDescargar_Click(object sender, EventArgs e)
{
string Directorio = ModExtensiones.DirectorioBaseEmpresas + "Empresas\\Grales\\Formatos\\FormatoDeProspectos.xlsx";
FileInfo Archivo = new FileInfo(Directorio);
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name);
Response.AddHeader("Content-Length", Archivo.Length.ToString());
Response.ContentType = "text/plain";
Response.Flush();
Response.TransmitFile(Archivo.FullName);
Response.End();
}
protected void BtnAgregarProspectos_Click(object sender, EventArgs e)
{
if( TxtExcel.getfiles().Archivos.Count > 0 )
{
Archivo file = TxtExcel.getfiles().Archivos[0];
string Directorio = Server.MapPath("~") + file.patch;
DataTable dt = ReadExcelFile(Directorio + file.filename, true);
DataRowCollection Rows = dt.Rows;
ClsCRM ObjCRM = new ClsCRM();
ObjCRM.IniciaTransacSQL();
bool TieneError = false;
foreach (DataRow row in Rows)
{
string Proceso = row["Proceso"].ToString();
string NombreEmpresa = row["Nombre de la empresa"].ToString();
string RFC = row["RFC"].ToString();
string Mail = row["Mail"].ToString();
string MedioCaptacion = row["Medio de Captación"].ToString();
string Agente = row["Agente"].ToString();
string Sucursal = row["Sucursal"].ToString();
string Giro = row["Giro"].ToString();
string ContactoPrincipal = row["Contacto Principal"].ToString();
string TelOficina = row["Teléfono de Oficina"].ToString();
string Celular = row["Celular"].ToString();
string Correo = row["Correo"].ToString();
int CveMedioCaptacion = -1;
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
{
DataRow MediosCaptacion = ObjCRM.DtResultados.FiltroPrimero(String.Format("MedioCaptacion = '{0}'",MedioCaptacion));
if(MediosCaptacion != null)
{
CveMedioCaptacion = MediosCaptacion["CveMedioCaptacion"].ToString().ToEntero();
}else
{
Alert(String.Format("El medio de captación '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
}
int CveVendedor = -1;
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("Vendedor = '{0}'",Agente));
if (Vendedor != null)
{
CveVendedor = Vendedor["CveVendedor"].ToString().ToEntero();
}else
{
Alert(String.Format("El vendedor '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
int CveSubProyecto = -1;
DataRow SubProyecto = get_GlobalDTSubProyectos(-1,CveEmpresa:UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("SubProyecto = '{0}'",Sucursal));
if(SubProyecto != null)
{
CveSubProyecto = SubProyecto["CveSubProyecto"].ToString().ToEntero();
}else
{
Alert(String.Format("El SubProyecto '{0}'", Sucursal), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
int CveGiro = -1;
DataRow GiroDt = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("ClienteClasificacion = '{0}'", Giro));
if (GiroDt != null)
{
CveGiro = GiroDt["CveClienteClasificacion"].ToString().ToEntero();
}
else
{
Alert(String.Format("El Giro de Empresa '{0}'", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
TieneError = (!(ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, -1, CveVendedor, CveSubProyecto, Mail, CveGiro) > 0));
}
if (TieneError)
{
ObjCRM.RollBack();
}else
{
ObjCRM.Commit();
Alert("Prospectos agregados correctamente");
TxtExcel.Text = "";
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivCargasMasivas"));
}
ObjCRM.Dispose();
}
}
private DataTable ReadExcelFile(string flatFilePath, bool firstRowHasHeaders)
{
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet());
ExcelFile excelFile = ExcelFile.Load(flatFilePath);
int unnamed = 0;
int cols;
string[] columns;
int curRow = 0;
int curCol = 0;
DataTable dataTable = new DataTable();
ExcelWorksheet worksheet = excelFile.Worksheets[0];
for (cols = 0; cols <= worksheet.Rows[0].AllocatedCells.Count - 1; cols++)
{
if (firstRowHasHeaders)
{
if (worksheet.Rows[0].Cells[cols].Value != null)
dataTable.Columns.Add(worksheet.Rows[0].Cells[cols].Value.ToString().Trim());
else
dataTable.Columns.Add("Unnamed Column " + (System.Threading.Interlocked.Increment(ref unnamed)));
curRow = 1;
}
else
dataTable.Columns.Add("Column " + (cols + 1));
}
while (curRow < worksheet.Rows.Count)
{
columns = new string[cols - 1 + 1];
for (curCol = 0; curCol <= cols - 1; curCol++)
{
if (worksheet.Rows[curRow].Cells[curCol].Value == null)
columns[curCol] = "";
else
columns[curCol] = worksheet.Rows[curRow].Cells[curCol].Value.ToString();
}
dataTable.Rows.Add(columns);
curRow += 1;
}
return dataTable;
}
}

View File

@@ -252,6 +252,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
VerificaPermisos();
CargaClasificaciones();
DdlPS.setEsWebService(true);
DdlPS.SelectedText = "Seleccione";
DdlPS.SelectedValue = "-1";
}
}
@@ -1516,6 +1518,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
if ((UsuarioActual.CveVendedor != CveVendedor))
{
BtnGuardarEmpresa.Visible = false;
BtnEliminarEmpresa.Visible = false;
BtnAgregarContacto.Visible = false;
//LnkAgregarAcercamiento.Visible = false;
DivAccionesBitacora.Visible = false;

View File

@@ -4,20 +4,6 @@
<ReportItems>
<Rectangle Name="Rectangle1">
<ReportItems>
<Image Name="Image1">
<Source>Embedded</Source>
<Value>Logo</Value>
<Sizing>FitProportional</Sizing>
<Top>0.41929cm</Top>
<Left>1.2827cm</Left>
<Height>3.23567cm</Height>
<Width>4.49779cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@@ -41,7 +27,6 @@
<Left>0.381cm</Left>
<Height>0.6cm</Height>
<Width>1.74625cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -60,7 +45,7 @@
<Left>4.21416cm</Left>
<Height>2.78048cm</Height>
<Width>2.21979cm</Width>
<ZIndex>2</ZIndex>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -91,7 +76,7 @@
<Left>0.28575cm</Left>
<Height>0.6cm</Height>
<Width>3.2225cm</Width>
<ZIndex>3</ZIndex>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -107,7 +92,7 @@
<Left>0.28575cm</Left>
<Height>0cm</Height>
<Width>3.2225cm</Width>
<ZIndex>4</ZIndex>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -140,7 +125,7 @@
<Left>0.28575cm</Left>
<Height>0.6cm</Height>
<Width>3.09903cm</Width>
<ZIndex>5</ZIndex>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -156,7 +141,7 @@
<Left>0.28575cm</Left>
<Height>0cm</Height>
<Width>3.10079cm</Width>
<ZIndex>6</ZIndex>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -189,7 +174,7 @@
<Left>4.11891cm</Left>
<Height>0.6cm</Height>
<Width>1.90229cm</Width>
<ZIndex>7</ZIndex>
<ZIndex>6</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -205,7 +190,7 @@
<Left>3.61103cm</Left>
<Height>0cm</Height>
<Width>2.82292cm</Width>
<ZIndex>8</ZIndex>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -236,7 +221,7 @@
<Left>0.0635cm</Left>
<Height>0.6cm</Height>
<Width>6.67724cm</Width>
<ZIndex>9</ZIndex>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -270,7 +255,7 @@
<Left>6.97976cm</Left>
<Height>0.41303cm</Height>
<Width>1.04599cm</Width>
<ZIndex>10</ZIndex>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -303,7 +288,7 @@
<Left>6.97976cm</Left>
<Height>0.41628cm</Height>
<Width>1.08479cm</Width>
<ZIndex>11</ZIndex>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -336,7 +321,7 @@
<Left>6.97976cm</Left>
<Height>0.43596cm</Height>
<Width>3.37312cm</Width>
<ZIndex>12</ZIndex>
<ZIndex>11</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -369,7 +354,7 @@
<Left>6.97976cm</Left>
<Height>0.39892cm</Height>
<Width>1.55985cm</Width>
<ZIndex>13</ZIndex>
<ZIndex>12</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -402,7 +387,7 @@
<Left>6.97976cm</Left>
<Height>0.3901cm</Height>
<Width>2.36625cm</Width>
<ZIndex>14</ZIndex>
<ZIndex>13</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -435,7 +420,7 @@
<Left>6.97976cm</Left>
<Height>0.40421cm</Height>
<Width>1.58424cm</Width>
<ZIndex>15</ZIndex>
<ZIndex>14</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -468,7 +453,7 @@
<Left>6.95537cm</Left>
<Height>0.43118cm</Height>
<Width>3.37312cm</Width>
<ZIndex>16</ZIndex>
<ZIndex>15</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -501,7 +486,7 @@
<Left>6.95537cm</Left>
<Height>0.37069cm</Height>
<Width>1.07037cm</Width>
<ZIndex>17</ZIndex>
<ZIndex>16</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -534,7 +519,7 @@
<Left>6.97976cm</Left>
<Height>0.4601cm</Height>
<Width>2.10312cm</Width>
<ZIndex>18</ZIndex>
<ZIndex>17</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -567,7 +552,7 @@
<Left>6.97976cm</Left>
<Height>0.42008cm</Height>
<Width>1.04599cm</Width>
<ZIndex>19</ZIndex>
<ZIndex>18</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -600,7 +585,7 @@
<Left>6.95537cm</Left>
<Height>0.44125cm</Height>
<Width>1.96378cm</Width>
<ZIndex>20</ZIndex>
<ZIndex>19</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -616,7 +601,7 @@
<Left>8.06455cm</Left>
<Height>0cm</Height>
<Width>5.59245cm</Width>
<ZIndex>21</ZIndex>
<ZIndex>20</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -629,7 +614,7 @@
<Left>7.87726cm</Left>
<Height>0cm</Height>
<Width>5.77973cm</Width>
<ZIndex>22</ZIndex>
<ZIndex>21</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -642,7 +627,7 @@
<Left>10.22883cm</Left>
<Height>0cm</Height>
<Width>3.42816cm</Width>
<ZIndex>23</ZIndex>
<ZIndex>22</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -655,7 +640,7 @@
<Left>8.46349cm</Left>
<Height>0cm</Height>
<Width>5.16176cm</Width>
<ZIndex>24</ZIndex>
<ZIndex>23</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -668,7 +653,7 @@
<Left>9.28251cm</Left>
<Height>0cm</Height>
<Width>4.37449cm</Width>
<ZIndex>25</ZIndex>
<ZIndex>24</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -681,7 +666,7 @@
<Left>8.36824cm</Left>
<Height>0cm</Height>
<Width>5.28876cm</Width>
<ZIndex>26</ZIndex>
<ZIndex>25</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -694,7 +679,7 @@
<Left>10.10183cm</Left>
<Height>0cm</Height>
<Width>3.55516cm</Width>
<ZIndex>27</ZIndex>
<ZIndex>26</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -707,7 +692,7 @@
<Left>7.65501cm</Left>
<Height>0cm</Height>
<Width>6.00198cm</Width>
<ZIndex>28</ZIndex>
<ZIndex>27</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -720,7 +705,7 @@
<Left>9.01601cm</Left>
<Height>0cm</Height>
<Width>4.64099cm</Width>
<ZIndex>29</ZIndex>
<ZIndex>28</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -733,7 +718,7 @@
<Left>7.82113cm</Left>
<Height>0cm</Height>
<Width>5.83587cm</Width>
<ZIndex>30</ZIndex>
<ZIndex>29</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -746,7 +731,7 @@
<Left>8.79713cm</Left>
<Height>0cm</Height>
<Width>4.85987cm</Width>
<ZIndex>31</ZIndex>
<ZIndex>30</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -788,7 +773,7 @@
<Left>6.95537cm</Left>
<Height>1.79104cm</Height>
<Width>6.70163cm</Width>
<ZIndex>32</ZIndex>
<ZIndex>31</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -837,7 +822,7 @@
<Left>6.97976cm</Left>
<Height>0.89104cm</Height>
<Width>6.67724cm</Width>
<ZIndex>33</ZIndex>
<ZIndex>32</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -870,7 +855,7 @@
<Left>8.04338cm</Left>
<Height>0.34247cm</Height>
<Width>5.61362cm</Width>
<ZIndex>34</ZIndex>
<ZIndex>33</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -902,7 +887,7 @@
<Left>8.06455cm</Left>
<Height>0.33894cm</Height>
<Width>5.59245cm</Width>
<ZIndex>35</ZIndex>
<ZIndex>34</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -934,7 +919,7 @@
<Left>10.38816cm</Left>
<Height>0.34776cm</Height>
<Width>3.26884cm</Width>
<ZIndex>36</ZIndex>
<ZIndex>35</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -966,7 +951,7 @@
<Left>8.63838cm</Left>
<Height>0.2384cm</Height>
<Width>5.01862cm</Width>
<ZIndex>37</ZIndex>
<ZIndex>36</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -998,7 +983,7 @@
<Left>9.34601cm</Left>
<Height>0.30719cm</Height>
<Width>4.31099cm</Width>
<ZIndex>38</ZIndex>
<ZIndex>37</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1030,7 +1015,7 @@
<Left>8.46874cm</Left>
<Height>0.27544cm</Height>
<Width>5.16176cm</Width>
<ZIndex>39</ZIndex>
<ZIndex>38</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1062,7 +1047,7 @@
<Left>10.39905cm</Left>
<Height>0.32535cm</Height>
<Width>3.25795cm</Width>
<ZIndex>40</ZIndex>
<ZIndex>39</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1094,7 +1079,7 @@
<Left>8.06455cm</Left>
<Height>0.32131cm</Height>
<Width>5.59245cm</Width>
<ZIndex>41</ZIndex>
<ZIndex>40</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1126,7 +1111,7 @@
<Left>9.15344cm</Left>
<Height>0.30543cm</Height>
<Width>4.50356cm</Width>
<ZIndex>42</ZIndex>
<ZIndex>41</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1166,7 +1151,7 @@
<Left>0.381cm</Left>
<Height>1.4631cm</Height>
<Width>6.05295cm</Width>
<ZIndex>43</ZIndex>
<ZIndex>42</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1200,7 +1185,7 @@
<Left>3.61103cm</Left>
<Height>0.41382cm</Height>
<Width>2.82292cm</Width>
<ZIndex>44</ZIndex>
<ZIndex>43</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1232,7 +1217,7 @@
<Left>8.0963cm</Left>
<Height>0.38481cm</Height>
<Width>5.5607cm</Width>
<ZIndex>45</ZIndex>
<ZIndex>44</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1264,7 +1249,7 @@
<Left>9.01439cm</Left>
<Height>0.33189cm</Height>
<Width>4.6426cm</Width>
<ZIndex>46</ZIndex>
<ZIndex>45</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1280,7 +1265,7 @@
<Left>2.02882cm</Left>
<Height>0cm</Height>
<Width>4.40513cm</Width>
<ZIndex>47</ZIndex>
<ZIndex>46</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -1293,7 +1278,7 @@
<Left>0.43512cm</Left>
<Height>0cm</Height>
<Width>5.99883cm</Width>
<ZIndex>48</ZIndex>
<ZIndex>47</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -1306,7 +1291,7 @@
<Left>0.43512cm</Left>
<Height>0cm</Height>
<Width>5.99883cm</Width>
<ZIndex>49</ZIndex>
<ZIndex>48</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>

View File

@@ -2896,7 +2896,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>$</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value &gt;0,"$",Nothing)</Value>
<Style />
</TextRun>
</TextRuns>
@@ -2927,7 +2927,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteP.Value</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value &gt;0,Fields!ImporteP.Value,nothing)</Value>
<Style>
<Format>#,0.00;(#,0.00)</Format>
</Style>
@@ -3025,7 +3025,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>$</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value &gt;0,"$"," ")</Value>
<Style />
</TextRun>
</TextRuns>
@@ -3056,7 +3056,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteD.Value</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value &gt;0,Fields!ImporteD.Value,nothing)</Value>
<Style>
<Format>#,0.00;(#,0.00)</Format>
</Style>
@@ -4194,7 +4194,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value> Percepciones y deducciones que en el aparecen a la fecha COMPUPROVEEDORES SA DE CV no me adeuda</Value>
<Value> Percepciones y deducciones que en el aparecen a la fecha [@Empresa] no me adeuda</Value>
<Style />
</TextRun>
</TextRuns>
@@ -5130,6 +5130,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Empresa">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubProyecto">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>

View File

@@ -262,6 +262,7 @@ partial class Nomina_Finiquito : ClsPaginas
ChkesLiquidacion.Checked = esLiquidacion;
}
}
Timbrado tr;
if (DdlMotivoBaja.SelectedValue.ToEntero() > 0)
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text;
else

View File

@@ -274,6 +274,15 @@
<asp:ListItem Text="Todos" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 " style="line-height: 1;">Agrupador:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlAgrupadorB" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Sin Agrupación" Value="-1" Selected ="True"></asp:ListItem>
<asp:ListItem Text="Centro de costos" Value="1"></asp:ListItem>
<asp:ListItem Text="Departamento" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -307,7 +316,7 @@
</div>
</div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Codigo,Turno,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Codigo,Turno,Departamento,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" Style="text-align: center;" GridLines="None" data-cols="2" data-rows="2" data-heighterror="360">
<Columns>
@@ -323,7 +332,7 @@
<ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
</ItemTemplate>
<ItemStyle Width="350px" HorizontalAlign="Left" />
<ItemStyle Width="300px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +1,23 @@
<%@ Page Title="Nómina - Pre Nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PreNomina.aspx.vb" Inherits="Nomina_PreNomina" %>
<%@ Page Title="Nómina - Pre nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PreNomina.aspx.vb" Inherits="Nomina_PreNomina" %>
<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="HB" runat="Server">
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<%-- <asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>--%>
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
<asp:LinkButton ID="ImgExcel" Target="_blank" runat="server"> <i class="fa fa-ad-excel"></i> Imprimir</asp:LinkButton>
</li>
<li>
<asp:HyperLink ID="HLImgImprimir" Target="_blank" runat="server" NavigateUrl="#"> <i class="fa fa-ad-pdf"></i> Imprimir</asp:HyperLink>
<%--<a id="HLImgImprimir" runat="server" href="#" class="Texto">
<img alt="Imprimir" src="/Imagenes/btnImprimir.gif"/>
</a>--%>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Pre Nómina
Pre nómina
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
@@ -57,10 +47,10 @@
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
<asp:Button ID="BtnGuardarBono" runat="server" Text="Guardar Bonos" class="btn btn-primary" />
<asp:Button ID="BtnImpresion" runat="server" Text="Cerrar Nómina" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
</div>
<div class="portlet-body" style="display: none;">
@@ -79,7 +69,12 @@
</div>
</div>
<table id="TblHeader" runat="server" class="table table-striped table-advance table-hover" width="1385px">
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="TblHeader" runat="server" class="table table-striped table-advance table-hover Widthall TblHeader" >
<thead>
<tr class="Titulos">
<th rowspan="2" width="250px">Nombre</th>
@@ -99,7 +94,6 @@
<th id="TDBono" runat="server" rowspan="2" style="width: 60px;">Bono</th>
<th id="TDPagoAdicional" runat="server" rowspan="2" style="width: 60px;">Pago Adi</th>
<th id="TDDescuento" runat="server" rowspan="2" style="width: 60px;">Desc Adi</th>--%>
<th rowspan="2">&nbsp;</th>
</tr>
<tr class="Titulos">
<th width="35px">Tipo</th>
@@ -133,12 +127,8 @@
</tr>
</thead>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Pre Nómina" Width="1385px" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal" EmptyDataText="No se encontraron Ventas con los filtros especificados" data-tableheader=".TblHeader"
ToolTip="Pre Nómina" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style=" text-align: center;" GridLines="None" data-scrollwidthrow=".scrollwidthrow">
<Columns>
<asp:TemplateField>
<ItemTemplate>
@@ -345,37 +335,37 @@
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:CheckBox ID="ChkAplica" runat="server" Visible="false" Checked='<%# Eval("AplicaBono") %>' />
</ItemTemplate>
<ItemStyle Width="70px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtBono" runat="server" Visible="false" Text='<%# Eval("Importe", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtPagoAdicional" Visible="false" runat="server" Text='<%# Eval("PagoAdicional", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtDescuentoAdicional" Visible="false" runat="server" Text='<%# Eval("DescuentoAdicional", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
</asp:TemplateField>
<%--<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlHorasTriples" runat="server" Text='<%# Eval("HorasTriples") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="65px" />
</asp:TemplateField>--%>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
&nbsp;
</ItemTemplate>

View File

@@ -205,11 +205,12 @@ Partial Class Nomina_PreNomina
If e.Row.DBCampo("Asistencias").ToDouble = 0 Then e.Row.FCLiteral("LtlAsistencias").Text = ""
If e.Row.DBCampo("Faltas").ToDouble = 0 Then e.Row.FCLiteral("LtlFaltas").Text = ""
If e.Row.DBCampo("HorasDobles").ToDouble = 0 Then e.Row.FCLiteral("LtlHorasExtras").Text = ""
e.Row.CssClass = "scrollwidthrow"
End If
End If
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("PreNomina", TblHeader)
End Sub

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@
<a href="javascript:;" class="collapse"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
<div class="titlefiltros caption ">
<div class="titlefiltros ">
<ul class="list-inline">
<li>Cliente:
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />

View File

@@ -32,7 +32,11 @@
<asp:LinkButton ID="ImgImprimir" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>--%>
<li>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Expediente de personal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LbGafete" runat="server" CssClass="" Text="Gafete" />
</li>
<asp:UpdatePanel ID="UpBuzon" runat="server">
@@ -3221,8 +3225,6 @@
<td style="width: 40px;"></td>
<td style="width: 500px; text-align: right!important"></td>
<td style="width: 500px; text-align: right!important">
<asp:LinkButton ID="LbGafete" runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-download' title='Descargar Contrato'></i>" />
</td>
<td style="width: 50px!important"></td>
</tr>
@@ -3295,9 +3297,6 @@
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LbGafete" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -3437,7 +3437,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("LogoUri", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, "ReportePersonal", "PDF")
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
End If
End If
ObjPersonal.Dispose()

View File

@@ -823,6 +823,7 @@ ADSScroll = function (tablescroll) {
tablefooter.attr('id', 'ADSF-' + tablescroll.attr('id'));
let trWwidth = $('<tr class="trnopadding ADtr SearchADHeader"></tr>');
let idTheader = tablescroll.data('tableheader');
let scrollwidthrow = tablescroll.data('scrollwidthrow') ? tablescroll.data('scrollwidthrow') : "";
let rowVisibles = isNaN(Number(tablescroll.data('rows'))) ? 1 : Number(tablescroll.data('rows'));
let rowFooter = isNaN(Number(tablescroll.data('footer'))) ? 0 : Number(tablescroll.data('footer'));
let heightBody = isNaN(Number(tablescroll.data('height'))) ? 200 : Number(tablescroll.data('height'));
@@ -861,12 +862,21 @@ ADSScroll = function (tablescroll) {
}
}
let firsttr = null;
tablescroll.find('> tbody > tr,> thead > tr,> tr').each(function () {
tablescroll.find('> tbody > tr' + scrollwidthrow + ',> thead > tr' + scrollwidthrow + ',> tr' + scrollwidthrow +'').each(function () {
var retorno = false;
firsttr = $(this);
if (firsttr.find(' > td[colspan], > th[colspan]').length) { retorno = true; }
return retorno;
});
if (firsttr == null) {
tablescroll.find('> tbody > tr,> thead > tr,> tr').each(function () {
var retorno = false;
firsttr = $(this);
if (firsttr.find(' > td[colspan], > th[colspan]').length) { retorno = true; }
return retorno;
});
}
tablescroll.before(divcontainer);
divcontainer.append(divheader);
divcontainer.append(divbody);

25
testApi.aspx Normal file
View File

@@ -0,0 +1,25 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="testApi.aspx.vb" Inherits="testApi" %>
<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">
Prueba api de Login
</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">
<div class="row">
<label class="col-md-12">
<asp:Label runat="server" ID="LblMsg" Font-Bold="true"></asp:Label>
</label>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

51
testApi.aspx.vb Normal file
View File

@@ -0,0 +1,51 @@
Option Strict On
Option Explicit On
Imports System.Data
Imports System.IO
Imports System.Net
Imports Extensiones
Imports Models.Request
Imports Models.Response
Imports Newtonsoft.Json
Partial Class testApi
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim responseGenericModel = New ResponseGenericModel(Of ResponseLogin)()
Dim origResponse As HttpWebResponse
Dim origRequest As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://sig.adssistemas.mx:90/api/usuario/Login"), HttpWebRequest)
'origRequest.Headers.Add("Authorization", "Barer c3NhX2RzdDpBc3AzY3RfMTIzNA==") Esto se usara cuando se tenga que mandar el token (todos excepto el login)
origRequest.AllowAutoRedirect = False
origRequest.Method = "POST"
origRequest.ContentType = "application/json"
origRequest.Accept = "application/json"
origRequest.Expect = "application/json"
Try
Dim requestLogin = New RequestLogin() With {
.UserName = "RPimienta",
.Password = "capillafc"
}
Dim requestJson = JsonConvert.SerializeObject(requestLogin)
origRequest.GetRequestStream.Write(System.Text.Encoding.UTF8.GetBytes(requestJson), 0, System.Text.Encoding.UTF8.GetBytes(requestJson).Count)
origResponse = DirectCast(origRequest.GetResponse(), HttpWebResponse)
Dim Stream As Stream = origResponse.GetResponseStream()
Dim sr As New StreamReader(Stream, Encoding.GetEncoding("utf-8"))
Dim str As String = sr.ReadToEnd()
responseGenericModel = JsonConvert.DeserializeObject(Of ResponseGenericModel(Of ResponseLogin))(str)
If responseGenericModel.IsSuccess Then
LblMsg.Text = $"Bienvenido {responseGenericModel.Result.Nombre}"
End If
Catch ex As WebException
Alert(ex.Response.ToString())
End Try
End If
End Sub
End Class

View File

@@ -150,6 +150,18 @@