/// <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); } }
///// <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)); }
/// <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)); }
/// <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)); }
/// <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); }
/// <summary> /// Gets a count of ContactFormMessage. /// </summary> public static int GetCount(Guid moduleGuid) { return(DBContactFormMessage.GetCount(moduleGuid)); }
public static bool DeleteBySite(int siteId) { return(DBContactFormMessage.DeleteBySite(siteId)); }
public static bool DeleteByModule(Guid moduleGuid) { return(DBContactFormMessage.DeleteByModule(moduleGuid)); }
/// <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)); }