nuevo catálogo de tipo gasto, PA en Resp_Today
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Motivos de Rechazo de Paquetes
|
||||
Catálogo de Tipo Gastos de Rechazo de Paquetes
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Motivo"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarTipoGastoD" OnClick="BtnAgregarTipoGastoD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Tipo Gasto"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -23,7 +23,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoGasto,TipoGasto,Estatus,FechaIng" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoGasto,TipoGasto,Estatus,FechaIng" EmptyDataText="No se encontraron Tipo Gasto de Baja Registrados" ToolTip="Listado de Tipo Gasto de Baja" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo Gasto" DataField="TipoGasto" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" />
|
||||
@@ -45,7 +45,7 @@
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Motivos de Rechazo</asp:Literal></h4>
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Tipo Gastos de Rechazo</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -57,12 +57,13 @@
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<label for="ChkEstatus">Estatus:</label>
|
||||
<asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Text=" " />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarTiposDModal" OnClick="BtnAgregarTiposDModal_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<asp:Button ID="BtnAgregarTipoGasto" OnClick="BtnAgregarTipoGasto_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -41,13 +41,64 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
ObjAC.Dispose();
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
protected void BtnAgregarTipoGastoD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTiposDModal.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveTipoGasto = GvRow.DataKey("CveTipoGasto").ToEntero();
|
||||
DescripcionTxt.Text = GvRow.DataKey("Descripcion");
|
||||
BtnAgregarTipoGasto.Text = "Agregar";
|
||||
TxtTipoGasto.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
ChkEstatus.Enabled = false;
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||
}
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTipoGasto.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveTipoGasto = GvRow.DataKey("CveTipoGasto").ToEntero();
|
||||
TxtTipoGasto.Text = GvRow.DataKey("TipoGasto");
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") == "Activo";
|
||||
ChkEstatus.Enabled = true;
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveTipoGasto = GvRow.DataKey("CveTipoGasto").ToEntero();
|
||||
ClsAC ObjAC = new ClsAC();
|
||||
if (ObjAC.RemoveTipoGasto(CveTipoGasto))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
Alert("Se eliminó el Tipo de Gasto correctamente");
|
||||
}
|
||||
ObjAC.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoGasto_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAC ObjAC = new ClsAC();
|
||||
if (BtnAgregarTipoGasto.Text == "Agregar")
|
||||
{
|
||||
if (ObjAC.AddTipoGasto(TxtTipoGasto.Text,UsuarioActual.CveUsuario))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
Alert("Se agregó el Tipo de Gasto correctamente");
|
||||
}
|
||||
}else
|
||||
{
|
||||
if (ObjAC.UpdateTipoGasto(TxtTipoGasto.Text,ChkEstatus.Checked,CveTipoGasto))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
Alert("Se actualizó el Tipo de Gasto correctamente");
|
||||
}
|
||||
}
|
||||
ObjAC.Dispose();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user