This commit is contained in:
HECTOR RODRIGUEZ
2021-04-16 18:00:52 -07:00
7 changed files with 332 additions and 34 deletions

View File

@@ -1592,7 +1592,41 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
Public Function UpdateCuentasDepositosPersonal(CveCuentaDeposito As Integer, BancoNombre As String, Cuenta As String, CLABE As String, CveMoneda As Integer, CveUsuarioModifico As Integer, EstatusPagoElectronico As Boolean, Estatus As Boolean, CveSATBanco As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosPersonalUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
.Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre
.Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta
.Add("@CLABE", SqlDbType.VarChar).Value = CLABE
.Add("@Estatus", SqlDbType.VarChar).Value = Estatus
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
.Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
Alert("Ya existe un registro con el mismo nombre", TipoMensaje.MsgAdvertencia)
Else
Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String,
RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",

View File

@@ -198,6 +198,41 @@ Public Class ClsNominas
End Function
Public Function ReportedeincidenciasGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()
DataAdapter("PA_RH_ReportedeincidenciasGET", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
End With
Try
SqlAdapter.Fill(DTSet)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de incidencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function ReportedeAcumuladosGET(cveEmpresa As Integer, Periodo As Integer, CveTipoPeriodo As Integer) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()
DataAdapter("PA_RH_ReportedeAcumuladosGET", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@Periodo", SqlDbType.Int).Value = Periodo
.Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
End With
Try
SqlAdapter.Fill(DTSet)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de acumulados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure)

View File

@@ -577,8 +577,8 @@ Namespace Extensiones
Else
Return CDbl(Obj(key))
End If
End Function
End Function
<Runtime.CompilerServices.Extension()>
Public Function ToEntero(Obj As Object) As Integer

View File

@@ -159,6 +159,12 @@
<li>
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkAsistenciaIncidencias" Visible="true" OnClick="LnkAsistenciaIncidencias_Click" runat="server"><i class="fa fa-check-square"></i>Incidencias asistencia </asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkReporteAcumulados" Visible="true" OnClick="LnkReporteAcumulados_Click" runat="server"><i class="fa fa-line-chart"></i>Reporte acumulados </asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkConceptoEmpleado" OnClick="LnkConceptoEmpleado_Click" runat="server"><i class="fa fa-plus"></i> Empleado concepto</asp:LinkButton>
</li>
@@ -197,7 +203,7 @@
<asp:PostBackTrigger ControlID="LnkListaRaya" />
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
</Triggers>
</asp:UpdatePanel>
@@ -1123,7 +1129,7 @@
</div>
</div>
<div class="portlet-body">
<asp:UpdatePanel ID="UpGvVacaciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvVacaciones" Width="100%" runat="server" GridLines="None" BorderWidth="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
@@ -1155,7 +1161,7 @@
</asp:GridView>
</ContentTemplate>
<Triggers>
<%--<asp:PostBackTrigger ="LnkListaRaya" />--%>
<%--<asp:AsyncPostBackTrigger EventName="DownLoad_ClickSolicitudVacaciones" />
<asp:AsyncPostBackTrigger EventName="DownLoad_ClickSolicitudAutorizacion" />--%>
@@ -1546,7 +1552,7 @@
<ajax:ValidatorCalloutExtender ID="vcoTxtFechaPRT" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaPRT" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-4">
<asp:LinkButton ID="LnkupPrimaRiesgo" OnClick="LnkupPrimaRiesgo_Click" CssClass ="btn btn-primary" ValidationGroup="GrpGuardarprimariesgo" runat="server">Actualizar</asp:LinkButton>
<asp:LinkButton ID="LnkupPrimaRiesgo" OnClick="LnkupPrimaRiesgo_Click" CssClass="btn btn-primary" ValidationGroup="GrpGuardarprimariesgo" runat="server">Actualizar</asp:LinkButton>
</div>
</div>
</div>
@@ -1949,7 +1955,80 @@
</asp:UpdatePanel>
</div>
<div id="DmodalReporteAcumulados" class="modal ADS fade" role="dialog">
<div class="modal-dialog" tabindex="-1">
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Reporte de incidencias</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel ID="upperiodoreporte" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPeriodo" CssClass="form-control input-sm " runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtPeriodo">Periodo(aaaaMM)</asp:Label>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkProcesarReporteAcumulados" OnClick="LnkProcesarReporteAcumulados_Click" CssClass="btn btn-primary" runat="server">Descargar</asp:LinkButton>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
<div id="DmodalReporteInicidencia" class="modal ADS fade" role="dialog">
<div class="modal-dialog" tabindex="-1">
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Reporte de incidencias</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRIFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtRIFechaInicio">Fecha Inicio</asp:Label>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtRIFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtRIFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRIFechaInicio" runat="server" ControlToValidate="TxtRIFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporteInicidencia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcorfvRIFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="rfvRIFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRIFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtRIFechaFin">Fecha Fin</asp:Label>
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtRIFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtRIFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRIFechaFin" runat="server" ControlToValidate="TxtRIFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporteInicidencia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcorfvRIFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="rfvRIFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkProcesarReporteIncidencia" OnClick="LnkProcesarReporteIncidencia_Click" ValidationGroup="VGReporteInicidencia" CssClass="btn btn-primary" runat="server">Descargar</asp:LinkButton>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
<div id="DmodalCompareSua" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpArchivoSua" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>

View File

@@ -181,6 +181,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
if (!IsPostBack)
{
TxtPeriodo.Text = $"{DateTime.Now :yyyyMM}";
CargarCentrosDeCosto(DdlProyecto, null, LblProyecto, LblSubProyeccto);
cargaEjercicios();
CargaTiposPeriodo();
@@ -390,6 +391,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
UpAccciones.Update();
}
LnkListaRaya.Visible = true;
LnkAsistenciaIncidencias.Visible = true;
LnkFormatoTabular.Visible = true;
HypPDFSTimbrados.Visible = true;
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 1)
@@ -5678,5 +5681,102 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
}
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
{
RegistraScript("$('#DmodalReporteInicidencia').modal()");
}
protected void LnkProcesarReporteIncidencia_Click(object sender, EventArgs e)
{
DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
using (ClsNominas nom = new ClsNominas())
{
if (nom.ReportedeincidenciasGET(UsuarioActual.CveEmpresa, fechai, fechaf, 4))
{
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[2], "Incidencias");
libro.ColumnsUsed().AdjustToContents();
var libroin = wb.AddWorksheet(nom.DTSetResultados.Tables[1], "Descripción incidencias");
libro.ColumnsUsed().AdjustToContents();
libro.Row(1).InsertRowsAbove(4);
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
libro.Range(2, 2, 2, 6).Merge().Value = "Reporte de incidencias";
libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
//ws.Row(1).InsertRowsAbove(1);
}
}
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename=incidencias del al{0}.xlsx", ""));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
protected void LnkProcesarReporteAcumulados_Click(object sender, EventArgs e)
{
DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
using (ClsNominas nom = new ClsNominas())
{
if (nom.ReportedeAcumuladosGET(UsuarioActual.CveEmpresa, TxtPeriodo.Text.ToEntero(), 4))
{
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Acumulados");
libro.ColumnsUsed().AdjustToContents();
//ws.Row(1).InsertRowsAbove(1);
}
}
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename=Acumulados.xlsx", ""));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
protected void LnkReporteAcumulados_Click(object sender, EventArgs e)
{
RegistraScript("$('#DmodalReporteAcumulados').modal()");
}
}

View File

@@ -1043,7 +1043,7 @@
<ContentTemplate>
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" CssClass="table table-striped table-hover Widthall" Style="table-layout: fixed" runat="server"
DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" ShowHeaderWhenEmpty="true">
DataKeyNames="CveCuentaDeposito,CveSATBanco,Cuenta,CLABE,EstatusPagoElectronico,EstatusTexto,CveMoneda" AutoGenerateColumns="False" ShowHeaderWhenEmpty="true">
<%--<asp:GridView ID="GvBancosCuentas" runat="server" DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias" CssClass="table table-striped table-advance table-hover" Style="table-layout: fixed" BorderWidth="0" GridLines="None">--%>
<Columns>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Banco" ItemStyle-HorizontalAlign="Center">
@@ -1154,6 +1154,9 @@
<!--IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No") = If(EstatusPagoElectronico) Then "Sí" Else "No"-->
<asp:Label ID="LblEstatusPE" runat="server" Text='<%# IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No")%>'>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstatusPagoE" runat="server" Checked='<%# IIf(CBool(Eval("EstatusPagoElectronico")), True, False)%>' Visible="true"></asp:CheckBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
<ItemTemplate>
@@ -1402,22 +1405,24 @@
<asp:RequiredFieldValidator ID="RFVMetodoPago" runat="server" ControlToValidate="DdlMetodoPago" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método de Pago''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlBanco" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Banco" DataValueField="CveSATBanco" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin asignar Banco" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlBanco" Text="Banco:"></asp:Label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtBancoNumCuenta" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtBancoNumCuenta" Text="Cuenta:"></asp:Label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtCLABE" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtCLABE" Text="CLABE:"></asp:Label>
<i></i>
<div style="display: none;">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlBanco" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Banco" DataValueField="CveSATBanco" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin asignar Banco" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlBanco" Text="Banco:"></asp:Label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtBancoNumCuenta" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtBancoNumCuenta" Text="Cuenta:"></asp:Label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtCLABE" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtCLABE" Text="CLABE:"></asp:Label>
<i></i>
</div>
</div>
</div>
</div>
@@ -3975,12 +3980,17 @@
<ajax:ValidatorCalloutExtender ID="VCEMonedax" runat="server" HighlightCssClass="vco" TargetControlID="RFVMonedax" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div>
<asp:Label runat="server" AssociatedControlID="ChkEstatus" Text="Activo:"></asp:Label><br />
<asp:CheckBox ID="ChkEstatus" runat="server" Checked="true" Visible="false"></asp:CheckBox>
<asp:Label runat="server" AssociatedControlID="ChkEstatusPagoE" Text="Estatus Pago E.:"></asp:Label><br />
<asp:CheckBox ID="ChkEstatusPagoE" runat="server" Checked="true"></asp:CheckBox>
</div>
<div>
<asp:Label runat="server" AssociatedControlID="ChkEstatuscuenta" Text="Activo:"></asp:Label><br />
<asp:CheckBox ID="ChkEstatuscuenta" runat="server" Checked="true" Enabled="false"></asp:CheckBox>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnActualizarCuentaBanco" OnClick="LbActualizarCuentaBanco_Click" UseSubmitBehavior="false" runat="server" class="btn btn-primary" Text="Actualizar" ValidationGroup="GrpAgregarBanco" />
<asp:Button ID="BtnAgregarCuentaBanco" OnClick="LbAgregarCuentaBanco_Click" UseSubmitBehavior="false" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpAgregarBanco" />
<button id="Button5" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>

View File

@@ -88,6 +88,18 @@ Partial Class RH_Personal
ViewState("Documentacion") = value
End Set
End Property
Property CveCuentaDeposito As Integer
Get
If ViewState("CveCuentaDeposito") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("CveCuentaDeposito"), Integer)
End If
End Get
Set(value As Integer)
ViewState("CveCuentaDeposito") = value
End Set
End Property
Property CveDocumentacion As Integer
Get
If ViewState("CveDocumentacion") Is Nothing Then
@@ -2892,11 +2904,23 @@ Partial Class RH_Personal
End Sub
Protected Sub Lnkopenaddcuentabancaria_Click(sender As Object, e As EventArgs)
BtnAgregarCuentaBanco.Visible = False
BtnActualizarCuentaBanco.Visible = False
BtnAgregarCuentaBanco.Visible = True
RegistraScript("$('#DivCuentasVancarias').modal();")
End Sub
Protected Sub LbActualizarCuentaBanco_Click(sender As Object, e As EventArgs)
Using ObjCuentasBancos As New ClsGenerales
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
If ObjCuentasBancos.UpdateCuentasDepositosPersonal(CveCuentaDeposito, nombrebanco, TxtNumeroCuenta.Text, TxtCLABECB.Text, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ChkEstatusPagoE.Checked, ChkEstatuscuenta.Checked, DdlBancoSat.SelectedValue.ToEntero()) Then
'UpdateCuentasDepositosPersonal(CveCuentaDeposito As Integer, BancoNombre As String, Cuenta As String, CLABE As String, CveMoneda As Integer, CveUsuarioModifico As Integer, EstatusPagoElectronico As Boolean, Estatus As Boolean, CveSATBanco As Integer) As Boolean
Alert("Cuenta actualizada")
End If
End Using
CargaCuentasBancarias()
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
End Sub
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
Dim EsBancomer = False
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
@@ -2940,7 +2964,7 @@ Partial Class RH_Personal
' Exit Sub
'End If
AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero())
AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero(), ChkEstatusPagoE.Checked)
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
End Sub
Private Sub CargaGridCuentasBancos(Orden As String)
@@ -2965,13 +2989,13 @@ Partial Class RH_Personal
GvBancosCuentas.DataBind()
UpCuentasBancos.Update()
End Sub
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String, CveSATBanco As Integer)
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String, CveSATBanco As Integer, EstatusPagoElectronico As Boolean)
Dim Row As DataRow
If CvePersonal > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco) Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
@@ -2993,7 +3017,7 @@ Partial Class RH_Personal
Row("Referencia") = Referencia
Row("CveMoneda") = CveMoneda
Row("Moneda") = Moneda
Row("EstatusPagoElectronico") = False
Row("EstatusPagoElectronico") = EstatusPagoElectronico
TempDTCuentasBancos.Rows.Add(Row)
End If
@@ -3064,8 +3088,22 @@ Partial Class RH_Personal
End If
End Sub
Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing
GvBancosCuentas.EditIndex = e.NewEditIndex
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
Dim gvrow As GridViewRow = GvBancosCuentas.Rows(e.NewEditIndex) 'DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
BtnActualizarCuentaBanco.Visible = True
BtnAgregarCuentaBanco.Visible = False
'CveCuentaDeposito,CveSATBanco,Cuenta,CLABE,EstatusPagoElectronico,CveMoneda
CveCuentaDeposito = gvrow.DataKey("CveCuentaDeposito").ToEntero()
DdlBancoSat.SelectedValueExist(gvrow.DataKey("CveSATBanco"))
DdlMoneda.SelectedValueExist(gvrow.DataKey("CveMoneda"))
TxtNumeroCuenta.Text = gvrow.DataKey("Cuenta")
TxtCLABECB.Text = gvrow.DataKey("CLABE")
ChkEstatusPagoE.Checked = gvrow.DataKey("EstatusPagoElectronico").ToUpper().Contiene("TRUE", "1")
ChkEstatuscuenta.Checked = gvrow.DataKey("EstatusTexto").ToUpper().Contiene("TRUE", "1", "ACTIVO")
UpCuentasVancarias.Update()
RegistraScript("$('#DivCuentasVancarias').modal();")
'GvBancosCuentas.EditIndex = e.NewEditIndex
'CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
End Sub
Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit
GvBancosCuentas.EditIndex = -1
@@ -3082,6 +3120,8 @@ Partial Class RH_Personal
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim EstatusPagoElectronico = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
@@ -3136,7 +3176,7 @@ Partial Class RH_Personal
End If
Dim ObjCuentasBancos As New ClsGenerales
If CvePersonal > 0 Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion)