public GetStepResponseResponse GetStepResponse(GetStepResponseRequest request) { try { GetStepResponseResponse response = new GetStepResponseResponse(); IProgramRepository repo = Factory.GetRepository(request, RepositoryType.PatientProgramResponse); //.GetPatientProgramStepResponseRepository(request); MEPatientProgramResponse result = repo.FindByID(request.ResponseId) as MEPatientProgramResponse; if (result != null) { response.StepResponse = new StepResponse { Id = result.Id.ToString(), NextStepId = result.NextStepId.ToString(), Nominal = result.Nominal, Order = result.Order, Required = result.Required, Spawn = DTOUtils.GetResponseSpawnElement(result.Spawn), StepId = result.StepId.ToString(), Text = result.Text, Value = result.Value }; } return(response); } catch (Exception ex) { throw new Exception("DD:DataProgramManager:GetStepResponse()::" + ex.Message, ex.InnerException); } }
public TriggerService(ILogger <TriggerService> logger, GRA.Abstract.IDateTimeProvider dateTimeProvider, IUserContextProvider userContextProvider, IAvatarBundleRepository avatarBundleRepository, IBranchRepository branchRepository, IEventRepository eventRepository, IProgramRepository programRepository, ISystemRepository systemRepository, ITriggerRepository triggerRepository, SiteLookupService siteLookupService) : base(logger, dateTimeProvider, userContextProvider) { SetManagementPermission(Permission.ManageTriggers); _avatarBundleRepository = avatarBundleRepository ?? throw new ArgumentNullException( nameof(avatarBundleRepository)); _branchRepository = branchRepository ?? throw new ArgumentNullException(nameof(branchRepository)); _eventRepository = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository)); _programRepository = programRepository ?? throw new ArgumentNullException(nameof(programRepository)); _systemRepository = systemRepository ?? throw new ArgumentNullException(nameof(systemRepository)); _triggerRepository = triggerRepository ?? throw new ArgumentNullException(nameof(triggerRepository)); _siteLookupService = siteLookupService ?? throw new ArgumentNullException(nameof(siteLookupService)); }
public DrawingService(ILogger <DrawingService> logger, GRA.Abstract.IDateTimeProvider dateTimeProvider, IUserContextProvider userContextProvider, IBranchRepository branchRepository, IDrawingRepository drawingRepository, IDrawingCriterionRepository drawingCriterionRepository, IMailRepository mailRepository, IPrizeWinnerRepository prizeWinnerRepository, IProgramRepository programRepository, ISystemRepository systemRepository) : base(logger, dateTimeProvider, userContextProvider) { _branchRepository = branchRepository ?? throw new ArgumentNullException(nameof(branchRepository)); _drawingRepository = drawingRepository ?? throw new ArgumentNullException(nameof(drawingRepository)); _drawingCriterionRepository = drawingCriterionRepository ?? throw new ArgumentNullException( nameof(drawingCriterionRepository)); _mailRepository = mailRepository ?? throw new ArgumentNullException(nameof(mailRepository)); _prizeWinnerRepository = prizeWinnerRepository ?? throw new ArgumentNullException(nameof(prizeWinnerRepository)); _programRepository = programRepository ?? throw new ArgumentNullException(nameof(programRepository)); _systemRepository = systemRepository ?? throw new ArgumentNullException(nameof(systemRepository)); }
public DeletePatientProgramDataResponse DeletePatientProgram(DeletePatientProgramDataRequest request) { DeletePatientProgramDataResponse response = null; bool success = false; try { response = new DeletePatientProgramDataResponse(); IProgramRepository ppRepo = Factory.GetRepository(request, RepositoryType.PatientProgram); MEPatientProgram mePP = ppRepo.FindByID(request.Id) as MEPatientProgram; DeletedPatientProgram deletedPatientProgram = null; if (mePP != null) { if (delete(mePP, request, ppRepo, out deletedPatientProgram)) { success = true; } } else { success = true; } response.DeletedPatientProgram = deletedPatientProgram; response.Success = success; return(response); } catch (Exception ex) { throw ex; } }
/// <summary> /// Load Program DropDownList Asynchronously /// </summary> /// <returns>Data in JSON</returns> public JsonResult LoadWorkerProgramsAjax() { if (programRepository == null) { programRepository = DependencyResolver.Current.GetService(typeof(IProgramRepository)) as IProgramRepository; } if (WebHelper.CurrentSession.Content.ProgramVisibility == VisibilityStatus.All) { return(Json(programRepository.AllActiveForDropDownList, JsonRequestBehavior.AllowGet)); } else if (WebHelper.CurrentSession.Content.ProgramVisibility == VisibilityStatus.Assigned || WebHelper.CurrentSession.Content.ProgramVisibility == VisibilityStatus.UnDefined) { //return Json(programRepository.FindAllByWorkerID(CurrentLoggedInWorker.ID).Where(item => item.IsActive == true).OrderBy(item => item.Name).AsEnumerable().Select(item => new SelectListItem() { Text = item.Name, Value = item.ID.ToString() }).ToList(), JsonRequestBehavior.AllowGet); return(Json(programRepository.NewFindAllByWorkerID(CurrentLoggedInWorker.ID).AsEnumerable().Select(item => new SelectListItem() { Text = item.Name, Value = item.ID.ToString() }).ToList(), JsonRequestBehavior.AllowGet)); } else { List <SelectListItem> items = new List <SelectListItem>(); return(Json(items, JsonRequestBehavior.AllowGet)); } }
private bool IsContractProgramAssignable(PutProgramToPatientRequest request) { bool result = false; try { IProgramRepository contractProgRepo = Factory.GetRepository(request, RepositoryType.ContractProgram); ContractProgram c = contractProgRepo.FindByID(request.ContractProgramId) as ContractProgram; if (c != null) { if (c.Status == 1 && c.Delete != true) { result = true; } } return(result); } catch (Exception ex) { throw new Exception("DD:DataProgramManager:IsContractProgramAssignable" + ex.Message, ex.InnerException); } }
public EventService(ILogger <EventService> logger, GRA.Abstract.IDateTimeProvider dateTimeProvider, GRA.Abstract.IGraCache cache, IUserContextProvider userContextProvider, IBranchRepository branchRepository, IChallengeRepository challengeRepository, IChallengeGroupRepository challengeGroupRepository, IEventRepository eventRepository, ILocationRepository locationRepository, IProgramRepository programRepository, ISpatialDistanceRepository spatialDistanceRepository, SiteLookupService siteLookupService) : base(logger, dateTimeProvider, userContextProvider) { _branchRepository = branchRepository ?? throw new ArgumentNullException(nameof(branchRepository)); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _challengeRepository = challengeRepository ?? throw new ArgumentNullException(nameof(challengeRepository)); _challengeGroupRepository = challengeGroupRepository ?? throw new ArgumentNullException(nameof(challengeGroupRepository)); _eventRepository = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository)); _locationRepository = locationRepository ?? throw new ArgumentNullException(nameof(locationRepository)); _programRepository = programRepository ?? throw new ArgumentNullException(nameof(programRepository)); _spatialDistanceRepository = spatialDistanceRepository ?? throw new ArgumentNullException(nameof(spatialDistanceRepository)); _siteLookupService = siteLookupService ?? throw new ArgumentNullException(nameof(siteLookupService)); }
public SetupSingleProgramService(ILogger <SetupSingleProgramService> logger, GRA.Abstract.IDateTimeProvider dateTimeProvider, IAuthorizationCodeRepository authorizationCodeRepository, IBranchRepository branchRepository, IChallengeTaskRepository challengeTaskRepository, IProgramRepository programRepository, IRoleRepository roleRepository, ISystemRepository systemRepository, IPointTranslationRepository pointTranslationRepository, IUserRepository userRepository) : base(logger, dateTimeProvider) { _authorizationCodeRepository = Require.IsNotNull(authorizationCodeRepository, nameof(authorizationCodeRepository)); _branchRepository = Require.IsNotNull(branchRepository, nameof(branchRepository)); _challengeTaskRepository = Require.IsNotNull(challengeTaskRepository, nameof(challengeTaskRepository)); _programRepository = Require.IsNotNull(programRepository, nameof(programRepository)); _roleRepository = Require.IsNotNull(roleRepository, nameof(roleRepository)); _systemRepository = Require.IsNotNull(systemRepository, nameof(systemRepository)); _pointTranslationRepository = Require.IsNotNull(pointTranslationRepository, nameof(pointTranslationRepository)); _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); }
/// <summary> /// Program Excercise Controller's Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="programRepository"></param> /// <param name="excerciseRepository"></param> /// <param name="patientProgramRepository"></param> public ProgramExcerciseController(IUnitOfWork unitOfWork, IProgramRepository programRepository, IExcerciseRepository excerciseRepository, IPatientProgramRepository patientProgramRepository) { _unitOfWork = unitOfWork; _programRepository = programRepository; _excerciseRepository = excerciseRepository; _patientProgramRepository = patientProgramRepository; }
/// <summary> /// Initializes a new instance of the <see cref="Del"/> class. /// </summary> /// <param name="runEnvironment">Run environment.</param> /// <param name="programRepository">Program Repository.</param> public Del( IRunEnvironment runEnvironment, IProgramRepository programRepository) : base("DEL", TokenClass.Statement) { _runEnvironment = runEnvironment; _programRepository = programRepository; }
public ProductService(IProductRepository iProductRepository, IHelper iHelper, IProgramRepository iProgramRepository, ICategoryRepository iCategoryRepository) { _iProductRepository = iProductRepository; _iHelper = iHelper; _iProgramRepository = iProgramRepository; _iCategoryRepository = iCategoryRepository; }
public UserAccountService() { CapstoneDBModel ctx = new CapstoneDBModel(); this._users = new UserRepository(ctx); this._programs = new ProgamRepository(ctx); this._students = new StudentRepository(ctx); }
public AdminController(UserManager <ApplicationUser> userManager, IEventRepository eventRepository, IProgramRepository programRepository, IRegEventRepository regEventRepository, IHostingEnvironment hostingEnvironment) { _userManager = userManager; _eventRepository = eventRepository; _programRepository = programRepository; _hostingEnvironment = hostingEnvironment; _regEventRepository = regEventRepository; }
public SubProgramController(ISubProgramRepository subprogramRepository, IProgramRepository programRepository, IWorkerRoleActionPermissionRepository workerroleactionpermissionRepository) : base(workerroleactionpermissionRepository) { this.subprogramRepository = subprogramRepository; this.programRepository = programRepository; }
/// <summary> /// Initializes a new instance of the <see cref="Resume"/> class. /// </summary> /// <param name="runEnvironment">Run time environment.</param> /// <param name="programRepository">Program repository.</param> public Resume( IRunEnvironment runEnvironment, IProgramRepository programRepository) : base("RESUME", TokenClass.Statement) { _runEnvironment = runEnvironment; _programRepository = programRepository; }
public ProductService(IProductRepository iProductRepository, IHelper iHelper, IProgramRepository iProgramRepository, ICategoryRepository iCategoryRepository) { _iProductRepository = iProductRepository; _iHelper = iHelper; _iProgramRepository = iProgramRepository; _iCategoryRepository = iCategoryRepository; }
/// <summary> /// Initializes a new instance of the <see cref="Gosub"/> class. /// </summary> /// <param name="runEnvironment">Run time environment.</param> /// <param name="programRepository">Program Repository.</param> public Gosub( IRunEnvironment runEnvironment, IProgramRepository programRepository) : base("GOSUB", TokenClass.Statement, TokenType.Gosub) { _runEnvironment = runEnvironment; _programRepository = programRepository; }
public ProgramController(IProgramRepository repo) { context = repo; context.Initialize(); http = new HttpClient { BaseAddress = new Uri("http://courses-service-nice-gazelle.cfapps.io") }; }
public TrainerAppService(ITrainerRepository trainerRepo, IProgramRepository programRepo, ICompareAppService compareService, IPersonRepository personRepo) { _trainerRepository = trainerRepo; _programRepository = programRepo; _compareAppService = compareService; _personRepository = personRepo; }
public CoreRatingController() { this.TaskVersions = new TaskVersionRepository(); this.Programs = new ProgramRepository(); this.CoreRatings = new CoreRatingRepository(); this.TaskRatings = new TaskRatingRepository(); this.FacultyID = Convert.ToInt32(User.Identity.GetUserId()); this.db = new DbContext(); }
/// <summary> /// Handles on error calls. /// </summary> /// <param name="programRepository">Program repository to use.</param> public void OnErrorHandler(IProgramRepository programRepository) { LastErrorToken = ContinueToken; LastErrorStackCount = ProgramStack.Count; // This might throw an undefined statement error and loop // endlessly but then it does that on an Apple ][ CurrentLine = programRepository.GetLine(OnErrorGotoLineNumber.Value); }
public ProgramsController( IProgramRepository programRepository, IMapper mapper, ILogger <ProgramsController> logger) { _programRepository = programRepository; _mapper = mapper; _logger = logger; }
public EmployeeService(IEmployeeRepository employeeRepository, IEmploymentTypeRepository employmentTypeRepository, IPositionRepository positionRepository, IProgramRepository programRepository, IRoleRepository roleRepository, IEmployeeProgramRepository employeeProgramRepository) { this.employeeRepository = employeeRepository; this.employmentTypeRepository = employmentTypeRepository; this.positionRepository = positionRepository; this.roleRepository = roleRepository; this.programRepository = programRepository; this.employeeProgramRepository = employeeProgramRepository; }
/// <summary> /// Initializes a new instance of the <see cref="DeleteProgramRequestHandler"/> class. /// </summary> /// <param name="programRepository">The program repository.</param> /// <param name="programFactory">The program factory.</param> /// <param name="agencyRepository">The agency repository.</param> public DeleteProgramRequestHandler( IProgramRepository programRepository, IProgramFactory programFactory, IAgencyRepository agencyRepository) { _programRepository = programRepository; _programFactory = programFactory; _agencyRepository = agencyRepository; }
/// <summary> /// Initializes a new instance of the <see cref="If"/> class. /// </summary> /// <param name="runEnvironment">Run time environment.</param> /// <param name="expressionEvaluator">Expression evaluator.</param> /// <param name="programRepository">Program repository.</param> public If( IRunEnvironment runEnvironment, IExpressionEvaluator expressionEvaluator, IProgramRepository programRepository) : base("IF", TokenClass.Statement) { _runEnvironment = runEnvironment; _expressionEvaluator = expressionEvaluator; _programRepository = programRepository; }
/// <summary> /// Initializes a new instance of the <see cref="Edit"/> class. /// Edit command, allows editing of a program line. /// </summary> /// <param name="runEnvironment">Run environment.</param> /// <param name="programRepository">Program repository</param> /// <param name="teletype">teletype.</param> public Edit( IRunEnvironment runEnvironment, IProgramRepository programRepository, ITeletype teletype) : base("EDIT", TokenClass.Statement) { _runEnvironment = runEnvironment; _programRepository = programRepository; _teletype = teletype; }
/// <summary> /// Initializes a new instance of the <see cref="Save"/> class. /// </summary> /// <param name="expressionEvaluator">Expression evaluator.</param> /// <param name="programRepository">Program Repository.</param> /// <param name="fileSystem">Filesystem to use.</param> public Save( IExpressionEvaluator expressionEvaluator, IProgramRepository programRepository, IFileSystem fileSystem) : base("SAVE", TokenClass.Statement) { _expressionEvaluator = expressionEvaluator; _programRepository = programRepository; _fileSystem = fileSystem; }
/// <summary> /// Initializes a new instance of the <see cref="Load"/> class. /// </summary> /// <param name="expressionEvaluator">Expression evaluator.</param> /// <param name="fileSystem">Mockable file system.</param> /// <param name="programRepository">Program repository.</param> public Load( IExpressionEvaluator expressionEvaluator, IFileSystem fileSystem, IProgramRepository programRepository) : base("LOAD", TokenClass.Statement) { _expressionEvaluator = expressionEvaluator; _fileSystem = fileSystem; _programRepository = programRepository; }
/// <summary> /// Initializes a new instance of the <see cref="On"/> class. /// </summary> /// <param name="runEnvironment">Run time environment.</param> /// <param name="expressionEvaluator">Expression evaluator.</param> /// <param name="programRepository">Program Repository.</param> public On( IRunEnvironment runEnvironment, IExpressionEvaluator expressionEvaluator, IProgramRepository programRepository) : base("ON", TokenClass.Statement, TokenType.Gosub) { _runEnvironment = runEnvironment; _expressionEvaluator = expressionEvaluator; _programRepository = programRepository; }
/// <summary> /// Initializes a new instance of the <see cref="List"/> class. /// </summary> /// <param name="programRepository">Program Repository.</param> /// <param name="teletype">Output teletype to use.</param> /// <param name="runEnvironment">Run environment.</param> public List( IProgramRepository programRepository, ITeletype teletype, IRunEnvironment runEnvironment) : base("LIST", TokenClass.Statement) { _programRepository = programRepository; _teletype = teletype; _runEnvironment = runEnvironment; }
/// <summary> /// Initializes a new instance of the <see cref="Goto"/> class. /// </summary> /// <param name="runEnvironment">Run time environment.</param> /// <param name="expressionEvaluator">Expression evaluator.</param> /// <param name="programRepository">Program Repository.</param> public Goto( IRunEnvironment runEnvironment, IExpressionEvaluator expressionEvaluator, IProgramRepository programRepository) : base("GOTO", TokenClass.Statement, TokenType.Goto) { _programRepository = programRepository; _runEnvironment = runEnvironment; _expressionEvaluator = expressionEvaluator; }
public EmailService(ILogger <EmailService> logger, IConfigurationRoot config, IProgramRepository programRepository, ISiteRepository siteRepository, IUserRepository userRepository) : base(logger) { _config = Require.IsNotNull(config, nameof(config)); _programRepository = Require.IsNotNull(programRepository, nameof(programRepository)); _siteRepository = Require.IsNotNull(siteRepository, nameof(siteRepository)); _userRepository = Require.IsNotNull(userRepository, nameof(userRepository)); }
public ProgramService(IProgramRepository iProgramRepository, IHelper iHelper, IProductRepository iProductRepository, ISaleRepository iSaleRepository, IScheduleRepository iScheduleRepository) { _iProgramRepository = iProgramRepository; _iHelper = iHelper; _iProductRepository = iProductRepository; _iSaleRepository = iSaleRepository; _iScheduleRepository = iScheduleRepository; }
public ProgramService(IProgramRepository iProgramRepository, IHelper iHelper, IProductRepository iProductRepository, ISaleRepository iSaleRepository, IScheduleRepository iScheduleRepository) { _iProgramRepository = iProgramRepository; _iHelper = iHelper; _iProductRepository = iProductRepository; _iSaleRepository = iSaleRepository; _iScheduleRepository = iScheduleRepository; }
public PredictionService(IProgramRepository iProgramRepository, IProductRepository iProductRepository, IScheduleRepository iScheduleRepository, ISaleRepository iSaleRepository, ICategoryRepository iCategoryRepository) { _iProgramRepository = iProgramRepository; _iScheduleRepository = iScheduleRepository; _iSaleRepository = iSaleRepository; _iCategoryRepository = iCategoryRepository; _iProductRepository = iProductRepository; allPrograms = _iProgramRepository.All.ToList(); allProducts = _iProductRepository.All.ToList(); allCategorys = _iCategoryRepository.All.ToList(); allSales = _iSaleRepository.All.ToList(); allSchedules = _iScheduleRepository.All.ToList(); }
public ProgramController(IProgramRepository repo) { this.repo = repo; }
public ProgramController() { repo = new ProgramRepository(new ApplicationDbContext()); }
public ProgramController(IProgramRepository repository, IProgramMapper mapper) { _programRepository = repository; _programMapper = mapper; }
/// <summary> /// Initializes a new instance of the <see cref="ProgramFactory"/> class. /// </summary> /// <param name="programRepository">The program repository.</param> public ProgramFactory( IProgramRepository programRepository ) { _programRepository = programRepository; }
public ProgramsController(IProgramRepository programRepository) { this.programRepository = programRepository; }
public ProgramManager(IUnitOfWork uow) { this.repo = uow.GetProgramRepository(); }
public ProgramsController() { this.programRepository = new ProgramRepository(new ApplicationDbContext()); }
public ProgramService() { _programRepository = ProgramRepository.Instance; }