-
This commit is contained in:
@@ -41,6 +41,16 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
ObjCompras.Dispose();
|
||||
}
|
||||
|
||||
private void RecargarGlobal()
|
||||
{
|
||||
ClsCompras ObjCompras = new ClsCompras();
|
||||
if (ObjCompras.GetTipoGasto(-1, -1))
|
||||
{
|
||||
set_GlobalDTTiposGastos(UsuarioActual.CveEmpresa, ObjCompras.DtResultados);
|
||||
}
|
||||
ObjCompras.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoGastoD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTipoGasto.Text = "Agregar";
|
||||
@@ -74,6 +84,7 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
Alert("Se eliminó el Tipo de Gasto correctamente");
|
||||
}
|
||||
ObjCompras.Dispose();
|
||||
RecargarGlobal();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoGasto_Click(object sender, EventArgs e)
|
||||
@@ -82,22 +93,20 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
if (BtnAgregarTipoGasto.Text == "Agregar")
|
||||
{
|
||||
if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text,ChkEstatus.Checked,DateTime.Now.ToString(),UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
{
|
||||
Alert("Se agregó el Tipo de Gasto correctamente");
|
||||
}
|
||||
}else
|
||||
{
|
||||
if (ObjCompras.UpdateTipoGasto(CveTipoGasto,TxtTipoGasto.Text,ChkEstatus.Checked,-1,-1))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
Alert("Se actualizó el Tipo de Gasto correctamente");
|
||||
}
|
||||
}
|
||||
ObjCompras.Dispose();
|
||||
CargaDatos();
|
||||
RecargarGlobal();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user