コード例 #1
0
 private User GetUserFromReader(SqlNullDataReader reader)
 {
     return(new User(this.Name, reader.GetString("UserName"),
                     reader.GetInt32("UserId"), reader.GetString("Email"), reader.GetString("PasswordQuestion"),
                     null, reader.GetBoolean("IsApproved"), reader.GetBoolean("IsLockedOut"),
                     reader.GetDateTime("DateCreated"), reader.GetDateTime("DateLastLogin"),
                     DateTime.Now, reader.GetDateTime("DateLastPasswordChanged"), reader.GetDateTime("DateLastLockOut"),
                     reader.GetGuid("ConfirmationCode"), reader.GetInt32("Tokens"), reader.GetString("DisplayName"),
                     reader.GetString("ImageUrl"), reader.GetDateTime("BirthDate")));
 }
コード例 #2
0
ファイル: Post.cs プロジェクト: lionsguard/perenthia
 internal Post(SqlNullDataReader reader)
     : this()
 {
     this.ID                = reader.GetInt32("ContentPostId");
     this.Author            = reader.GetString("Author");
     this.Title             = reader.GetString("Title");
     this.Text              = reader.GetString("PostText");
     this.IsPublished       = reader.GetBoolean("IsPublished");
     this.IsCommentsEnabled = reader.GetBoolean("IsCommentsEnabled");
     this.DateCreated       = reader.GetDateTime("DateCreated");
 }
コード例 #3
0
ファイル: Product.cs プロジェクト: lionsguard/perenthia
 internal Product(SqlNullDataReader reader)
 {
     this.Quantity         = 1;
     this.ID               = reader.GetInt32("ProductId");
     this.Name             = reader.GetString("ProductName");
     this.UnitPrice        = reader.GetDecimal("UnitPrice");
     this.PurchaseQuantity = reader.GetInt32("PurchaseQuantity");
     this.Description      = reader.GetString("Description");
     this.ImageUrl         = reader.GetString("ImageUrl");
     this.IsActive         = reader.GetBoolean("IsActive");
 }