Correccion de errores para cambiar fechas
This commit is contained in:
@@ -25,12 +25,9 @@
|
||||
<asp:LinkButton ID="LnkCambiarFecha" OnClick="LnkCambiarFecha_Click" runat="server"> <i class="fa fa-calendar" style="font-weight:bold;"></i> Cambiar Fechas</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGuardar" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload"> <i class="fa fa-floppy-o" style="font-weight:bold;"></i> Guardar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkGuardar" runat="server" Visible="false" OnClick="LnkGuardar_Click"> <i class="fa fa-floppy-o" style="font-weight:bold;"></i> Guardar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkGuardar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
@@ -172,7 +169,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
@@ -186,12 +183,12 @@
|
||||
<div class="col-md-4"> </div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
|
||||
<div class="input-group input-sm dater" data-date-format="dd/mm/yyyy" style="width: 50%;">
|
||||
|
||||
<asp:TextBox ID="txtFechaActualizar" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label style=" padding-bottom: 30px; width: 70%;" for="<%= txtFechaActualizar.ClientID.ToString()%>">Fecha:</label>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="btnFechaActualizar" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<asp:TextBox ID="txtFechaActualizar" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label style=" padding-bottom: 30px; width: 70%;" for="<%= txtFechaActualizar.ClientID.ToString()%>">Fecha:</label>
|
||||
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicioAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="txtFechaActualizar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>:<br>El campo <b>''Fecha''</b> es necesario." ValidationGroup="Actualiza"></asp:RequiredFieldValidator>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaActualiar" runat="server" TargetControlID="txtFechaActualizar" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
|
||||
@@ -158,14 +158,17 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
GvSolicitudes.Columns[0].Visible = true;
|
||||
LnkGuardar.Visible = true;
|
||||
LnkCambiarFecha.Visible = false;
|
||||
|
||||
UPAcciones.Update();
|
||||
UPDatos.Update();
|
||||
}
|
||||
protected void LnkGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript("$('#ModalUpload').modal('show')");
|
||||
}
|
||||
protected void BtnGuardarArchivo_Click(object sender, EventArgs e)
|
||||
{
|
||||
ActualizarFechas();
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1");
|
||||
RegistraScript("$('#ModalUpload').modal('hide')");
|
||||
GvSolicitudes.Columns[0].Visible = false;
|
||||
LnkGuardar.Visible = false;
|
||||
LnkCambiarFecha.Visible = true;
|
||||
@@ -195,14 +198,12 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
{
|
||||
TieneError = true;
|
||||
Alert("Ocurrio un error al actulizar las fechas", TipoMensaje.MsgError);
|
||||
ObjEvento.RollBack();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (TieneError == false) {
|
||||
ObjEvento.Commit();
|
||||
Alert("Las Fechas se actualizaron correctamente");
|
||||
}
|
||||
ObjEvento.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user