Exemple #1
0
        public string AddTournamentPin(
            [FromRoute] string cpr, [FromBody] TournamentReq tournament, [FromServices] IMembershipRepo repo
            )
        {
            var member = repo.GetMember(cpr);

            member.TournamentPin = new TournamentPin(tournament.Date);
            repo.UpdateMember(member);
            return("ok");
        }
Exemple #2
0
        public string UpdateName(
            [FromRoute] string cpr, [FromBody] NameReq nameReq, [FromServices] IMembershipRepo repo
            )
        {
            var member = repo.GetMember(cpr);

            member.Name = nameReq.Name;
            repo.UpdateMember(member);
            return("ok");
        }
Exemple #3
0
        public string UpdatePhone(
            [FromRoute] string cpr, [FromBody] PhoneReq phoneReq, [FromServices] IMembershipRepo repo
            )
        {
            var member = repo.GetMember(cpr);

            if (member is Employee e)
            {
                e.Phone = phoneReq.Phone;
                repo.UpdateMember(e);
            }

            return("ok");
        }
Exemple #4
0
        public string UpdateCompany(
            [FromRoute] string cpr, [FromBody] CompanyReq companyReq, [FromServices] IMembershipRepo repo
            )
        {
            var member = repo.GetMember(cpr);

            if (member is Employee e)
            {
                e.Company = companyReq.Company;
                repo.UpdateMember(e);
            }

            return("ok");
        }
Exemple #5
0
        public string UpdateAddress(
            [FromRoute] string cpr, [FromBody] AddressReq addressReq, [FromServices] IMembershipRepo repo
            )
        {
            var member = repo.GetMember(cpr);

            if (member is Employee e)
            {
                e.Address = addressReq.Address;
                repo.UpdateMember(e);
            }

            return("ok");
        }
Exemple #6
0
        public string UpdateEmail(
            [FromRoute] string cpr, [FromBody] EmailReq emailReq, [FromServices] IMembershipRepo repo
            )
        {
            var member = repo.GetMember(cpr);

            if (member is Employee e)
            {
                e.Email = emailReq.Email;
                repo.UpdateMember(e);
            }

            return("ok");
        }
Exemple #7
0
 public IndexModel
     (IMeProvider meProvider
     , IEventRepo eventRepo
     , IMembershipRepo membershipRepo
     , IParticipationRepo participationRepo
     , IParticipationTextProvider participationTextProvider
     , IPostRepo postRepo
     , IMailService mailService
     )
 {
     //this.dbContext = dbContext;
     this.meProvider                = meProvider;
     this.eventRepo                 = eventRepo;
     this.membershipRepo            = membershipRepo;
     this.participationRepo         = participationRepo;
     this.participationTextProvider = participationTextProvider;
     this.postRepo    = postRepo;
     this.mailService = mailService;
 }
 public EditModel(IMembershipRepo repo)
 {
     this.repo = repo;
 }
        // private UtisDb db = new UtisDb();

        public MembershipsController(IMembershipRepo repo)
        {
            this.repo = repo;
        }
Exemple #10
0
 public MembershipService(IMembershipRepo membershipRepo)
 {
     _membershipRepo = membershipRepo;
 }
 public DeleteModel(IMembershipRepo repo)
 {
     this.repo = repo;
 }
Exemple #12
0
 public SearchInteractor(IMembershipRepo repo, ISearchPresenter presenter)
 {
     _repo      = repo;
     _presenter = presenter;
 }
Exemple #13
0
 public IndexModel(IMembershipRepo repo, IMeProvider meProvider)
 {
     this.repo       = repo;
     this.meProvider = meProvider;
 }
 public CreateMembershipInteractor(ICreateMembershipPresenter cmPresenter, IMembershipRepo mRepo)
 {
     _cmPresenter = cmPresenter;
     _mRepo       = mRepo;
 }