本文整理汇总了C#中Participant.CreateParticiantList方法的典型用法代码示例。如果您正苦于以下问题:C# Participant.CreateParticiantList方法的具体用法?C# Participant.CreateParticiantList怎么用?C# Participant.CreateParticiantList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Participant
的用法示例。
在下文中一共展示了Participant.CreateParticiantList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
/* TODO:以下を実装
* 実績登録
* 実績出力
* 実績削除
* 人出力
* 人登録
* 人削除
* 会登録
* 会表示
* 会削除
* */
IDbConnection conn = GetConnection();
conn.Open();
MeetingRepository meetingRepository = new MeetingRepository(conn);
MeetingInputSequence meetingInputSequence = new MeetingInputSequence(meetingRepository);
meetingInputSequence.Start();
conn.Close();
conn.Open();
meetingRepository = new MeetingRepository(conn);
OutputMeetingListSequence outputMeetingListSequence = new OutputMeetingListSequence(meetingRepository);
outputMeetingListSequence.Start();
conn.Close();
Console.Write("会ID:");
string meetingID = Console.ReadLine();
Console.WriteLine("");
conn.Open();
PeopleRepository peopleRepository = new PeopleRepository(conn);
IEnumerable<Person> people = peopleRepository.GetAll();
foreach (Person p in people)
{
Console.WriteLine(p.PersonId + "-" + p.Name + "-" + p.Kana);
}
conn.Close();
Console.Write("参加者(カンマ区切り):");
string InParticipant = Console.ReadLine();
Console.WriteLine("");
Console.Write("実績時間(分):");
string time = Console.ReadLine();
Console.WriteLine("");
Participant participant = new Participant(InParticipant);
List<int> particiantList = participant.CreateParticiantList();
Achievement achivement = null;
foreach (int l in particiantList)
{
achivement = new Achievement();
achivement.PersonId = l;
//achivement.Date = DateTime.Parse(date);
if (meetingID == "")
{
achivement.MeetingId = 0;
}
else
{
achivement.MeetingId = int.Parse(meetingID);
}
achivement.Time = int.Parse(time);
conn.Open();
AchievementRepository achivementRepository = new AchievementRepository(conn);
achivementRepository.Insert(achivement);
conn.Close();
}
}