private bool Create() { int newID = 0; newID = DBProductComment.Create( this.parentID, this.productID, this.title, this.contentText, this.fullName, this.email, this.isApproved, this.rating, this.helpfulYesTotal, this.helpfulNoTotal, this.userID, this.createdUtc, this.status, this.userGuid, this.position, this.createdFromIP, this.isModerator, this.moderationReason, this.commentType); this.commentID = newID; return(newID > 0); }
public static int GetCount( int siteId, int productId, int commentType, int approvedStatus, int parentId, int position, DateTime?fromDate, DateTime?toDate, string keyword) { return(DBProductComment.GetCount(siteId, productId, commentType, approvedStatus, parentId, position, fromDate, toDate, keyword)); }
private void GetProductComment(int commentId) { using (IDataReader reader = DBProductComment.GetOne(commentId)) { if (reader.Read()) { this.commentID = Convert.ToInt32(reader["CommentID"]); this.parentID = Convert.ToInt32(reader["ParentID"]); this.productID = Convert.ToInt32(reader["ProductID"]); this.title = reader["Title"].ToString(); this.contentText = reader["ContentText"].ToString(); this.fullName = reader["FullName"].ToString(); this.email = reader["Email"].ToString(); this.isApproved = Convert.ToBoolean(reader["IsApproved"]); this.rating = Convert.ToInt32(reader["Rating"]); this.helpfulYesTotal = Convert.ToInt32(reader["HelpfulYesTotal"]); this.helpfulNoTotal = Convert.ToInt32(reader["HelpfulNoTotal"]); this.userID = Convert.ToInt32(reader["UserID"]); this.createdUtc = Convert.ToDateTime(reader["CreatedUtc"]); if (reader["Status"] != DBNull.Value) { this.status = Convert.ToInt32(reader["Status"]); } if (reader["UserGuid"] != DBNull.Value) { this.userGuid = new Guid(reader["UserGuid"].ToString()); } if (reader["Position"] != DBNull.Value) { this.position = Convert.ToInt32(reader["Position"]); } if (reader["CreatedFromIP"] != DBNull.Value) { this.createdFromIP = reader["CreatedFromIP"].ToString(); } if (reader["IsModerator"] != DBNull.Value) { this.isModerator = Convert.ToBoolean(reader["IsModerator"]); } if (reader["ModerationReason"] != DBNull.Value) { this.moderationReason = reader["ModerationReason"].ToString(); } if (reader["CommentType"] != DBNull.Value) { this.commentType = Convert.ToInt32(reader["CommentType"]); } } } }
private bool Update() { return(DBProductComment.Update( this.commentID, this.parentID, this.productID, this.title, this.contentText, this.fullName, this.email, this.isApproved, this.rating, this.helpfulYesTotal, this.helpfulNoTotal, this.userID, this.createdUtc, this.status, this.userGuid, this.position, this.createdFromIP, this.isModerator, this.moderationReason)); }
public static List <ProductComment> GetPage(int siteId, int productId, int commentType, int approvedStatus, int parentId, int position, DateTime?fromDate, DateTime?toDate, string keyword, int orderBy, int pageNumber, int pageSize = 32767) { IDataReader reader = DBProductComment.GetPage(siteId, productId, commentType, approvedStatus, parentId, position, fromDate, toDate, keyword, orderBy, pageNumber, pageSize); return(LoadListFromReader(reader)); }
public static bool UpdateYesTotal(int commentId, int helpfulYesTotal) { return(DBProductComment.UpdateYesTotal(commentId, helpfulYesTotal)); }
public static bool DeleteByProduct(int productId) { return(DBProductComment.DeleteByProduct(productId)); }
public static bool Delete(int commentId) { return(DBProductComment.Delete(commentId)); }