Exemplo n.º 1
0
 /// <summary>
 /// Updates this instance of LetterInfo. Returns true on success.
 /// </summary>
 /// <returns>bool</returns>
 private bool Update()
 {
     return(DBLetterInfo.Update(
                this.letterInfoGuid,
                this.siteGuid,
                this.title,
                this.description,
                this.availableToRoles,
                this.enabled,
                this.allowUserFeedback,
                this.allowAnonFeedback,
                this.fromAddress,
                this.fromName,
                this.replyToAddress,
                this.sendMode,
                this.enableViewAsWebPage,
                this.enableSendLog,
                this.rolesThatCanEdit,
                this.rolesThatCanApprove,
                this.rolesThatCanSend,
                this.createdUTC,
                this.createdBy,
                this.lastModUTC,
                this.lastModBy,
                this.allowArchiveView,
                this.profileOptIn,
                this.sortRank));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Persists a new instance of LetterInfo. Returns true on success.
        /// </summary>
        /// <returns></returns>
        private bool Create()
        {
            Guid newID = Guid.NewGuid();

            this.letterInfoGuid = newID;

            int rowsAffected = DBLetterInfo.Create(
                this.letterInfoGuid,
                this.siteGuid,
                this.title,
                this.description,
                this.availableToRoles,
                this.enabled,
                this.allowUserFeedback,
                this.allowAnonFeedback,
                this.fromAddress,
                this.fromName,
                this.replyToAddress,
                this.sendMode,
                this.enableViewAsWebPage,
                this.enableSendLog,
                this.rolesThatCanEdit,
                this.rolesThatCanApprove,
                this.rolesThatCanSend,
                this.createdUTC,
                this.createdBy,
                this.lastModUTC,
                this.lastModBy,
                this.allowArchiveView,
                this.profileOptIn,
                this.sortRank);

            return(rowsAffected > 0);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Updates this instance of LetterInfo. Returns true on success.
 /// </summary>
 /// <returns>bool</returns>
 private bool Update()
 {
     return(DBLetterInfo.Update(
                this.LetterInfoGuid,
                this.SiteGuid,
                this.Title,
                this.Description,
                this.AvailableToRoles,
                this.Enabled,
                this.AllowUserFeedback,
                this.AllowAnonFeedback,
                this.FromAddress,
                this.FromName,
                this.ReplyToAddress,
                this.SendMode,
                this.EnableViewAsWebPage,
                this.EnableSendLog,
                this.RolesThatCanEdit,
                this.RolesThatCanApprove,
                this.RolesThatCanSend,
                this.CreatedUtc,
                this.CreatedBy,
                this.LastModUtc,
                this.LastModBy,
                this.AllowArchiveView,
                this.ProfileOptIn,
                this.SortRank,
                this.DisplayNameDefault,
                this.FirstNameDefault,
                this.LastNameDefault));
 }
Exemplo n.º 4
0
        /// <summary>
        /// Gets an IList with page of instances of LetterInfo.
        /// </summary>
        public static List <LetterInfo> GetPage(
            Guid siteGuid,
            int pageNumber,
            int pageSize,
            out int totalPages)
        {
            totalPages = 1;

            IDataReader reader
                = DBLetterInfo.GetPage(
                      siteGuid,
                      pageNumber,
                      pageSize,
                      out totalPages);

            return(LoadFromReader(reader));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Gets an instance of LetterInfo.
        /// </summary>
        /// <param name="letterInfoGuid"> letterInfoGuid </param>
        private void GetLetterInfo(Guid letterInfoGuid)
        {
            using (IDataReader reader = DBLetterInfo.GetOne(letterInfoGuid))
            {
                if (reader.Read())
                {
                    this.letterInfoGuid      = new Guid(reader["LetterInfoGuid"].ToString());
                    this.siteGuid            = new Guid(reader["SiteGuid"].ToString());
                    this.title               = reader["Title"].ToString();
                    this.description         = reader["Description"].ToString();
                    this.availableToRoles    = reader["AvailableToRoles"].ToString();
                    this.enabled             = Convert.ToBoolean(reader["Enabled"]);
                    this.allowUserFeedback   = Convert.ToBoolean(reader["AllowUserFeedback"]);
                    this.allowAnonFeedback   = Convert.ToBoolean(reader["AllowAnonFeedback"]);
                    this.fromAddress         = reader["FromAddress"].ToString();
                    this.fromName            = reader["FromName"].ToString();
                    this.replyToAddress      = reader["ReplyToAddress"].ToString();
                    this.sendMode            = Convert.ToInt32(reader["SendMode"]);
                    this.enableViewAsWebPage = Convert.ToBoolean(reader["EnableViewAsWebPage"]);
                    this.enableSendLog       = Convert.ToBoolean(reader["EnableSendLog"]);
                    this.rolesThatCanEdit    = reader["RolesThatCanEdit"].ToString();
                    this.rolesThatCanApprove = reader["RolesThatCanApprove"].ToString();
                    this.rolesThatCanSend    = reader["RolesThatCanSend"].ToString();
                    this.subscriberCount     = Convert.ToInt32(reader["SubscriberCount"]);
                    this.unVerifiedCount     = Convert.ToInt32(reader["UnVerifiedCount"]);
                    this.createdUTC          = Convert.ToDateTime(reader["CreatedUTC"]);
                    this.createdBy           = new Guid(reader["CreatedBy"].ToString());
                    this.lastModUTC          = Convert.ToDateTime(reader["LastModUTC"]);
                    this.lastModBy           = new Guid(reader["LastModBy"].ToString());

                    this.allowArchiveView = Convert.ToBoolean(reader["AllowArchiveView"]);
                    this.profileOptIn     = Convert.ToBoolean(reader["ProfileOptIn"]);
                    this.sortRank         = Convert.ToInt32(reader["SortRank"]);

                    this.displayNameDefault = reader["DisplayNameDefault"].ToString();
                    this.firstNameDefault   = reader["FirstNameDefault"].ToString();
                    this.lastNameDefault    = reader["LastNameDefault"].ToString();
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Gets an IList with all instances of LetterInfo.
        /// </summary>
        public static List <LetterInfo> GetAll(Guid siteGuid)
        {
            IDataReader reader = DBLetterInfo.GetAll(siteGuid);

            return(LoadFromReader(reader));
        }
Exemplo n.º 7
0
 /// <summary>
 /// Updates the subscriber count on an instance of LetterInfo.
 /// </summary>
 /// <param name="letterInfoGuid"> letterInfoGuid </param>
 /// <returns>bool</returns>
 public static bool UpdateSubscriberCount(Guid letterInfoGuid)
 {
     return(DBLetterInfo.UpdateSubscriberCount(letterInfoGuid));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Deletes an instance of LetterInfo. Returns true on success.
 /// </summary>
 /// <param name="letterInfoGuid"> letterInfoGuid </param>
 /// <returns>bool</returns>
 public static bool Delete(Guid letterInfoGuid)
 {
     return(DBLetterInfo.Delete(letterInfoGuid));
 }
Exemplo n.º 9
0
 /// <summary>
 /// Gets a count of rows in the cy_LetterInfo table.
 /// </summary>
 public static int GetCount(Guid siteGuid)
 {
     return(DBLetterInfo.GetCount(siteGuid));
 }