public UserService(IPatientService patientServ, IDoctorService _doctor, ISecretaryService secretaryService, IDirectorService directorService)
 {
     _patientService   = patientServ;
     _doctorService    = _doctor;
     _secretaryService = secretaryService;
     _directorService  = directorService;
 }
Esempio n. 2
0
 public SecretaryController(
     ISecretaryService service,
     IConverter <Secretary, SecretaryDTO> secretaryConverter
     )
 {
     _service            = service;
     _secretaryConverter = secretaryConverter;
 }
Esempio n. 3
0
 /// <summary>
 /// Account controller constructor
 /// </summary>
 public AccountsController(IAccountService accountService,
                           IStudentService studentService,
                           IMentorService mentorService,
                           ISecretaryService secretaryService,
                           IOptions <AuthOptions> authOptions)
 {
     _accountService   = accountService;
     _studentService   = studentService;
     _mentorService    = mentorService;
     _secretaryService = secretaryService;
     _authOptions      = authOptions.Value;
 }
Esempio n. 4
0
        private void UpdateReportsCountText(int managerId)
        {
            ISecretaryService       secretaryService = Services.SecretaryService;
            ILocalizationRepository localization     = Services.ResourceService.Localization;
            int reportCount = secretaryService.GetReportCount(managerId);

            if (reportCount == 0)
            {
                reportCountText.text = localization.GetString("lbl_no_reports");
            }
            else
            {
                reportCountText.text = string.Format(localization.GetString("fmt_reports_count"), reportCount.ToString().Colored(ConsoleTextColor.red));
            }
        }
Esempio n. 5
0
        public void Setup(int managerId)
        {
            ISecretaryService       secretaryService = Services.GetService <ISecretaryService>();
            ILocalizationRepository localization     = Services.ResourceService.Localization;

            this.manager = Services.GetService <IManagerService>().GetManager(managerId);
            auditorView.Setup(Services.GenerationService.GetGetenerator(managerId));
            UpdateReportsCountText(managerId);
            UpdateManagerEfficiency();
            UpdateSecretaryCountText();

            buySecretaryButton.SetListener(() => {
                BosError error = BosError.Ok;

                if (Services.SecretaryService.IsAllowBuySecretary(manager.Id, out error))
                {
                    BosError status = secretaryService.BuySecretary(manager.Id);
                    if (status == BosError.Ok)
                    {
                        Services.GetService <ISoundService>().PlayOneShot(SoundName.buyGenerator);
                    }
                    else
                    {
                        Services.GetService <ISoundService>().PlayOneShot(SoundName.slotFail);
                    }
                }
                else
                {
                    if (error == BosError.NoEnoughCoins)
                    {
                        Services.ViewService.Show(ViewType.CoinRequiredView, new ViewData {
                            UserData  = Services.SecretaryService.GetNextSecretaryPrice(manager.Id),
                            ViewDepth = ViewService.NextViewDepth,
                        });
                        Sounds.PlayOneShot(SoundName.click);
                    }
                }
            });
            UpdateBuyButtonState();
            UpdateSecretaryPriceText();
            CreateConstSecretaryAnimObject();

            if (!isInitialized)
            {
                isInitialized = true;
            }
        }
 public SecretariesController(ISecretaryService secretaryService, IAccountService accountService)
 {
     _secretaryService = secretaryService;
     _accountService   = accountService;
 }
 public SecretaryController(ISecretaryService service)
 {
     _secretaryService = service;
 }
 public SecretaryController(ISecretaryService service, IUow uow) : base(uow)
 {
     _service = service;
 }