private static List <LetterInfo> LoadFromReader(IDataReader reader) { List <LetterInfo> letterInfoList = new List <LetterInfo>(); try { while (reader.Read()) { LetterInfo letterInfo = new LetterInfo(); letterInfo.letterInfoGuid = new Guid(reader["LetterInfoGuid"].ToString()); letterInfo.siteGuid = new Guid(reader["SiteGuid"].ToString()); letterInfo.title = reader["Title"].ToString(); letterInfo.description = reader["Description"].ToString(); letterInfo.availableToRoles = reader["AvailableToRoles"].ToString(); letterInfo.enabled = Convert.ToBoolean(reader["Enabled"]); letterInfo.allowUserFeedback = Convert.ToBoolean(reader["AllowUserFeedback"]); letterInfo.allowAnonFeedback = Convert.ToBoolean(reader["AllowAnonFeedback"]); letterInfo.fromAddress = reader["FromAddress"].ToString(); letterInfo.fromName = reader["FromName"].ToString(); letterInfo.replyToAddress = reader["ReplyToAddress"].ToString(); letterInfo.sendMode = Convert.ToInt32(reader["SendMode"]); letterInfo.enableViewAsWebPage = Convert.ToBoolean(reader["EnableViewAsWebPage"]); letterInfo.enableSendLog = Convert.ToBoolean(reader["EnableSendLog"]); letterInfo.rolesThatCanEdit = reader["RolesThatCanEdit"].ToString(); letterInfo.rolesThatCanApprove = reader["RolesThatCanApprove"].ToString(); letterInfo.rolesThatCanSend = reader["RolesThatCanSend"].ToString(); letterInfo.createdUTC = Convert.ToDateTime(reader["CreatedUTC"]); letterInfo.createdBy = new Guid(reader["CreatedBy"].ToString()); letterInfo.lastModUTC = Convert.ToDateTime(reader["LastModUTC"]); letterInfo.lastModBy = new Guid(reader["LastModBy"].ToString()); letterInfo.subscriberCount = Convert.ToInt32(reader["SubscriberCount"]); letterInfo.unVerifiedCount = Convert.ToInt32(reader["UnVerifiedCount"]); letterInfo.AllowArchiveView = Convert.ToBoolean(reader["AllowArchiveView"]); letterInfo.ProfileOptIn = Convert.ToBoolean(reader["ProfileOptIn"]); letterInfo.SortRank = Convert.ToInt32(reader["SortRank"]); letterInfoList.Add(letterInfo); } } finally { reader.Close(); } return(letterInfoList); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByLastModUtc(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.LastModUtc.CompareTo(letterInfo2.LastModUtc)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByCreatedUtc(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.CreatedUtc.CompareTo(letterInfo2.CreatedUtc)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByRolesThatCanSend(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.RolesThatCanSend.CompareTo(letterInfo2.RolesThatCanSend)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByRolesThatCanApprove(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.RolesThatCanApprove.CompareTo(letterInfo2.RolesThatCanApprove)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByRolesThatCanEdit(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.RolesThatCanEdit.CompareTo(letterInfo2.RolesThatCanEdit)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareBySendMode(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.SendMode.CompareTo(letterInfo2.SendMode)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByReplyToAddress(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.ReplyToAddress.CompareTo(letterInfo2.ReplyToAddress)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByFromName(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.FromName.CompareTo(letterInfo2.FromName)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByFromAddress(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.FromAddress.CompareTo(letterInfo2.FromAddress)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByAvailableToRoles(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.AvailableToRoles.CompareTo(letterInfo2.AvailableToRoles)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByDescription(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.Description.CompareTo(letterInfo2.Description)); }
/// <summary> /// Compares 2 instances of LetterInfo. /// </summary> public static int CompareByTitle(LetterInfo letterInfo1, LetterInfo letterInfo2) { return(letterInfo1.Title.CompareTo(letterInfo2.Title)); }