public EvaluationsController(IEvaluationService evaluationService,
                              IProfileService profileService, IImageService imageService)
 {
     _evaluationService = evaluationService;
     _profileService    = profileService;
     _imageService      = imageService;
 }
Exemple #2
0
        // evaluates restaurant only when current GPS is 100 meters apars
        private async void Evaluate()
        {
            if (_selectedRestaurant == null)
            {
                await Application.Current.MainPage.DisplayAlert("No restaurant is selected", "Please select a restaurant", "OK");

                return;
            }
            var locator = CrossGeolocator.Current;

            locator.DesiredAccuracy = 10;
            var position = await locator.GetPositionAsync(TimeSpan.FromSeconds(10));

            Location startLocation = new Location(position.Latitude, position.Longitude);
            Location endLocation   = new Location(_selectedRestaurant.Latitude, _selectedRestaurant.Longitude);
            double   distance      = Location.CalculateDistance(startLocation, endLocation, DistanceUnits.Kilometers);

            if (distance > 0.1)
            {
                await Application.Current.MainPage.DisplayAlert("Restaurant is too far away", "Please change selected restaurant", "OK");

                return;
            }
            else
            {
                evaluationServices = ServiceFactory.GetEvaluationService();
                Evaluation newEvaluation = new Evaluation((decimal)_calculatedMood, (decimal)_price, (decimal)_experience, CurrentUser.UserID, _selectedRestaurant.RestaurantId);
                await evaluationServices.PostEvaluationAsync(newEvaluation);

                await Application.Current.MainPage.DisplayAlert("Success", "", "OK");
            }
        }
Exemple #3
0
 public EvaluationController(IEvaluationService service, IUserService userService, IStudentService studentService, IInstructorService instructorService)
 {
     this._service           = service;
     this._userService       = userService;
     this._studentService    = studentService;
     this._instructorService = instructorService;
 }
Exemple #4
0
 public EvaluationController(IMapper mapper,
                             ITopicEvaluationService topicEvaluationService,
                             ITypeEvaluationService typeEvaluationService,
                             ICategoryEvaluationService categoryEvaluationService,
                             UserManager <AppUser> userManager,
                             IEvaluationService evaluationService,
                             IProfessorProfessorEvaluationListService professorProfessorEvaluationListService,
                             IQuizQuestionService quizQuestionService,
                             IQuestionListService questionListService,
                             IAnswerListService answerListService,
                             ICategoryQuestionService categoryQuestionService,
                             ITopicQuestionService topicQuestionService,
                             ITypeQuestionService typeQuestionService,
                             IAnswerService answerService)
 {
     _mapper = mapper;
     _topicEvaluationService    = topicEvaluationService;
     _typeEvaluationService     = typeEvaluationService;
     _categoryEvaluationService = categoryEvaluationService;
     _userManager                             = userManager;
     _evaluationService                       = evaluationService;
     _quizQuestionService                     = quizQuestionService;
     _questionListService                     = questionListService;
     _answerService                           = answerService;
     _answerListService                       = answerListService;
     this._categoryQuestionService            = categoryQuestionService;
     this._topicQuestionService               = topicQuestionService;
     this._typeQuestionService                = typeQuestionService;
     _professorProfessorEvaluationListService = professorProfessorEvaluationListService;
 }
 public EvaluationCategoriesViewModel(IEvaluationService evaluationService, ILocalDbService localDbService, IDialogService dialogService)
 {
     _evaluationService       = evaluationService;
     _localDbService          = localDbService;
     _dialogService           = dialogService;
     EvaluationCategoriesList = new ObservableCollection <EvaluationCategoryItemModel>();
 }
 public void Initialize()
 {
     BaseSqlTests.SeedDatabase();
     _repository       = new EvaluationRepository();
     _resultRepository = new ResultRepository();
     _service          = new EvaluationService(_repository, _resultRepository);
 }
 public SearchService(PossibleMovesService possibleMovesService, IEvaluationService evaluationService, IInterruptor interruptor)
 {
     PossibleMovesService = possibleMovesService;
     EvaluationService    = evaluationService;
     Interruptor          = interruptor;
     TTable = new TranspositionTable <SearchTTEntry>(26);
 }
Exemple #8
0
 public UsersController(IUserService registerUserUseCase, IEvaluationService evaluationService, RegisterUserPresenter userPresenter, LoginPresenter loginPresenter, IOptions <AuthSettings> authSettings)
 {
     _userService           = registerUserUseCase;
     _registerUserPresenter = userPresenter;
     _loginPresenter        = loginPresenter;
     _evaluationService     = evaluationService;
 }
Exemple #9
0
 public FormController(IFamilyIntakeService familyIntakeService, IProgressNoteService progressNoteService, IEvaluationService evaluationService, IPsychiatricProgressNoteService psychiatricProgressNote, UserManager <ApplicationUser> userManager)
 {
     _familyIntakeService     = familyIntakeService;
     _progressNoteService     = progressNoteService;
     _evaluationService       = evaluationService;
     _psychiatricProgressNote = psychiatricProgressNote;
     _userManager             = userManager;
 }
Exemple #10
0
 public EvaluationsController(IHostingEnvironment hostingEnviroment, IEmailSender emailSender, ILogger <EvaluationsController> logger, ISeasonService seasonService, IEvaluationService evaluationService, IUserService userService)
 {
     this._logger            = logger;
     this._evaluationService = evaluationService;
     this._userService       = userService;
     this._seasonService     = seasonService;
     this._emailSender       = emailSender;
     this._environment       = hostingEnviroment;
 }
 public TakeEvaluationViewModel(IEvaluationService evaluationService, ILocalDbService localDbService,
                                IDialogService dialogService, ILocalEvaluationService localEvaluationService, msg_TakeEvaluation msgTakeEvaluation)
 {
     _evaluationService      = evaluationService;
     _localDbService         = localDbService;
     _dialogService          = dialogService;
     _localEvaluationService = localEvaluationService;
     _msgTakeEvaluation      = msgTakeEvaluation;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EvaluationController"/> class.
 /// </summary>
 /// <param name="mapper">Our Mapper injection</param>
 /// <param name="evaluationService">Evaluation servicer</param>
 /// <param name="logger">The Logger</param>
 public EvaluationController(
     IMapper mapper,
     IEvaluationService evaluationService,
     ILogger logger)
 {
     this.mapper            = mapper;
     this.evaluationService = evaluationService;
     this.logger            = logger;
 }
 public EvaluationsController(IEvaluationService evaluationService, IEmployeService employeeService,
                              IYearsForEval yearsForEval, UserManager <AppUser> userManager, IDepartmentService departmentService)
 {
     this.evaluationService = evaluationService;
     this.employeeService   = employeeService;
     this.yearsForEval      = yearsForEval;
     this.userManager       = userManager;
     this.departmentService = departmentService;
 }
Exemple #14
0
 public EvaluationsController(Club club, IEvaluationService evaluationService,
                              IEvaluationQuery evaluationQuery, IReportDesignerQuery reportDesignerQuery, ISquadQuery squadQuery)
 {
     this.club = club;
     this.evaluationService   = evaluationService;
     this.evaluationQuery     = evaluationQuery;
     this.reportDesignerQuery = reportDesignerQuery;
     this.squadQuery          = squadQuery;
 }
 public EvaluationsApiController(Club club, IReportDesigner reportDesigner, IReportDesignerQuery reportDesignerQuery,
                                 ITermSearchEngine termSearchEngine, IEvaluationQuery evaluationQuery, IEvaluationService evaluationService)
 {
     this.club                = club;
     this.reportDesigner      = reportDesigner;
     this.reportDesignerQuery = reportDesignerQuery;
     this.termSearchEngine    = termSearchEngine;
     this.evaluationQuery     = evaluationQuery;
     this.evaluationService   = evaluationService;
 }
Exemple #16
0
        public Evaluation GetEvaluationById(int evaluationId)
        {
            using (UnityManagerModule dataContainer = new UnityManagerModule())
            {
                dataContainer.Init();
                IEvaluationService evaluationService = dataContainer.Resolve <IEvaluationService>();

                return(evaluationService.GetEvaluationById(evaluationId));
            }
        }
 public StartEvaluationViewModel(IEvaluationService evaluationService, ILocalDbService localDbService,
                                 IDialogService dialogService, ILocalEvaluationService localEvaluationService, msg_StartEvaluation msgStartEvaluation)
 {
     _evaluationService      = evaluationService;
     _localDbService         = localDbService;
     _dialogService          = dialogService;
     _localEvaluationService = localEvaluationService;
     _msgStartEvaluation     = msgStartEvaluation;
     QuestionOptionsList     = new ObservableCollection <QuestionOptionItemModel>();
 }
Exemple #18
0
        public IEnumerable <Evaluation> GetAllEvaluationsForUser(string username)
        {
            using (UnityManagerModule dataContainer = new UnityManagerModule())
            {
                dataContainer.Init();
                IEvaluationService evaluationService = dataContainer.Resolve <IEvaluationService>();

                return(evaluationService.GetAllEvaluationsForUser(username));
            }
        }
Exemple #19
0
        public EvaluationController(IEvaluationService evaluationService, ISujetService sujetService, ICompteService compteService, IUserService userService, IReponseService reponseService, IQuestionService questionService)

        {
            _evaluationService = evaluationService;
            _sujetService      = sujetService;
            _userService       = userService;
            _compteService     = compteService;
            _reponseService    = reponseService;
            _questionService   = questionService;
        }
Exemple #20
0
        public IEnumerable <User> GetAllEvaluatorsForEvaluation(int evaluationId)
        {
            using (UnityManagerModule dataContainer = new UnityManagerModule())
            {
                dataContainer.Init();
                IEvaluationService evaluationService = dataContainer.Resolve <IEvaluationService>();

                IEnumerable <User> users = evaluationService.GetAllEvaluatorsForEvaluation(evaluationId);

                return(users);
            }
        }
Exemple #21
0
        public void CreateEvaluation(int userId, int evaluationTemplateId)
        {
            using (UnityManagerModule dataContainer = new UnityManagerModule())
            {
                dataContainer.Init();
                IEvaluationService eval = dataContainer.Resolve <IEvaluationService>();

                eval.CreateEvaluation(userId, evaluationTemplateId);

                UnitOfWork unitOfWork = new UnitOfWork();
                unitOfWork.SaveChanges();
            }
        }
Exemple #22
0
        public void AddEvaluatorToEvaluation(string username, string usernameEvaluator)
        {
            using (UnityManagerModule dataContainer = new UnityManagerModule())
            {
                dataContainer.Init();
                IEvaluationService evaluationService = dataContainer.Resolve <IEvaluationService>();

                evaluationService.AddEvaluatorToEvaluation(username, usernameEvaluator);

                var unitofwork = new UnitOfWork();

                unitofwork.SaveChanges();
            }
        }
Exemple #23
0
        public PackageManagerService(
            DependencyResolver dependencyResolver,
            IEvaluationService evaluationService,
            GetAgentConnectionHandler getAgentConnectionHandler)
        {
            this.evaluationService = evaluationService
                                     ?? throw new ArgumentNullException(nameof(evaluationService));

            this.dependencyResolver = dependencyResolver
                                      ?? throw new ArgumentNullException(nameof(dependencyResolver));

            this.getAgentConnectionHandler = getAgentConnectionHandler
                                             ?? throw new ArgumentNullException(nameof(getAgentConnectionHandler));
        }
Exemple #24
0
        public string Print(IEvaluationService evaluationService = null)
        {
            const string separators        = "   +---+---+---+---+---+---+---+---+";
            const string fileMarkers       = "     A   B   C   D   E   F   G   H  ";
            const bool   useUnicodeSymbols = false;

            var infos = new List <string>();

            infos.Add("Hash key: " + Key.ToString("X").PadLeft(16, '0'));
            infos.Add("To move: " + (WhiteToMove ? "White" : "Black"));
            infos.Add("Material: " + (WhiteMaterial - BlackMaterial));
            infos.Add("White material: " + WhiteMaterial);
            infos.Add("Black material: " + BlackMaterial);
            if (evaluationService != null)
            {
                var score = evaluationService.Evaluate(this);
                if (!WhiteToMove)
                {
                    score = -score;
                }
                infos.Add("Evaluation: " + score);
            }

            var sb = new StringBuilder();

            for (var i = 7; i >= 0; i--)
            {
                sb.AppendLine(separators);
                sb.Append(" " + (i + 1) + " ");

                for (var j = 0; j < 8; j++)
                {
                    var piece     = ArrayBoard[i * 8 + j];
                    var pieceChar = useUnicodeSymbols ? ChessPiece.ChessPieceToSymbol(piece) : ChessPiece.ChessPieceToLetter(piece);
                    sb.Append($"| {pieceChar} ");
                }
                sb.Append("|   ");
                if (infos.Count > 7 - i)
                {
                    sb.Append(infos[7 - i]);
                }
                sb.AppendLine();
            }
            sb.AppendLine(separators);
            sb.AppendLine(fileMarkers);
            return(sb.ToString());
        }
Exemple #25
0
 public UserController(UserManager <ApplicationUser> userManager, ILogger <UserController> logger,
                       IEmailSender emailSender, SignInManager <ApplicationUser> signInManager, RoleManager <IdentityRole> roleMgr, IProfileService profileService, IEnrollmentService enrollmentService, IProfileMatchService profileMatchService, ICoupleScreeningService coupleScreeningService, IClinicianService clinicianService, IEvaluationService evaluationService, IEmergencyContactService emergencyContactService, IWebHostEnvironment environment)
 {
     _userManager             = userManager;
     _logger                  = logger;
     _emailSender             = emailSender;
     _signInManager           = signInManager;
     roleManager              = roleMgr;
     _profileService          = profileService;
     _enrollmentService       = enrollmentService;
     _profileMatchService     = profileMatchService;
     _coupleScreeningService  = coupleScreeningService;
     _clinicianService        = clinicianService;
     _evaluationService       = evaluationService;
     _emergencyContactService = emergencyContactService;
     _environment             = environment;
 }
Exemple #26
0
 public EvaluationsController(UserManager <AppUser> userManager, IEvaluationService evaluationService)
 {
     this.userManager       = userManager;
     this.evaluationService = evaluationService;
 }
Exemple #27
0
 public AccountController(IAccountService accountService,
     IEvaluationService evaluationService)
 {
     this.accountService = accountService;
     this.evaluationService = evaluationService;
 }
 public EvaluationController(IQuestionService questionService,
     IEvaluationService evaluationService)
 {
     this.questionService = questionService;
     this.evaluationService = evaluationService;
 }
 public EvaluationController(IEvaluationService service, IMapper mapper)
 {
     _service = service;
     _mapper  = mapper;
 }
 public EvaluationAppService(IEvaluationService evaluationService)
 {
     this._evaluationService = evaluationService;
 }
Exemple #31
0
 public EvaluationsController(IEvaluationService evaluationService, ILogger <EvaluationsController> logger, UserManager <ApplicationUser> userManager)
 {
     this._evaluationService = evaluationService;
     this._logger            = logger;
     this._userManager       = userManager;
 }
 public EvaluationController(IEvaluationService evaluationService)
 {
     _evaluationService = evaluationService;
 }
 public EvaluationController(IEvaluationService evaluationService)
 {
     this.evaluationService = evaluationService;
 }