public static bool Eliminar(PresupuestosCategorias presupuestoCategoria) { using (var context = new Respository <PresupuestosCategorias>()) { try { return(context.Eliminar(presupuestoCategoria)); } catch (Exception) { throw; } } }
protected void Page_Load(object sender, EventArgs e) { Detalle = new PresupuestosCategorias(); presupuesto = new Presupuestos(); AlertSuccessPanel.Visible = false; AlertInfoPanel.Visible = false; AlertDangerPanel.Visible = false; if (!Page.IsPostBack) { LlenarCombo(); } }
public static bool Guardar(PresupuestosCategorias presupuestoCategoria) { using (var context = new Respository <PresupuestosCategorias>()) { try { if (Buscar(p => p.Id == presupuestoCategoria.Id) == null) { return(context.Guardar(presupuestoCategoria)); } else { return(context.Modificar(presupuestoCategoria)); } } catch (Exception) { throw; } } }