コード例 #1
0
ファイル: ForumEvent.cs プロジェクト: huwred/SnitzDotNet
 private EventInfo CopyEventToBO(SqlDataReader rdr)
 {
     //Id,Title,Type,Audience,Author,EventDate,Description
     EventInfo forumevent = new EventInfo
     {
                                    Id = rdr.GetInt32(0),
                                    Title = rdr.SafeGetString(1),
                                    Type = rdr.GetInt32(2),
                                    Audience = rdr.SafeGetString(3),
                                    MemberId = rdr.GetInt32(4),
                                    Date = rdr.GetSnitzDate(5).Value,
                                    Description = rdr.SafeGetString(6),
                                    RecurringFrequency = (RecurringFrequencies) rdr.SafeGetInt32(7)
                                };
     var mem = new Member();
     forumevent.Author = new AuthorInfo(mem.GetById(forumevent.MemberId));
     return forumevent;
 }