예제 #1
0
 public AccountController(
     UserManager <Usuario> userManager,
     SignInManager <Usuario> signInManager,
     ILogger <AccountController> logger, SGContDbContext context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _logger        = logger;
     _db            = context;
 }
예제 #2
0
        public bool Eliminar()
        {
            DbContextOptions <SGContDbContext> options = new DbContextOptionsBuilder <SGContDbContext>()
                                                         .UseNpgsql(_config.GetConnectionString("DefaultConnection"), b => b.MigrationsAssembly("SGCont")).Options;

            using (var _db = new SGContDbContext(options))
            {
                var licencia = _db.Set <Licencia>().SingleOrDefault();
                if (licencia == null)
                {
                    return(false);
                }
                var path = _enviroment.ContentRootPath;
                System.IO.File.Delete(Path.Combine(path, "licencia.lic"));
                _db.Remove(licencia);
                _db.SaveChanges();
            }
            Licencia = null;
            return(true);
        }
예제 #3
0
 public FormasDePagosController(SGContDbContext context)
 {
     this.context = context;
 }
 public DictContratosController(SGContDbContext context)
 {
     this.context = context;
 }
예제 #5
0
 public TiempoVenOfertasController(SGContDbContext context)
 {
     this.context = context;
 }
 public TiempoVenContratosController(SGContDbContext context)
 {
     this.context = context;
 }
예제 #7
0
 public DocumentosController(SGContDbContext context)
 {
     this.context = context;
 }
 public TrabajadoresController(SGContDbContext context)
 {
     this.context = context;
 }
예제 #9
0
 public EntidadesController(SGContDbContext context)
 {
     this.context = context;
 }
 public AdminContratosController(SGContDbContext context)
 {
     this.context = context;
 }
 public ComiteContratacionController(SGContDbContext context)
 {
     this.context = context;
 }
예제 #12
0
 public LicenciaController(IHostingEnvironment enviroment, SGContDbContext context, LicenciaService licenciaService)
 {
     _enviroment      = enviroment;
     _db              = context;
     _licenciaService = licenciaService;
 }
예제 #13
0
 public EspecialistasExternosController(SGContDbContext context)
 {
     this.context = context;
 }
 public DepartamentosController(SGContDbContext context)
 {
     this.context = context;
 }
예제 #15
0
 public ContratosController(SGContDbContext context, IHostingEnvironment environment)
 {
     this.context        = context;
     _hostingEnvironment = environment;
 }