This commit is contained in:
@@ -127,6 +127,9 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
.form-group.form-md-line-input .form-control.input-sm ~ label {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -1104,7 +1107,7 @@
|
|||||||
<asp:UpdatePanel ID="UPSRVaaciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPSRVaaciones" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-7">
|
||||||
<div class="portlet light xspadding bordered " id="pnlvacacionesgv">
|
<div class="portlet light xspadding bordered " id="pnlvacacionesgv">
|
||||||
|
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
@@ -1117,10 +1120,49 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<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"
|
||||||
|
DataKeyNames="CvePersonalVacaciones,Periodo,FechaIng,Estatus,CveAutoriza,Autoriza,Dias,Usuario,SEstatus,Folio,FechaInicio,FechaFin,Documento,Motivo"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GvVacaciones" data-sort="true" data-height="300" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False" OnRowDataBound="GvVacaciones_RowDataBound">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField Visible="true" DataField="Periodo" HeaderText="Periodo" HeaderStyle-Width="80" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField Visible="true" DataField="Dias" HeaderText="Días" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--<asp:BoundField Visible="true" DataField="Autorizo" ItemStyle-CssClass="truncate" HeaderText="Autorizo" ItemStyle-HorizontalAlign="Left" />--%>
|
||||||
|
<asp:BoundField Visible="true" DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" HeaderText="FechaIng" HeaderStyle-Width="80" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<%--<asp:BoundField Visible="true" DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />--%>
|
||||||
|
<asp:TemplateField ItemStyle-Width="124">
|
||||||
|
<ItemTemplate>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<asp:LinkButton ID="LnkEliminarSolicitud" runat="server" OnClick="LnkEliminarSolicitud_Click" AlternateText="Eliminar" CausesValidation="False" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la solicitud de vacaciones?" data-btn-ok-label="si"
|
||||||
|
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-trash' title='Eliminar' ></i>" />
|
||||||
|
<asp:LinkButton ID="ImgEditar" runat="server" OnClick="Edit_ClickVacacionDia" AlternateText="Autorizar" CausesValidation="False"
|
||||||
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil' title='Autorizar' ></i>" />
|
||||||
|
<asp:LinkButton ID="ImgDescargaFormato" runat="server" OnClick="DownLoad_ClickSolicitudVacaciones" AlternateText="Editar" CausesValidation="False"
|
||||||
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-download ' title='Descarga Solicitud' ></i>" />
|
||||||
|
<asp:LinkButton ID="ImgDescargaAutorizacion" runat="server" OnClick="DownLoad_ClickSolicitudAutorizacion" AlternateText="Editar" CausesValidation="False"
|
||||||
|
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-download ' title='Descarga autorización' ></i>" />
|
||||||
|
</div>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
|
||||||
|
<%--<asp:PostBackTrigger ="LnkListaRaya" />--%>
|
||||||
|
<%--<asp:AsyncPostBackTrigger EventName="DownLoad_ClickSolicitudVacaciones" />
|
||||||
|
<asp:AsyncPostBackTrigger EventName="DownLoad_ClickSolicitudAutorizacion" />--%>
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-5">
|
||||||
<div class="portlet light xspadding bordered " id="pnlvacacionesform">
|
<div class="portlet light xspadding bordered " id="pnlvacacionesform">
|
||||||
|
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
@@ -1138,59 +1180,49 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtvacDiasFeriados" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
<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>
|
<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>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacDiasFeriados"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtvacDiasFeriados">Días feriados</asp:Label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<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: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: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>
|
<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>
|
<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>
|
<ajax:ValidatorCalloutExtender ID="VcoVacFechaPago" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaPago"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaPago">Fecha pago</asp:Label>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<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: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: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>
|
<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>
|
<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>
|
<ajax:ValidatorCalloutExtender ID="VcoVacFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaInicio">Fecha Inicio</asp:Label>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<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: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: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>
|
<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>
|
<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>
|
<ajax:ValidatorCalloutExtender ID="VcoVacFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaFin"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaFin">Fecha Fin</asp:Label>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-primary" ValidationGroup="VGMNom_" runat="server">Actualizar</asp:LinkButton>
|
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
|
||||||
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VGMNom_" runat="server">Agregar</asp:LinkButton>
|
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Agregar</asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1500,12 +1500,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
LblEmpleado.Text = Nombre;
|
LblEmpleado.Text = Nombre;
|
||||||
TabPersonal.ActiveTabIndex = 0;
|
TabPersonal.ActiveTabIndex = 0;
|
||||||
mostrarConceptos();
|
mostrarConceptos();
|
||||||
|
CargaVacaciones();
|
||||||
pnlAddupMovto.Visible = false;
|
pnlAddupMovto.Visible = false;
|
||||||
CargaMovtoPermanente();
|
CargaMovtoPermanente();
|
||||||
CargaPersonalIncapacidad();
|
CargaPersonalIncapacidad();
|
||||||
RegistraScript("$('#ModalConceptos').modal();");
|
RegistraScript("$('#ModalConceptos').modal();");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CargaVacaciones()
|
||||||
|
{
|
||||||
|
ClsRH objRH = new ClsRH();
|
||||||
|
|
||||||
|
if (objRH.VacacionesGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
|
||||||
|
{
|
||||||
|
GvVacaciones.DataSource = objRH.DtResultados;
|
||||||
|
|
||||||
|
}
|
||||||
|
else { GvVacaciones.DataSource = null; }
|
||||||
|
|
||||||
|
objRH.Dispose();
|
||||||
|
GvVacaciones.DataBind();
|
||||||
|
UpGvVacaciones.Update();
|
||||||
|
}
|
||||||
|
|
||||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -2714,7 +2730,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2}, S.D.I.:{2:N2}, S.B.C.:{3:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"], drow2["SalarioDiarioIntegrado"], drow2["SalarioDiarioIMSS"])); cell.Blocks.Add(paragraphh);
|
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2}, S.D.I.:{2:N2}, S.B.C.:{3:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"], drow2["SalarioDiarioIntegrado"], drow2["SalarioDiarioIMSS"])); cell.Blocks.Add(paragraphh);
|
||||||
paragraphh.ParagraphFormat.Style = styilo;
|
paragraphh.ParagraphFormat.Style = styilo;
|
||||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2},Incapacidad:{4}, Centro de costos: {3}", drow2["DiasLaborados"], drow2["DiasRetardos"], drow2["DiasFaltados"], drow2["SubProyecto"],drow2["DiasIncapacidad"])); cell.Blocks.Add(paragraphh);
|
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2},Incapacidad:{4}, Centro de costos: {3}", drow2["DiasLaborados"], drow2["DiasRetardos"], drow2["DiasFaltados"], drow2["SubProyecto"], drow2["DiasIncapacidad"])); cell.Blocks.Add(paragraphh);
|
||||||
paragraphh.ParagraphFormat.Style = styilo;
|
paragraphh.ParagraphFormat.Style = styilo;
|
||||||
|
|
||||||
row = new GemBox.Document.Tables.TableRow(document);
|
row = new GemBox.Document.Tables.TableRow(document);
|
||||||
@@ -2958,7 +2974,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Total Centro de costos {0}", SubProyecto.ToUpper()));
|
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Total Centro de costos {0}", SubProyecto.ToUpper()));
|
||||||
paragraphh.ParagraphFormat.Style = styilostrong;
|
paragraphh.ParagraphFormat.Style = styilostrong;
|
||||||
|
|
||||||
|
|
||||||
section.Blocks.Add(paragraphh);
|
section.Blocks.Add(paragraphh);
|
||||||
#region "totaldepto"
|
#region "totaldepto"
|
||||||
{
|
{
|
||||||
@@ -3687,7 +3703,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
|
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
|
||||||
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
|
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage);
|
||||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("Total","CvePersonal > 0"))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
|
paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("Total", "CvePersonal > 0"))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
|
||||||
|
|
||||||
paragraphh.ParagraphFormat.Style = styilostrong;
|
paragraphh.ParagraphFormat.Style = styilostrong;
|
||||||
|
|
||||||
@@ -4188,126 +4204,133 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", FiltroCvePersonal), "", getcolumnas);
|
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", FiltroCvePersonal), "", getcolumnas);
|
||||||
DataTable dtconp = null;
|
DataTable dtconp = null;
|
||||||
int CvePeriodoSeleccionado = DdlPeriodo.SelectedValue.ToEntero();//cambiar reparar
|
int CvePeriodoSeleccionado = DdlPeriodo.SelectedValue.ToEntero();//cambiar reparar
|
||||||
#region PropNomina
|
if (FiltCveSubProyecto == -1 && DdlRegimenContratacion.SelectedValue == "-1")
|
||||||
int CvePersonal = 0;
|
|
||||||
int CveNomina = 0;
|
|
||||||
int CveMetodoPago = 0;
|
|
||||||
double SubTotal = 0;
|
|
||||||
double Total = 0;
|
|
||||||
int CveMoneda = 1;
|
|
||||||
#endregion
|
|
||||||
#region PropNominaDetalle
|
|
||||||
int CveConcepto = 0;
|
|
||||||
decimal ImporteConcepto = 0, ImporteGravadoConcepto = 0, ImporteExentoConcepto = 0, ImporteValor = 0;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
using (ClsNominas objNomina = new ClsNominas())
|
|
||||||
{
|
{
|
||||||
objNomina.IniciaTransacSQL();
|
#region PropNomina
|
||||||
foreach (DataRow rtemp in dtr.Rows)
|
int CvePersonal = 0;
|
||||||
{
|
int CveNomina = 0;
|
||||||
CveNomina = 0;
|
int CveMetodoPago = 0;
|
||||||
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
double SubTotal = 0;
|
||||||
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
double Total = 0;
|
||||||
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
|
int CveMoneda = 1;
|
||||||
Total = rtemp["Total"].ToString().ToDouble();
|
#endregion
|
||||||
if (CvePersonal > 0)
|
#region PropNominaDetalle
|
||||||
{
|
int CveConcepto = 0;
|
||||||
if (continuar)
|
decimal ImporteConcepto = 0, ImporteGravadoConcepto = 0, ImporteExentoConcepto = 0, ImporteValor = 0;
|
||||||
{
|
#endregion
|
||||||
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
|
|
||||||
if (objNomina.DtResultados.Rows.Count > 0)
|
|
||||||
|
using (ClsNominas objNomina = new ClsNominas())
|
||||||
|
{
|
||||||
|
objNomina.IniciaTransacSQL();
|
||||||
|
foreach (DataRow rtemp in dtr.Rows)
|
||||||
|
{
|
||||||
|
CveNomina = 0;
|
||||||
|
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
||||||
|
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
||||||
|
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
|
||||||
|
Total = rtemp["Total"].ToString().ToDouble();
|
||||||
|
if (CvePersonal > 0)
|
||||||
|
{
|
||||||
|
if (continuar)
|
||||||
|
{
|
||||||
|
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
CveNomina = objNomina.CveNomina;
|
|
||||||
}
|
if (objNomina.DtResultados.Rows.Count > 0)
|
||||||
else
|
|
||||||
{
|
|
||||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
|
||||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
{
|
||||||
CveNomina = objNomina.CveNomina;
|
CveNomina = objNomina.CveNomina;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
continuar = false;
|
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||||
|
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
CveNomina = objNomina.CveNomina;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continuar = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (CveNomina == 0)
|
||||||
if (CveNomina == 0)
|
|
||||||
{
|
|
||||||
continuar = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (continuar)
|
|
||||||
{
|
|
||||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND Importe<>0", CvePersonal));
|
|
||||||
foreach (DataRow rcon in dtconp.Rows)
|
|
||||||
{
|
{
|
||||||
|
continuar = false;
|
||||||
|
}
|
||||||
|
|
||||||
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
|
|
||||||
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
|
if (continuar)
|
||||||
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
|
{
|
||||||
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND Importe<>0", CvePersonal));
|
||||||
ImporteValor = rcon["Valor"].ToString().ToDecimal();
|
foreach (DataRow rcon in dtconp.Rows)
|
||||||
if (continuar)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario))
|
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
|
||||||
|
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
|
||||||
|
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
|
||||||
|
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||||
|
ImporteValor = rcon["Valor"].ToString().ToDecimal();
|
||||||
|
if (continuar)
|
||||||
{
|
{
|
||||||
continuar = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario))
|
||||||
|
{
|
||||||
|
continuar = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (continuar)
|
||||||
|
{
|
||||||
|
decimal SalarioDiario = rtemp["SalarioDiario"].ToString().ToEntero();
|
||||||
|
decimal SalarioDiarioIMSS = rtemp["SalarioDiarioIMSS"].ToString().ToEntero();
|
||||||
|
decimal SalarioDiarioIntegrado = rtemp["SalarioDiarioIntegrado"].ToString().ToEntero();
|
||||||
|
int DiasLaborados = rtemp["DiasLaborados"].ToString().ToEntero();
|
||||||
|
int DiasFaltados = rtemp["DiasFaltados"].ToString().ToEntero();
|
||||||
|
int DiasVacaciones = rtemp["DiasVacaciones"].ToString().ToEntero();
|
||||||
|
int DiasIncapacidad = rtemp["DiasIncapacidad"].ToString().ToEntero();
|
||||||
|
continuar = objNomina.PA_Nom_NominasAutorizarUP(CvePersonal, CvePeriodoSeleccionado, SalarioDiario, SalarioDiarioIMSS, SalarioDiarioIntegrado, 0, 0, Total, SubTotal, DiasLaborados, DiasFaltados, DiasVacaciones, DiasIncapacidad);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (continuar)
|
}
|
||||||
{
|
|
||||||
decimal SalarioDiario = rtemp["SalarioDiario"].ToString().ToEntero();
|
|
||||||
decimal SalarioDiarioIMSS = rtemp["SalarioDiarioIMSS"].ToString().ToEntero();
|
|
||||||
decimal SalarioDiarioIntegrado = rtemp["SalarioDiarioIntegrado"].ToString().ToEntero();
|
if (continuar)
|
||||||
int DiasLaborados = rtemp["DiasLaborados"].ToString().ToEntero();
|
{
|
||||||
int DiasFaltados = rtemp["DiasFaltados"].ToString().ToEntero();
|
continuar = objNomina.AutorizaNom_Nominas(-1, CvePeriodoSeleccionado, true);
|
||||||
int DiasVacaciones = rtemp["DiasVacaciones"].ToString().ToEntero();
|
}
|
||||||
int DiasIncapacidad = rtemp["DiasIncapacidad"].ToString().ToEntero();
|
|
||||||
continuar = objNomina.PA_Nom_NominasAutorizarUP(CvePersonal, CvePeriodoSeleccionado, SalarioDiario, SalarioDiarioIMSS, SalarioDiarioIntegrado, 0, 0, Total, SubTotal, DiasLaborados, DiasFaltados, DiasVacaciones, DiasIncapacidad);
|
if (continuar)
|
||||||
}
|
{
|
||||||
|
objNomina.Commit();
|
||||||
|
Alert("La nomina se autorizó correctamente.");
|
||||||
|
cargaDatos();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
objNomina.RollBack();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (dtr != null)
|
||||||
|
|
||||||
|
|
||||||
if (continuar)
|
|
||||||
{
|
{
|
||||||
continuar = objNomina.AutorizaNom_Nominas(-1, CvePeriodoSeleccionado, true);
|
dtr.Dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (dtconp != null)
|
||||||
if (continuar)
|
|
||||||
{
|
{
|
||||||
objNomina.Commit();
|
dtconp.Dispose();
|
||||||
Alert("La nomina se autorizó correctamente.");
|
|
||||||
cargaDatos();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
objNomina.RollBack();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dtr != null)
|
else
|
||||||
{
|
{
|
||||||
dtr.Dispose();
|
Alert("para poder autorizar debe seleccionar a todos en el centro de costo y en Régimen de contratación.", TipoMensaje.MsgAdvertencia);
|
||||||
|
|
||||||
}
|
|
||||||
if (dtconp != null)
|
|
||||||
{
|
|
||||||
dtconp.Dispose();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4764,7 +4787,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
e.Row.Cells[celda].CssClass = "cellFail";
|
e.Row.Cells[celda].CssClass = "cellFail";
|
||||||
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
e.Row.Cells[celda + 1].CssClass = "cellFail";
|
||||||
}
|
}
|
||||||
celda = celda + 2;
|
celda = celda + 4;
|
||||||
string CuotaFijaSUA = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSUA").ToDecimal());
|
string CuotaFijaSUA = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSUA").ToDecimal());
|
||||||
string CuotaFijaSIG = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSIG").ToDecimal());
|
string CuotaFijaSIG = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSIG").ToDecimal());
|
||||||
if (CuotaFijaSUA != CuotaFijaSIG)
|
if (CuotaFijaSUA != CuotaFijaSIG)
|
||||||
@@ -5090,7 +5113,264 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
protected void LnkSRVacacionesADD_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);
|
||||||
|
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 actualizodo");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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");
|
||||||
|
if (_CveAutoriza > 0 | !_Estatus)
|
||||||
|
lnkEditar.Visible = false;
|
||||||
|
lnkDescargaFormato.Visible = true;
|
||||||
|
// ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lnkDescargaFormato)
|
||||||
|
if (File.Exists(RutaDocuemntoAutorizacion) & _Estatus)
|
||||||
|
lnkDescargaAutorizacion.Visible = true;
|
||||||
|
else
|
||||||
|
lnkDescargaAutorizacion.Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
TxtvacFechaInicio.Text = GvRow.DataKey("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy");
|
||||||
|
TxtvacFechaFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate().ToString("dd/MM/yyyy");
|
||||||
|
|
||||||
|
RegistraScript("$('#divEditarDiaVacacion').modal({ backdrop: 'static', keyboard: false});");
|
||||||
|
}
|
||||||
|
|
||||||
|
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);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DownLoad_ClickSolicitudPermiso(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\PermisoSolicitud.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;
|
||||||
|
string FechaInicio = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy");
|
||||||
|
string FechaFin = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy");
|
||||||
|
string diasPermiso = $"{(GvRow.DataKey("FechaFin").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}";
|
||||||
|
string HorasPermiso = ""; // String.Format("{0}", ((GvRow.DataKey("FechaInicio").ToDateTime() - GvRow.DataKey("FechaFin").ToDateTime()).Hours))
|
||||||
|
string MotivoPermiso = string.Format("{0},{1}", GvRow.DataKey("Descripcion"), GvRow.DataKey("Motivo"));
|
||||||
|
if (File.Exists(RutaFormato))
|
||||||
|
{
|
||||||
|
clsGemBoxDocument objGemDocument = new clsGemBoxDocument(RutaFormato);
|
||||||
|
List<TagsDocumentos> ListaTags = new List<TagsDocumentos>();
|
||||||
|
|
||||||
|
ListaTags = GetDatosTagsDocumentos();
|
||||||
|
|
||||||
|
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("{HorasPermiso}", HorasPermiso));
|
||||||
|
ListaTags.Add(new TagsDocumentos("{MotivoPermiso}", MotivoPermiso));
|
||||||
|
|
||||||
|
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 + "_Solicituddepermiso_" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".pdf");
|
||||||
|
Response.BinaryWrite(bytesInStream);
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Alert("No se encontro el formato de Permisos", TipoMensaje.ToastAdventencia);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DownLoad_ClickSolicitudAutorizacion(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
GridViewRow GvRow = (GridViewRow)(LinkButton)sender.NamingContainer;
|
||||||
|
string _Documento = GvRow.DataKey("Documento");
|
||||||
|
string RutaDocuemntoAutorizacion = string.Format(@"{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, CvePersonal, _Documento);
|
||||||
|
|
||||||
|
if (File.Exists(RutaDocuemntoAutorizacion))
|
||||||
|
{
|
||||||
|
byte[] bytesInStream = File.ReadAllBytes(RutaDocuemntoAutorizacion);
|
||||||
|
Response.Clear();
|
||||||
|
Response.ContentType = "application/force-download";
|
||||||
|
Response.AddHeader("content-disposition", "attachment; filename=" + _Documento);
|
||||||
|
Response.AddHeader("content-disposition", "attachment; filename=" + _Documento);
|
||||||
|
Response.BinaryWrite(bytesInStream);
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Alert("No se encontro el documento que intenta descargar.");
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void BtnGeneratepdf_Click(object sender, EventArgs e)
|
protected void BtnGeneratepdf_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -5263,7 +5543,19 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
protected void LnkRegistrarProvision_Click(object sender, EventArgs e)
|
protected void LnkRegistrarProvision_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
using(ClsNominas objnom = new ClsNominas() )
|
||||||
|
{
|
||||||
|
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos=0;
|
||||||
|
if(objnom.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
CvePrePolizaProvision= objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
|
||||||
|
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
if (objnom.Autorizaperiodoconta(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa)){
|
||||||
|
string mensaje = string.Format("La provision a sido autorizada.<br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\">Provision </a><br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\"> Asimilados</a>", CvePrePolizaProvision, CvePrePolizaasmilidos);
|
||||||
|
Alert(mensaje);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5373,321 +5665,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
using (ClsClaseBasez objbase = new ClsClaseBasez())
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
if (objbase.runQuerystr($"PA_NomDispersiondenomina @CvePeriodo ={CvePeriodoSeleccionado}, @CveEmpresa ={UsuarioActual.CveEmpresa}"))
|
if (objnom.GetDispersiondenomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
CrearLayout(objbase.DtResultados);
|
CrearLayout(objnom.DtResultados);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ClsClaseBasez : IDisposable
|
|
||||||
{
|
|
||||||
protected SqlConnection SqlConexion;
|
|
||||||
protected SqlDataAdapter SqlAdapter;
|
|
||||||
protected DataTable datos;
|
|
||||||
protected DataSet DTSet;
|
|
||||||
public DataTable DtResultados
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return datos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public DataSet DTSetResultados
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return DTSet;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
protected bool disposedValue = false;
|
|
||||||
protected bool EsTransaccion = false;
|
|
||||||
public string MyCurrentError;
|
|
||||||
// REGISTRAR CONEXIÓN
|
|
||||||
private int CveConexion = 0;
|
|
||||||
|
|
||||||
public ClsClaseBasez(ClsClaseBasez adsObj = null)
|
|
||||||
{
|
|
||||||
if (adsObj != null && adsObj.SqlAdapter != null && adsObj.SqlAdapter.SelectCommand != null && adsObj.SqlAdapter.SelectCommand.Transaction != null)
|
|
||||||
{
|
|
||||||
SqlConexion = adsObj.SqlConexion;
|
|
||||||
SqlAdapter = adsObj.SqlAdapter;
|
|
||||||
EsTransaccion = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SqlConexion = new SqlConnection();
|
|
||||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SqlConexion.Open();
|
|
||||||
SqlAdapter = new SqlDataAdapter("", SqlConexion);
|
|
||||||
ConexionAdd();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
this.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SqlDataAdapter(string StrSQL, CommandType TipoComando = CommandType.StoredProcedure)
|
|
||||||
{
|
|
||||||
if (SqlConexion.State == ConnectionState.Open)
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
|
||||||
SqlAdapter.SelectCommand.CommandText = StrSQL;
|
|
||||||
SqlAdapter.SelectCommand.CommandType = TipoComando;
|
|
||||||
datos = new DataTable();
|
|
||||||
DTSet = new DataSet();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
protected void DataAdapter(string StrSQL, CommandType TipoComando = CommandType.Text)
|
|
||||||
{
|
|
||||||
|
|
||||||
// if (SqlAdapter.SelectCommand == null)
|
|
||||||
// {
|
|
||||||
// if ((sqlCommand != null))
|
|
||||||
// {
|
|
||||||
// SqlAdapter.SelectCommand = sqlCommand;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// SqlAdapter.SelectCommand = new SqlCommand();
|
|
||||||
// }
|
|
||||||
// SqlAdapter.SelectCommand.Connection = SqlConexion;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (SqlConexion.State == ConnectionState.Open)
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
|
||||||
SqlAdapter.SelectCommand.CommandText = StrSQL;
|
|
||||||
SqlAdapter.SelectCommand.CommandType = TipoComando;
|
|
||||||
datos = new DataTable();
|
|
||||||
DTSet = new DataSet();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ConexionAdd()
|
|
||||||
{
|
|
||||||
if (ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1")
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SqlDataAdapter("PA_Sis_RegistrarConexion");
|
|
||||||
{
|
|
||||||
var withBlock = SqlAdapter.SelectCommand.Parameters;
|
|
||||||
withBlock.Add("@Clase", SqlDbType.VarChar).Value = this.GetType().Name;
|
|
||||||
withBlock.Add("@Modulo", SqlDbType.VarChar).Value = string.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString(), HttpContext.Current.Request.QueryString.ToString());
|
|
||||||
withBlock.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output;
|
|
||||||
}
|
|
||||||
SqlAdapter.Fill(datos);
|
|
||||||
CveConexion = SqlAdapter.SelectCommand.Parameters["@IDConexion"].Value.ToString().ToEntero();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ConexionClose()
|
|
||||||
{
|
|
||||||
if (CveConexion > 0 && ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1")
|
|
||||||
{
|
|
||||||
SqlDataAdapter(string.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SqlAdapter.Fill(datos);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo());
|
|
||||||
}
|
|
||||||
CveConexion = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
protected void addParameters(string name, SqlDbType tipo, object valor)
|
|
||||||
{
|
|
||||||
if (SqlConexion.State == ConnectionState.Open)
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Add(name, tipo).Value = valor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool runQuerystr(string Query, List<parametroQuery> Listaparametros = null, string msgError = "", bool mostrarError = true)
|
|
||||||
{
|
|
||||||
bool retorno = false;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (SqlConexion.State == ConnectionState.Open)
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
|
||||||
SqlAdapter.SelectCommand.CommandText = Query;
|
|
||||||
SqlAdapter.SelectCommand.CommandType = CommandType.Text;
|
|
||||||
datos = new DataTable();
|
|
||||||
if (Listaparametros != null)
|
|
||||||
{
|
|
||||||
foreach (parametroQuery pr in Listaparametros)
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SqlAdapter.Fill(datos);
|
|
||||||
retorno = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada";
|
|
||||||
InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}";
|
|
||||||
ModExtensiones.GuardaLog(InfoAdicional);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (SqlException sqEx)
|
|
||||||
{
|
|
||||||
retorno = false;
|
|
||||||
setOnError(msgError, sqEx);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
retorno = false;
|
|
||||||
setOnError(msgError, ex);
|
|
||||||
}
|
|
||||||
return retorno;
|
|
||||||
}
|
|
||||||
public int ExecQuery(string Query, List<parametroQuery> Listaparametros = null, string msgError = "", bool mostrarError = true)
|
|
||||||
{
|
|
||||||
int retorno = -1;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (SqlConexion.State == ConnectionState.Open)
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
|
||||||
SqlAdapter.SelectCommand.CommandText = Query;
|
|
||||||
SqlAdapter.SelectCommand.CommandType = CommandType.Text;
|
|
||||||
if (Listaparametros != null)
|
|
||||||
{
|
|
||||||
foreach (parametroQuery pr in Listaparametros)
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
retorno = SqlAdapter.SelectCommand.ExecuteNonQuery();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada";
|
|
||||||
InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}";
|
|
||||||
this.GuardaLog(InfoAdicional);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (SqlException sqEx)
|
|
||||||
{
|
|
||||||
retorno = -1;
|
|
||||||
setOnError(msgError, sqEx);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
retorno = -1;
|
|
||||||
setOnError(msgError, ex);
|
|
||||||
}
|
|
||||||
return retorno;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected bool RunQuery(string msgOnError)
|
|
||||||
{
|
|
||||||
bool retorno = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SqlAdapter.Fill(datos);
|
|
||||||
retorno = true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
retorno = false;
|
|
||||||
|
|
||||||
setOnError(msgOnError, ex);
|
|
||||||
}
|
|
||||||
return retorno;
|
|
||||||
}
|
|
||||||
protected bool RunQueryDS(string msgOnError)
|
|
||||||
{
|
|
||||||
bool retorno = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SqlAdapter.Fill(DTSet);
|
|
||||||
retorno = true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
retorno = false;
|
|
||||||
|
|
||||||
setOnError(msgOnError, ex);
|
|
||||||
}
|
|
||||||
return retorno;
|
|
||||||
}
|
|
||||||
public void setOnError(string Mensaje, Exception Exeption)
|
|
||||||
{
|
|
||||||
string InfoAdicional = "";
|
|
||||||
if (SqlAdapter != null && SqlAdapter.SelectCommand != null && SqlAdapter.SelectCommand.Parameters != null)
|
|
||||||
InfoAdicional = SqlAdapter.SelectCommand.Parameters.ParametrosInfo();
|
|
||||||
MyCurrentError = string.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString(), "\r\n", InfoAdicional);
|
|
||||||
this.OnError(Mensaje, Exeption, InfoAdicional);
|
|
||||||
}
|
|
||||||
public void IniciaTransacSQL()
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Transaction = SqlConexion.BeginTransaction();
|
|
||||||
EsTransaccion = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Commit()
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Transaction.Commit();
|
|
||||||
SqlConexion.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RollBack()
|
|
||||||
{
|
|
||||||
SqlAdapter.SelectCommand.Transaction.Rollback();
|
|
||||||
SqlConexion.Close();
|
|
||||||
}
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
ConexionClose();
|
|
||||||
if ((SqlConexion != null))
|
|
||||||
{
|
|
||||||
if (SqlConexion.State == ConnectionState.Open)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if ((SqlAdapter != null))
|
|
||||||
SqlAdapter.Dispose();
|
|
||||||
|
|
||||||
SqlConexion.Close();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
this.OnError("Ocurrió un error al intentar cerrar la base de datos.", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SqlConexion.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (datos != null)
|
|
||||||
datos.Dispose();
|
|
||||||
if (SqlAdapter != null)
|
|
||||||
SqlAdapter.Dispose();
|
|
||||||
|
|
||||||
if (DTSet != null)
|
|
||||||
DTSet.Dispose();
|
|
||||||
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2293,7 +2293,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
||||||
|
|
||||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
||||||
@@ -2307,8 +2307,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group form-md-line-input input-iconright " style="width: 100px!important">
|
<div class="form-group form-md-line-input input-iconright " style="width: 100px!important">
|
||||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
||||||
<asp:TextBox ID="TxtFechaFinVac" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaFinVac" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
@@ -2322,8 +2321,9 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
||||||
|
|
||||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
||||||
@@ -2337,15 +2337,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
||||||
<asp:TextBox ID="Txtdiasinabiles" runat="server" TextMode="Number" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
|
<asp:TextBox ID="Txtdiasinabiles" runat="server" TextMode="Number" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
<label>días inhábiles</label>
|
<label>días inhábiles</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%--Motivo
|
|
||||||
<asp:TextBox ID="TxtMotivoVacaciones" runat="server" TextMode="MultiLine" Rows="4" CssClass="form-control Widthallimp"></asp:TextBox>--%>
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -226,6 +226,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user