public BaseController(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; _conceptsRepository = (IConceptsRepository)this._serviceProvider.GetService(typeof(IConceptsRepository)); _configuration = (IConfiguration)this._serviceProvider.GetService(typeof(IConfiguration)); _hostingEnvironment = (IWebHostEnvironment)this._serviceProvider.GetService(typeof(IWebHostEnvironment)); loginUserId = AppContext.Current.Session.GetInt32("UserId") != null?AppContext.Current.Session.GetInt32("UserId").Value : 0; isAdmin = AppContext.Current.Session.GetInt32("IsAdmin") == 1 ? true : false; isSuperAdmin = AppContext.Current.Session.GetInt32("IsSuperAdmin") == 1 ? true : false; clientId = AppContext.Current.Session.GetInt32("ClientId") != null?AppContext.Current.Session.GetInt32("ClientId").Value : 0; folderName = this._configuration.GetValue <string>("UploadFolder"); path = Path.Combine(this._hostingEnvironment.WebRootPath, folderName); QRCodeUrl = this._configuration.GetValue <string>("QRCodeURL"); SelectedConceptId = AppContext.Current.Session.GetInt32("SelectedConceptId") != null?AppContext.Current.Session.GetInt32("SelectedConceptId").Value : 0; conceptsList = _conceptsRepository.GetConceptsPermissionList(loginUserId); AppContext.Current.Session.SetComplexData("conceptsList", conceptsList); //hasVoucherApprovalPermission = AppContext.Current.Session.GetInt32("HasAllowVoucherApprovalPermission") == 1 ? true : false; //hasVoucherIssuancePermission = AppContext.Current.Session.GetInt32("HasVoucherIssuancePermission") == 1 ? true : false; if (AppContext.Current.Session.GetInt32("HasAllowVoucherApprovalPermission") == 1 || isAdmin) { hasVoucherApprovalPermission = true; } if (AppContext.Current.Session.GetInt32("HasVoucherIssuancePermission") == 1 || isAdmin) { hasVoucherIssuancePermission = true; } }
public StoresController(IStoresRespository storesRespository, IConceptsRepository conceptsRepository, IClientRepository clientRepository, ICountryRepository countryRepository, IRegionRepository regionRepository, IServiceProvider serviceProvider) : base(serviceProvider) { _storesRespository = storesRespository; _conceptsRepository = conceptsRepository; _countryRepository = countryRepository; _regionRepository = regionRepository; _clientRepository = clientRepository; conceptsLists = new List <Concepts_VM>(); }
public ConceptsBusinessWorkflow(IConceptsRepository conceptsRepository, IConceptMapper conceptMapper) { ConceptsRepository = conceptsRepository; ConceptMapper = conceptMapper; }
public ConceptsBusinessWorkflow(IConceptsRepository conceptsRepository, IConceptMapper conceptMapper) { ConceptsRepository = conceptsRepository; ConceptMapper = conceptMapper; }
public ConceptsController(IConceptsRepository conceptsRepository, IClientRepository clientRepository, IServiceProvider serviceProvider) : base(serviceProvider) { _conceptsRepository = conceptsRepository; _clientRepository = clientRepository; }