Пример #1
0
 /// <summary>
 /// Gets an instance of ContactFormMessage.
 /// </summary>
 /// <param name="rowGuid"> rowGuid </param>
 private void GetContactFormMessage(
     Guid rowGuid)
 {
     using (IDataReader reader = DBContactFormMessage.GetOne(rowGuid))
     {
         PopulateFromReader(reader);
     }
 }
Пример #2
0
        ///// <summary>
        ///// Gets an IList with all instances of ContactFormMessage.
        ///// </summary>
        //public static List<ContactFormMessage> GetAll()
        //{
        //    IDataReader reader = DBContactFormMessage.GetAll();
        //    return LoadListFromReader(reader);

        //}


        /// <summary>
        /// Gets an IList with page of instances of ContactFormMessage.
        /// </summary>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="pageSize">Size of the page.</param>
        /// <param name="totalPages">total pages</param>
        public static IDataReader GetPageReader(
            Guid moduleGuid,
            int pageNumber,
            int pageSize,
            out int totalPages)
        {
            totalPages = 1;
            return(DBContactFormMessage.GetPage(moduleGuid, pageNumber, pageSize, out totalPages));
        }
Пример #3
0
        /// <summary>
        /// Gets an IList with page of instances of ContactFormMessage.
        /// </summary>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="pageSize">Size of the page.</param>
        /// <param name="totalPages">total pages</param>
        public static List <ContactFormMessage> GetPage(
            Guid moduleGuid,
            int pageNumber,
            int pageSize,
            out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBContactFormMessage.GetPage(moduleGuid, pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader));
        }
Пример #4
0
 /// <summary>
 /// Updates this instance of ContactFormMessage. Returns true on success.
 /// </summary>
 /// <returns>bool</returns>
 private bool Update()
 {
     return(DBContactFormMessage.Update(
                this.rowGuid,
                this.siteGuid,
                this.moduleGuid,
                this.email,
                this.userName,
                this.subject,
                this.message,
                this.createdUtc,
                this.createdFromIpAddress,
                this.userGuid));
 }
Пример #5
0
        /// <summary>
        /// Persists a new instance of ContactFormMessage. Returns true on success.
        /// </summary>
        /// <returns></returns>
        private bool Create()
        {
            if (rowGuid == Guid.Empty)
            {
                rowGuid = Guid.NewGuid();
            }

            int rowsAffected = DBContactFormMessage.Create(
                this.rowGuid,
                this.siteGuid,
                this.moduleGuid,
                this.email,
                this.userName,
                this.subject,
                this.message,
                this.createdUtc,
                this.createdFromIpAddress,
                this.userGuid);

            return(rowsAffected > 0);
        }
Пример #6
0
 /// <summary>
 /// Gets a count of ContactFormMessage.
 /// </summary>
 public static int GetCount(Guid moduleGuid)
 {
     return(DBContactFormMessage.GetCount(moduleGuid));
 }
Пример #7
0
 public static bool DeleteBySite(int siteId)
 {
     return(DBContactFormMessage.DeleteBySite(siteId));
 }
Пример #8
0
 public static bool DeleteByModule(Guid moduleGuid)
 {
     return(DBContactFormMessage.DeleteByModule(moduleGuid));
 }
Пример #9
0
 /// <summary>
 /// Deletes an instance of ContactFormMessage. Returns true on success.
 /// </summary>
 /// <param name="rowGuid"> rowGuid </param>
 /// <returns>bool</returns>
 public static bool Delete(Guid rowGuid)
 {
     return(DBContactFormMessage.Delete(rowGuid));
 }