This commit is contained in:
2021-08-28 11:20:27 -07:00
6 changed files with 427 additions and 357 deletions

View File

@@ -5660,7 +5660,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "", Optional FechaPago As String = "", CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "", Optional FechaPago As String = "",
Optional diasinabiles As Integer = 0, Optional PorcentajePrimaVac As Decimal = -1, Optional diasinabiles As Integer = 0, Optional PorcentajePrimaVac As Decimal = -1,
Optional CveTipoPago As Integer = 0, Optional diasExtras As Integer = 0, Optional CveTipoPago As Integer = 0, Optional diasExtras As Integer = 0,
Optional Ejercicio As Integer = 0, Optional PrimaVacacional As Integer = 1, Optional CobrarImss As Integer = 0) As Boolean Optional Ejercicio As Integer = 0, Optional PrimaVacacional As Integer = 1, Optional CobrarImss As Integer = 0, Optional diasPago As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_SolicitudVacacionesAdd") DataAdapter("PA_RH_SolicitudVacacionesAdd")
@@ -5681,6 +5681,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
.Add("@PrimaVacacional", SqlDbType.Int).Value = PrimaVacacional .Add("@PrimaVacacional", SqlDbType.Int).Value = PrimaVacacional
.Add("@CobrarImss", SqlDbType.Int).Value = CobrarImss .Add("@CobrarImss", SqlDbType.Int).Value = CobrarImss
.Add("@diasPago", SqlDbType.Int).Value = diasPago
'.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles '.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles
End With End With

View File

@@ -11383,6 +11383,7 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("DifPSSat", GetType(Integer)) TmpDT.Columns.Add("DifPSSat", GetType(Integer))
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer)) TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
@@ -12380,6 +12381,10 @@ Partial Class Compras_Compras
Protected Sub DivirInsumo(sender As Object, e As EventArgs) Protected Sub DivirInsumo(sender As Object, e As EventArgs)
Dim index2 As Integer = 0 Dim index2 As Integer = 0
If Not TmpDT.Columns.Contains("Importe") Then
TmpDT.Columns.Add("Importe", GetType(Decimal))
End If
'LLena el AF vinculado para no perderlo 'LLena el AF vinculado para no perderlo
For Each Row As DataRow In TmpDT.Rows For Each Row As DataRow In TmpDT.Rows
If GvAFInsumos.Rows(index2).FCHiddenField("HdnCveAF").Value.ToEntero > 0 Then If GvAFInsumos.Rows(index2).FCHiddenField("HdnCveAF").Value.ToEntero > 0 Then

View File

@@ -1330,102 +1330,106 @@
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row"> <asp:Panel runat="server" ID="PnlVacacionesAdd">
<div class="col-md-6"> <div class="row">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacDiasFeriados" CssClass="form-control input-sm " runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacDiasFeriados">Días feriados</asp:Label>
<asp:RequiredFieldValidator ID="rfvvacDiasFeriados" runat="server" ControlToValidate="TxtvacDiasFeriados" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días feriados''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacDiasFeriados"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaPago" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacFechaPago">Fecha pago</asp:Label>
<ajax:MaskedEditExtender ID="MeeVacFechaPago" runat="server" TargetControlID="TxtvacFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CeeVacFechaPago" TargetControlID="TxtvacFechaPago" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvvacFechaPago" runat="server" ControlToValidate="TxtvacFechaPago" 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="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoVacFechaPago" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaPago"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacFechaInicio">Fecha Inicio</asp:Label>
<ajax:MaskedEditExtender ID="MeeVacFechaInicio" runat="server" TargetControlID="TxtvacFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CeeVacFechaInicio" TargetControlID="TxtvacFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvvacFechaInicio" runat="server" ControlToValidate="TxtvacFechaInicio" 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="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoVacFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacFechaFin">Fecha Fin</asp:Label>
<ajax:MaskedEditExtender ID="MeeVacFechaFin" runat="server" TargetControlID="TxtvacFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CeeVacFechaFin" TargetControlID="TxtvacFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvvacFechaFin" runat="server" ControlToValidate="TxtvacFechaFin" 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="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoVacFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" style="padding-top: 0px;">
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones" Style="padding-bottom: 0px; margin-bottom: 0px;">Forma de pago</asp:Label><br />
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" Style="margin-top: -4px;" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server">
<asp:ListItem Text="Pagadas por anticipado" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Por pagar" Value="2"></asp:ListItem>
<asp:ListItem Text="Trabajadas" Value="3"></asp:ListItem>
<asp:ListItem Text="Solo Prima Vacacional" Value="4"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvFormapagovacaciones" runat="server" ControlToValidate="DdlFormapagovacaciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cve Ramo Seguro''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones">
</asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoFormapagovacaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvFormapagovacaciones"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm " runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm " Text="2021" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div style="padding-top: 0px; padding-bottom: 0px;">
¿Prima Vacacional?
</div>
<asp:CheckBox ID="ChkVacPrimaVacacional" CssClass="chksino " Text=" " runat="server" />
</div>
<div class="col-md-6">
<div class="col-md-6"> <div class="col-md-6">
<div class="" style="padding-top: 0px;">
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones" Style="padding-bottom: 0px; margin-bottom: 0px; font-size: 12px; color: #888; font-weight: 400;">Forma de pago</asp:Label><br />
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server" OnSelectedIndexChanged="DdlFormapagovacaciones_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Pagar en fecha" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Pagar en periodo disfrutadas" Value="2"></asp:ListItem>
<asp:ListItem Text="Vacaciones trabajadas" Value="3"></asp:ListItem>
<asp:ListItem Text="Solo pagar" Value="4"></asp:ListItem>
<asp:ListItem Text="Solo disfrutar" Value="5"></asp:ListItem>
<asp:ListItem Text="Solo prima" Value="6"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvFormapagovacaciones" runat="server" ControlToValidate="DdlFormapagovacaciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma pago vacaciones''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoFormapagovacaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvFormapagovacaciones"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm " Text="2021" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>
</div>
</div>
</div>
<asp:Panel runat="server" ID="PnlVacfechas" CssClass="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacFechaInicio">Fecha Inicio</asp:Label>
<ajax:MaskedEditExtender ID="MeeVacFechaInicio" runat="server" TargetControlID="TxtvacFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CeeVacFechaInicio" TargetControlID="TxtvacFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvvacFechaInicio" runat="server" ControlToValidate="TxtvacFechaInicio" 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="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoVacFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacFechaFin">Fecha Fin</asp:Label>
<ajax:MaskedEditExtender ID="MeeVacFechaFin" runat="server" TargetControlID="TxtvacFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CeeVacFechaFin" TargetControlID="TxtvacFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvvacFechaFin" runat="server" ControlToValidate="TxtvacFechaFin" 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="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoVacFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
</asp:Panel>
<asp:Panel runat="server" ID="PnlVacDias" CssClass="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacDiasFeriados" CssClass="form-control input-sm " type="number" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacDiasFeriados">Días feriados</asp:Label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm " type="number" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label>
</div>
</div>
</asp:Panel>
<asp:Panel runat="server" ID="PnlVacFechapago" CssClass="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtvacFechaPago" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtvacFechaPago">Fecha pago</asp:Label>
<ajax:MaskedEditExtender ID="MeeVacFechaPago" runat="server" TargetControlID="TxtvacFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CeeVacFechaPago" TargetControlID="TxtvacFechaPago" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvvacFechaPago" runat="server" ControlToValidate="TxtvacFechaPago" 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="VG_Vacaciones"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoVacFechaPago" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaPago"></ajax:ValidatorCalloutExtender>
</div>
</div>
<asp:Panel runat="server" ID="PnlVacDiasPago" CssClass="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacDiasPago" CssClass="form-control input-sm " type="number" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacDiasPago">Días pago</asp:Label>
</div>
</asp:Panel>
</asp:Panel>
<asp:Panel runat="server" ID="PnlVacChecks" CssClass="row">
<div style="padding-top: 0px; padding-bottom: 0px;"> <div class="col-md-6" >
<div style="padding-top: 0px; padding-bottom: 0px; font-size: 12px; color: #888; font-weight: 400; white-space: nowrap;">
¿Prima Vacacional?
</div>
<asp:CheckBox ID="ChkVacPrimaVacacional" CssClass="chksino " Text=" " runat="server" />
</div>
<div class="col-md-6" >
<div style="padding-top: 0px; padding-bottom: 0px; font-size: 12px; color: #888; font-weight: 400; white-space: nowrap;">
¿Cobrar IMSS? ¿Cobrar IMSS?
</div> </div>
<asp:CheckBox ID="ChkVacCobrarIMSS" CssClass="chksino " Text=" " runat="server" /> <asp:CheckBox ID="ChkVacCobrarIMSS" CssClass="chksino " Text=" " runat="server" />
</div> </div>
</asp:Panel>
<div class="text-right">
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Guardar</asp:LinkButton>
</div> </div>
</div> </asp:Panel>
<div class="text-right">
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Guardar</asp:LinkButton>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1562,6 +1562,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
#region SobreRecibo #region SobreRecibo
#region SobreRecibo propiedades #region SobreRecibo propiedades
protected int SRCvePersonal protected int SRCvePersonal
@@ -1680,6 +1681,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
RegistraScript("$('#ModalConceptos').modal();"); RegistraScript("$('#ModalConceptos').modal();");
} }
#region Vacaciones
protected int CvePersonalVacaciones
{
get
{
if (ViewState["CvePersonalVacaciones"] == null) { return 0; }
else { return ViewState["CvePersonalVacaciones"].ToString().ToEntero(); }
}
set { ViewState["CvePersonalVacaciones"] = value; }
}
private void CargaVacaciones() private void CargaVacaciones()
{ {
ClsRH objRH = new ClsRH(); ClsRH objRH = new ClsRH();
@@ -1692,10 +1704,322 @@ public partial class Nomina_Nomina2 : ClsPaginas
else { GvVacaciones.DataSource = null; } else { GvVacaciones.DataSource = null; }
objRH.Dispose(); objRH.Dispose();
LnkSRVacacionesADD.Visible = false;
PnlVacacionesAdd.Visible = false;
GvVacaciones.DataBind(); GvVacaciones.DataBind();
UpGvVacaciones.Update(); UpGvVacaciones.Update();
} }
protected void LnkShowAddVacaciones_Click(object sender, EventArgs e)
{
LnkSRVacacionesADD.Visible = true;
PnlVacacionesAdd.Visible = true;
DdlFormapagovacaciones_SelectedIndexChanged(null, null);
ChkVacPrimaVacacional.Checked = true;
ChkVacCobrarIMSS.Checked = true;
}
protected void DdlFormapagovacaciones_SelectedIndexChanged(object sender, EventArgs e)
{
PnlVacfechas.Visible = false;
PnlVacDias.Visible = false;
PnlVacFechapago.Visible = false;
PnlVacDiasPago.Visible = false;
PnlVacChecks.Visible = false;
switch (DdlFormapagovacaciones.SelectedValue.ToEntero())
{
case 1://Pagar en fecha
PnlVacfechas.Visible = true;
PnlVacDias.Visible = true;
PnlVacFechapago.Visible = true;
PnlVacDiasPago.Visible = true;
PnlVacChecks.Visible = true;
break;
case 2://Pagar en periodo disfrutadas
PnlVacfechas.Visible = true;
PnlVacDias.Visible = true;
PnlVacChecks.Visible = true;
break;
case 3://Vacaciones trabajadas
PnlVacfechas.Visible = true;
PnlVacDias.Visible = true;
PnlVacDiasPago.Visible = false;
PnlVacFechapago.Visible = true;
//PnlVacChecks.Visible = true;
break;
case 4://Solo pagar
PnlVacFechapago.Visible = true;
PnlVacDiasPago.Visible = true;
PnlVacChecks.Visible = true;
break;
case 5://Solo disfrutar
PnlVacFechapago.Visible = true;
PnlVacDiasPago.Visible = true;
break;
case 6://Solo prima
PnlVacFechapago.Visible = true;
PnlVacDiasPago.Visible = true;
break;
}
/*
*/
}
protected void LnkSRVacacionesUP_Click(object sender, EventArgs e)
{
}
protected void LnkSRVacacionesADD_Click(object sender, EventArgs e)
{
DateTime fInicio = TxtvacFechaInicio.Text.ToDate();
DateTime fFin = TxtvacFechaFin.Text.ToDate();
string fechapago = TxtvacFechaPago.Text.ToDate().ToString("yyyy/MM/dd");
int diasinhabil = TxtvacDiasFeriados.Text.ToEntero();
// Dim motivoVacaciones As String = TxtMotivoVacaciones.Text
int VacCveSupervisor = 0;
int VacFolioActual = 0;
if (fInicio <= fFin)
{
using (ClsRH objRHx = new ClsRH())
{
if (objRHx.VacacionesResumenGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
{
if (objRHx.DtResultados.Rows.Count > 0)
{
VacCveSupervisor = objRHx.DtResultados.Rows[0]["SupervisorCorreo"].ToString().ToEntero();
}
}
if (objRHx.VacacionesGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
{
if (objRHx.DtResultados.Rows.Count > 0)
{
VacFolioActual = objRHx.DtResultados.Compute("Max(Folio)", string.Empty).ToString().ToEntero();
}
}
}
VacFolioActual = VacFolioActual + 1;
ClsRH objRH = new ClsRH();
// Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
bool continuar = objRH.SolicitudVacacionesAdd(SRCvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago: fechapago,
diasinabiles: diasinhabil, CveTipoPago: DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras: TxtVacDiasExtra.Text.ToEntero(),
Ejercicio: TxtVacEjercicio.Text.ToEntero(), PrimaVacacional:(ChkVacPrimaVacacional.Checked?1:0),CobrarImss: (ChkVacCobrarIMSS.Checked ? 1 : 0), diasPago: TxtVacDiasPago.Text.ToEntero()
);
if (objRH.DtResultados.Rows.Count > 0)
{
string ShowError = objRH.DtResultados.Rows[0]["ShowError"].ToString();
if (ShowError.Length > 0)
{
Alert(ShowError, TipoMensaje.MsgAdvertencia);
continuar = false;
}
}
objRH.Dispose();
if (continuar)
{
TxtvacFechaInicio.Text = "";
TxtvacFechaFin.Text = "";
TxtvacFechaPago.Text = "";
TxtvacDiasFeriados.Text = "";
CargaVacaciones();
//CargaVacacionesResumenPeriodoActual();
//VacacionesMandaCorreoSupervisor("Solicitud Vacaciones " + NombreCompleto, VacSupervisorCorreo, VacSupervisorNombre, NombreCompleto, fInicio, fFin);
Alert("Las vacaciones se han solicitado");
}
}
else { Alert("La fecha Inicial debe ser inferior a la fecha final.", TipoMensaje.MsgAdvertencia); }
}
protected void GvVacaciones_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
bool _Estatus = bool.Parse(e.Row.DBCampo("Estatus").ToString());
string _Documento = e.Row.DataKey("Documento");
int _CveAutoriza = e.Row.DataKey("CveAutoriza").ToEntero();
string RutaDocuemntoAutorizacion = string.Format(@"{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, SRCvePersonal, _Documento);
LinkButton lnkDescargaFormato = e.Row.FCLinkButton("ImgDescargaFormato");
LinkButton lnkDescargaAutorizacion = e.Row.FCLinkButton("ImgDescargaAutorizacion");
LinkButton lnkEditar = e.Row.FCLinkButton("ImgEditar");
lnkEditar.Visible = true;
lnkDescargaFormato.Visible = true;
if (_CveAutoriza > 0 | !_Estatus)
{
lnkEditar.Visible = false;
lnkDescargaFormato.Visible = false;
}
// ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lnkDescargaFormato)
if (File.Exists(RutaDocuemntoAutorizacion) & _Estatus) { lnkDescargaAutorizacion.Visible = true; }
else { lnkDescargaAutorizacion.Visible = false; }
if (lnkDescargaAutorizacion != null && lnkDescargaAutorizacion.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaAutorizacion); }
if (lnkDescargaFormato != null && lnkDescargaFormato.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaFormato); }
}
}
protected void LnkEliminarSolicitud_Click(object sender, EventArgs e)
{
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
int CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
ClsRH objRH = new ClsRH();
if (objRH.RemoverSolicitudVacaciones(CvePersonalVacaciones))
{
CargaVacaciones();
Alert("Las vacaciones se ha eliminado");
}
objRH.Dispose();
}
public void Edit_ClickVacacionDia(object sender, EventArgs e)
{
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
//VacFolio = GvRow.DataKey("Folio").ToString().ToEntero;
TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy");
TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate().ToString("dd/MM/yyyy");
RegistraScript("$('#divEditarDiaVacacion').modal({ backdrop: 'static', keyboard: false});");
UpModalEditarDiaVacacion.Update();
}
protected void BtnEditarDiaVacacionModal_Click(object sender, EventArgs e)
{
using (ClsRH objRH = new ClsRH())
{
string FileExtension = "-1";
List<Archivo> Filesgral = TxtFileFormatoVacaciones.getfiles().Archivos;
string Documento = "";
foreach (Archivo fileItem in Filesgral)
{
try
{
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
Documento = $"Vacaciones_{CvePersonalVacaciones}.{FileExtension}";
string[] tempArray;
tempArray = fileItem.filename.ToString().Split("-".ToCharArray());
string rutaDestino = $@"{UsuarioActual.Empresa.Ruta}Personal\{SRCvePersonal}\Vacaciones\{Documento}";
if (!System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\"))
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\");
if (System.IO.File.Exists(rutaDestino))
System.IO.File.Delete(rutaDestino);
System.IO.File.Move(fileItem.FileUrl, rutaDestino);
TxtFileFormatoVacaciones.Text = "";
}
catch (Exception ex)
{
this.OnError("Error al cargar Formato vacaciones", ex);
}
}
if (Documento.Length > 0)
{
if (objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, SRCvePersonal, UsuarioActual.CveUsuario, Documento))
Alert("Las vacaciones se han autorizado.");
UpModalEditarDiaVacacion.Update();
CargaVacaciones();
// CargaVacacionesResumenPeriodoActual();
RegistraScript("$('#divEditarDiaVacacion').modal('hide');");
}
else { Alert("debe ingresar un documento para poder autorizar la solicitud", TipoMensaje.MsgAdvertencia); }
}
}
public void DownLoad_ClickSolicitudVacaciones(object sender, EventArgs e)
{
/*
GridViewRow GvRow = (GridViewRow)(LinkButton)sender.NamingContainer;
// Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
// DescarSolicitudVacaciones(Folio)
string RutaFormato = string.Format(@"{0}Formatos\SolicitudVacaciones.docx", UsuarioActual.Empresa.Ruta);
string NombreEmpleado = string.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text);
string Codigo = TxtCodigo.Text;
string Departamento = DdlDepartamento.SelectedItem.Text;
string JefeInmediato = DdlSupervisorOrganigrama.SelectedItem.Text;
DateTime fechaIngreso = TxtFechaIngreso.Text.ToDate();
int Periodoingreso = fechaIngreso.ToString("MMdd").ToEntero();
int PeriodoInicio = GvRow.DataKey("FechaInicio").ToDate().ToString("MMdd").ToEntero();
string FechaInicio = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy");
string FechaFin = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy");
string diasPermiso = GvRow.DataKey("Dias");
string MotivoPermiso = GvRow.DataKey("Motivo");
string Puesto = DdlPuesto.SelectedItem.Value;
string Fecha = DateTime.Now.ToString("dd/MM/yyyy");
string Solicitante = UsuarioActual.Nombre;
int anio = GvRow.DataKey("FechaInicio").ToDate().Year;
string FechaPeriodo = GvRow.DataKey("Periodo");
if (Periodoingreso > PeriodoInicio)
anio = anio - 1;
if (File.Exists(RutaFormato))
{
clsGemBoxDocument objGemDocument = new clsGemBoxDocument(RutaFormato);
List<TagsDocumentos> ListaTags = new List<TagsDocumentos>();
ListaTags = GetDatosTagsDocumentos();
ListaTags.Add(new TagsDocumentos("{Solicitante}", Solicitante));
ListaTags.Add(new TagsDocumentos("{Fecha}", Fecha));
ListaTags.Add(new TagsDocumentos("{NombreEmpleado}", NombreEmpleado));
ListaTags.Add(new TagsDocumentos("{Codigo}", Codigo));
ListaTags.Add(new TagsDocumentos("{Departamento}", Departamento));
ListaTags.Add(new TagsDocumentos("{JefeInmediato}", JefeInmediato));
ListaTags.Add(new TagsDocumentos("{FechaInicio}", FechaInicio));
ListaTags.Add(new TagsDocumentos("{FechaFin}", FechaFin));
ListaTags.Add(new TagsDocumentos("{diasPermiso}", diasPermiso));
ListaTags.Add(new TagsDocumentos("{MotivoPermiso}", MotivoPermiso));
ListaTags.Add(new TagsDocumentos("{Puesto}", Puesto));
ListaTags.Add(new TagsDocumentos("{anio}", anio.ToString()));
ListaTags.Add(new TagsDocumentos("{FechaPeriodo}", FechaPeriodo));
objGemDocument.SustituirTags(ListaTags);
// objGemDocument.GuardarStream()
objGemDocument.GuardarStreamPDF();
byte[] bytesInStream = objGemDocument.GetBytesDocumento();
// Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
objGemDocument.Dispose();
Response.Clear();
Response.ContentType = "application/force-download";
Response.AddHeader("content-disposition", "attachment; filename=" + CvePersonal + "_Solicitud_Vacaciones_" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".pdf");
Response.BinaryWrite(bytesInStream);
Response.End();
}
else
Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia);*/
}
#endregion
protected void LnkImportexCalculo_Click(object sender, EventArgs e) protected void LnkImportexCalculo_Click(object sender, EventArgs e)
{ {
@@ -5741,266 +6065,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
#endregion #endregion
protected void LnkSRVacacionesUP_Click(object sender, EventArgs e)
{
}
protected void LnkSRVacacionesADD_Click(object sender, EventArgs e)
{
DateTime fInicio = TxtvacFechaInicio.Text.ToDate();
DateTime fFin = TxtvacFechaFin.Text.ToDate();
string fechapago = TxtvacFechaPago.Text.ToDate().ToString("yyyy/MM/dd");
int diasinhabil = TxtvacDiasFeriados.Text.ToEntero();
// Dim motivoVacaciones As String = TxtMotivoVacaciones.Text
int VacCveSupervisor = 0;
int VacFolioActual = 0;
if (fInicio <= fFin)
{
using (ClsRH objRHx = new ClsRH())
{
if (objRHx.VacacionesResumenGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
{
if (objRHx.DtResultados.Rows.Count > 0)
{
VacCveSupervisor = objRHx.DtResultados.Rows[0]["SupervisorCorreo"].ToString().ToEntero();
}
}
if (objRHx.VacacionesGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
{
if (objRHx.DtResultados.Rows.Count > 0)
{
VacFolioActual = objRHx.DtResultados.Compute("Max(Folio)", string.Empty).ToString().ToEntero();
}
}
}
VacFolioActual = VacFolioActual + 1;
ClsRH objRH = new ClsRH();
// Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
bool continuar = objRH.SolicitudVacacionesAdd(SRCvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago: fechapago,
diasinabiles: diasinhabil, CveTipoPago: DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras: TxtVacDiasExtra.Text.ToEntero());
if (objRH.DtResultados.Rows.Count > 0)
{
string ShowError = objRH.DtResultados.Rows[0]["ShowError"].ToString();
if (ShowError.Length > 0)
{
Alert(ShowError, TipoMensaje.MsgAdvertencia);
continuar = false;
}
}
objRH.Dispose();
if (continuar)
{
TxtvacFechaInicio.Text = "";
TxtvacFechaFin.Text = "";
TxtvacFechaPago.Text = "";
TxtvacDiasFeriados.Text = "";
CargaVacaciones();
//CargaVacacionesResumenPeriodoActual();
//VacacionesMandaCorreoSupervisor("Solicitud Vacaciones " + NombreCompleto, VacSupervisorCorreo, VacSupervisorNombre, NombreCompleto, fInicio, fFin);
Alert("Las vacaciones se han solicitado");
}
}
else { Alert("La fecha Inicial debe ser inferior a la fecha final.", TipoMensaje.MsgAdvertencia); }
}
protected void GvVacaciones_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
bool _Estatus = bool.Parse(e.Row.DBCampo("Estatus").ToString());
string _Documento = e.Row.DataKey("Documento");
int _CveAutoriza = e.Row.DataKey("CveAutoriza").ToEntero();
string RutaDocuemntoAutorizacion = string.Format(@"{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, SRCvePersonal, _Documento);
LinkButton lnkDescargaFormato = e.Row.FCLinkButton("ImgDescargaFormato");
LinkButton lnkDescargaAutorizacion = e.Row.FCLinkButton("ImgDescargaAutorizacion");
LinkButton lnkEditar = e.Row.FCLinkButton("ImgEditar");
lnkEditar.Visible = true;
lnkDescargaFormato.Visible = true;
if (_CveAutoriza > 0 | !_Estatus)
{
lnkEditar.Visible = false;
lnkDescargaFormato.Visible = false;
}
// ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lnkDescargaFormato)
if (File.Exists(RutaDocuemntoAutorizacion) & _Estatus) { lnkDescargaAutorizacion.Visible = true; }
else { lnkDescargaAutorizacion.Visible = false; }
if (lnkDescargaAutorizacion != null && lnkDescargaAutorizacion.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaAutorizacion); }
if (lnkDescargaFormato != null && lnkDescargaFormato.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaFormato); }
}
}
protected void LnkEliminarSolicitud_Click(object sender, EventArgs e)
{
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
int CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
ClsRH objRH = new ClsRH();
if (objRH.RemoverSolicitudVacaciones(CvePersonalVacaciones))
{
CargaVacaciones();
Alert("Las vacaciones se ha eliminado");
}
objRH.Dispose();
}
protected int CvePersonalVacaciones
{
get
{
if (ViewState["CvePersonalVacaciones"] == null) { return 0; }
else { return ViewState["CvePersonalVacaciones"].ToString().ToEntero(); }
}
set { ViewState["CvePersonalVacaciones"] = value; }
}
public void Edit_ClickVacacionDia(object sender, EventArgs e)
{
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
//VacFolio = GvRow.DataKey("Folio").ToString().ToEntero;
TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy");
TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate().ToString("dd/MM/yyyy");
RegistraScript("$('#divEditarDiaVacacion').modal({ backdrop: 'static', keyboard: false});");
UpModalEditarDiaVacacion.Update();
}
protected void BtnEditarDiaVacacionModal_Click(object sender, EventArgs e)
{
using (ClsRH objRH = new ClsRH())
{
string FileExtension = "-1";
List<Archivo> Filesgral = TxtFileFormatoVacaciones.getfiles().Archivos;
string Documento = "";
foreach (Archivo fileItem in Filesgral)
{
try
{
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
Documento = $"Vacaciones_{CvePersonalVacaciones}.{FileExtension}";
string[] tempArray;
tempArray = fileItem.filename.ToString().Split("-".ToCharArray());
string rutaDestino = $@"{UsuarioActual.Empresa.Ruta}Personal\{SRCvePersonal}\Vacaciones\{Documento}";
if (!System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\"))
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\");
if (System.IO.File.Exists(rutaDestino))
System.IO.File.Delete(rutaDestino);
System.IO.File.Move(fileItem.FileUrl, rutaDestino);
TxtFileFormatoVacaciones.Text = "";
}
catch (Exception ex)
{
this.OnError("Error al cargar Formato vacaciones", ex);
}
}
if (Documento.Length > 0)
{
if (objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, SRCvePersonal, UsuarioActual.CveUsuario, Documento))
Alert("Las vacaciones se han autorizado.");
UpModalEditarDiaVacacion.Update();
CargaVacaciones();
// CargaVacacionesResumenPeriodoActual();
RegistraScript("$('#divEditarDiaVacacion').modal('hide');");
}
else { Alert("debe ingresar un documento para poder autorizar la solicitud", TipoMensaje.MsgAdvertencia); }
}
}
public void DownLoad_ClickSolicitudVacaciones(object sender, EventArgs e)
{
/*
GridViewRow GvRow = (GridViewRow)(LinkButton)sender.NamingContainer;
// Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
// DescarSolicitudVacaciones(Folio)
string RutaFormato = string.Format(@"{0}Formatos\SolicitudVacaciones.docx", UsuarioActual.Empresa.Ruta);
string NombreEmpleado = string.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text);
string Codigo = TxtCodigo.Text;
string Departamento = DdlDepartamento.SelectedItem.Text;
string JefeInmediato = DdlSupervisorOrganigrama.SelectedItem.Text;
DateTime fechaIngreso = TxtFechaIngreso.Text.ToDate();
int Periodoingreso = fechaIngreso.ToString("MMdd").ToEntero();
int PeriodoInicio = GvRow.DataKey("FechaInicio").ToDate().ToString("MMdd").ToEntero();
string FechaInicio = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy");
string FechaFin = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy");
string diasPermiso = GvRow.DataKey("Dias");
string MotivoPermiso = GvRow.DataKey("Motivo");
string Puesto = DdlPuesto.SelectedItem.Value;
string Fecha = DateTime.Now.ToString("dd/MM/yyyy");
string Solicitante = UsuarioActual.Nombre;
int anio = GvRow.DataKey("FechaInicio").ToDate().Year;
string FechaPeriodo = GvRow.DataKey("Periodo");
if (Periodoingreso > PeriodoInicio)
anio = anio - 1;
if (File.Exists(RutaFormato))
{
clsGemBoxDocument objGemDocument = new clsGemBoxDocument(RutaFormato);
List<TagsDocumentos> ListaTags = new List<TagsDocumentos>();
ListaTags = GetDatosTagsDocumentos();
ListaTags.Add(new TagsDocumentos("{Solicitante}", Solicitante));
ListaTags.Add(new TagsDocumentos("{Fecha}", Fecha));
ListaTags.Add(new TagsDocumentos("{NombreEmpleado}", NombreEmpleado));
ListaTags.Add(new TagsDocumentos("{Codigo}", Codigo));
ListaTags.Add(new TagsDocumentos("{Departamento}", Departamento));
ListaTags.Add(new TagsDocumentos("{JefeInmediato}", JefeInmediato));
ListaTags.Add(new TagsDocumentos("{FechaInicio}", FechaInicio));
ListaTags.Add(new TagsDocumentos("{FechaFin}", FechaFin));
ListaTags.Add(new TagsDocumentos("{diasPermiso}", diasPermiso));
ListaTags.Add(new TagsDocumentos("{MotivoPermiso}", MotivoPermiso));
ListaTags.Add(new TagsDocumentos("{Puesto}", Puesto));
ListaTags.Add(new TagsDocumentos("{anio}", anio.ToString()));
ListaTags.Add(new TagsDocumentos("{FechaPeriodo}", FechaPeriodo));
objGemDocument.SustituirTags(ListaTags);
// objGemDocument.GuardarStream()
objGemDocument.GuardarStreamPDF();
byte[] bytesInStream = objGemDocument.GetBytesDocumento();
// Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
objGemDocument.Dispose();
Response.Clear();
Response.ContentType = "application/force-download";
Response.AddHeader("content-disposition", "attachment; filename=" + CvePersonal + "_Solicitud_Vacaciones_" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".pdf");
Response.BinaryWrite(bytesInStream);
Response.End();
}
else
Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia);*/
}
private List<TagsDocumentos> GetDatosTagsDocumentos() private List<TagsDocumentos> GetDatosTagsDocumentos()
{ {
var ListaTagsDocumentost = new List<TagsDocumentos>(); var ListaTagsDocumentost = new List<TagsDocumentos>();
@@ -6782,10 +6846,4 @@ public partial class Nomina_Nomina2 : ClsPaginas
Response.End(); Response.End();
} }
protected void LnkShowAddVacaciones_Click(object sender, EventArgs e)
{
LnkSRVacacionesADD.Visible = true;
}
} }

View File

@@ -912,7 +912,7 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtCURP" runat="server" MaxLength="18"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtCURP" runat="server" MaxLength="18"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtCURP" Text="CURP:"></asp:Label> <asp:Label runat="server" AssociatedControlID="TxtCURP" Text="CURP:"></asp:Label>
<asp:RequiredFieldValidator ID="RfvTxtCURP" runat="server" ControlToValidate="TxtCURP" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Género''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarAddS"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvTxtCURP" runat="server" ControlToValidate="TxtCURP" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CURP''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarAddS"></asp:RequiredFieldValidator>
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">

View File

@@ -310,6 +310,8 @@