public IActionResult Post([FromBody] Cortes cortes) { var newDB = new SaraContext(); var allCortes = newDB.Cortes; allCortes.ToList().ForEach(corte => corte.Activo = false); newDB.SaveChanges(); if (cortes.Id > 0) { factory.Update(cortes); } else { factory.Insert(cortes); } factory.Save(); return(Json(cortes)); }
public AccountController(SaraContext _db, IOptions <AppSettings> _settings, IUserService userService) { this.db = _db; settings = _settings.Value; _userService = userService; }
public CuentasFactory(SaraContext _db) { db = _db; }
public GrupoController(SaraContext db) { this.factory = new GenericFactory <Grupos>(db); }
public ClasificacionController(SaraContext db) { this.factory = new GenericFactory <Clasificacion>(db); }
public UnidadMedidaController(SaraContext db) { this.factory = new GenericFactory <UnidadMedida>(db); }
public AboutController(SaraContext _db) { this.factory = new GenericFactory <App>(_db); this.db = _db; }
public AsientosFactory(SaraContext _db) { db = _db; this.factory = new GenericFactory <Asientos>(db); this.factoryDetalle = new GenericFactory <AsientosDetalle>(db); }
public FamiliaController(SaraContext db) { this.factory = new GenericFactory <Familia>(db); }
public InventarioController(SaraContext _db) { db = _db; this.factory = new GenericFactory <Inventario>(db); }
public ClientesController(SaraContext db) { this.factory = new GenericFactory <Clientes>(db); }
public CatalogoFactory(SaraContext _db) { db = _db; }
public GenericFactory(SaraContext _db) { this.db = _db; entity = db.Set <T>(); }
public GenericFactory() { this.db = new SaraContext(); entity = db.Set <T>(); }
public NaturalezaController(SaraContext db) { this.factory = new GenericFactory <Naturaleza>(db); }
public UserService(IOptions <AppSettings> appSettings, SaraContext db) { _appSettings = appSettings.Value; _db = db; userFactory = new UsuarioFactory(_db); }
public UsuarioFactory(SaraContext _db) { this.db = _db; }
public FormaPagoController(SaraContext db) { this.factory = new GenericFactory <FormaPago>(db); }
public ProveedoresController(SaraContext db) { this.factory = new GenericFactory <Proveedores>(db); }
public TipoCuentaController(SaraContext db) { this.factory = new GenericFactory <TipoCuenta>(db); }
public TipoComprobantesController(SaraContext db) { this.factory = new GenericFactory <TipoComprobantes>(db); }
public BancosController(SaraContext db) { this.factory = new GenericFactory <Bancos>(db); }
public CortesController(SaraContext db) { this.factory = new GenericFactory <Cortes>(db); _db = db; }
public CentroCostoController(SaraContext db) { this.factory = new GenericFactory <CentroCosto>(db); }
public SalidasController(SaraContext _db) { db = _db; this.factory = new GenericFactory <Salidas>(db); this.factoryDetalle = new GenericFactory <SalidasDetalle>(db); }
public TasaCambioController(SaraContext db) { this.factory = new GenericFactory <TasaDeCambio>(db); }
public CatalogosController(SaraContext _db) { db = _db; }
public PresentacionController(SaraContext db) { this.factory = new GenericFactory <Presentacion>(db); }
public CuentasController(SaraContext _db) { db = _db; this.factory = new GenericFactory <Cuentas>(db); }