Ejemplo n.º 1
0
        public ActionResult Create(string instName)
        {
            //Save institution details in RiskAppDb and set the id. This is not possible now as there is dependency to old dlls.
            // string instName = "test";
            Institution institution = new Entities.Institution()
            {
            InstitutionName = instName,
            DateCreated = DateTime.Now,
            IsActive=true
            };

            string scriptPath = HttpContext.Server.MapPath(@"~/App_Data/HRATenantDBCreation.sql");
            institution = _applicationContext.ServiceContext.AdminService.AddUpdateTenant(institution);
            _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution, scriptPath);

              //  Task taskA = Task.Run(() => _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution,scriptPath));
            return RedirectToAction("ManageInstitution");
        }
Ejemplo n.º 2
0
        public ActionResult Create(string instName)
        {
            //Save institution details in RiskAppDb and set the id. This is not possible now as there is dependency to old dlls.
            // string instName = "test";
            Institution institution = new Entities.Institution()
            {
                InstitutionName = instName,
                DateCreated     = DateTime.Now,
                IsActive        = true
            };


            string scriptPath = HttpContext.Server.MapPath(@"~/App_Data/HRATenantDBCreation.sql");

            institution = _applicationContext.ServiceContext.AdminService.AddUpdateTenant(institution);
            _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution, scriptPath);

            //  Task taskA = Task.Run(() => _applicationContext.ServiceContext.AdminService.CreateTenantDb(institution,scriptPath));
            return(RedirectToAction("ManageInstitution"));
        }
Ejemplo n.º 3
0
 public Entities.Institution AddUpdateTenant(Entities.Institution tenant)
 {
     tenant.DbName = Helpers.GenerateDbName(tenant.InstitutionName);
     return(_repositoryFactory.TenantRepository.AddUpdateTenant(tenant));
 }
Ejemplo n.º 4
0
 public int UpdateTenant(Entities.Institution tenant)
 {
     return(dbContext.TenantMaster.Update(tenant));
 }
Ejemplo n.º 5
0
 public Institution AddUpdateTenant(Entities.Institution tenant)
 {
     return((Institution)dbContext.TenantMaster.Insert(tenant));
 }