示例#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");
        }
示例#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"));
        }
示例#3
0
 public Entities.Institution AddUpdateTenant(Entities.Institution tenant)
 {
     tenant.DbName = Helpers.GenerateDbName(tenant.InstitutionName);
     return(_repositoryFactory.TenantRepository.AddUpdateTenant(tenant));
 }
示例#4
0
 public int UpdateTenant(Entities.Institution tenant)
 {
     return(dbContext.TenantMaster.Update(tenant));
 }
示例#5
0
 public Institution AddUpdateTenant(Entities.Institution tenant)
 {
     return((Institution)dbContext.TenantMaster.Insert(tenant));
 }