Esempio n. 1
0
 /// <summary>
 /// エントリー詳細の新しいインスタンスを生成します。
 /// </summary>
 /// <param name="teamCode">団体登録番号。</param>
 /// <param name="teamName">団体名。</param>
 /// <param name="teamAbbreviatedName">団体名略称。</param>
 /// <param name="playerCode">登録番号。</param>
 /// <param name="playerFamilyName">姓。</param>
 /// <param name="playerFirstName">名。</param>
 /// <param name="point">ポイント。</param>
 public EntryPlayer(
     TeamCode teamCode,
     TeamName teamName,
     TeamAbbreviatedName teamAbbreviatedName,
     PlayerCode playerCode,
     PlayerFamilyName playerFamilyName,
     PlayerFirstName playerFirstName,
     Point point)
 {
     this.TeamCode            = teamCode;
     this.TeamName            = teamName;
     this.TeamAbbreviatedName = teamAbbreviatedName;
     this.PlayerCode          = playerCode;
     this.PlayerFamilyName    = playerFamilyName;
     this.PlayerFirstName     = playerFirstName;
     this.Point = point;
 }
Esempio n. 2
0
        /// <summary>
        /// 団体新規登録申請
        /// </summary>
        /// <param name="dto">団体申請用 DTO。</param>
        /// <returns>団体</returns>
        public async Task <Team> RequestTeamNewRegistration(RequestTeamNewRegistrationDto dto)
        {
            var team = new Team(
                null,
                Enumeration.FromValue <TeamType>(dto.TeamType),
                new TeamName(dto.TeamName),
                TeamAbbreviatedName.Parse(dto.TeamName),
                dto.RepresentativeName,
                dto.RepresentativeEmailAddress,
                dto.TelephoneNumber,
                dto.Address,
                dto.CoachName,
                dto.CoachEmailAddress,
                null);

            team = await this.teamRepository.Add(team);

            var season = await this.seasonRepository.FindByDate(DateTime.Today);

            var teamRegistrationFee = team.TeamType == TeamType.School ? 0 : season.TeamRegistrationFee.Value;
            var reservationNumber   = await ReservationNumberFactory.Create(this.reservationNumberRepository);

            var requestTeam = new RequestTeam(
                team.Id,
                season.Id,
                reservationNumber,
                ApproveState.Unapproved,
                DateTime.Now,
                new RequestedFee(teamRegistrationFee),
                null,
                MailState.Unsent
                );

            await this.requestTeamRepository.Add(requestTeam);

            return(team);
        }
        public void 団体名略称は13文字まで有効()
        {
            var act = new TeamAbbreviatedName("あいうえおかきくけこあいう");

            Assert.Equal("あいうえおかきくけこあいう", act.Value);
        }
        public void 団体名略称にParseする際に全角英数字と半角カナを変換()
        {
            var act = TeamAbbreviatedName.Parse("0Aa0Aaアア");

            Assert.Equal("0Aa0Aaアア", act.Value);
        }