public static bool DeleteArticleCategory(int categoryId) { ArticleCategoryInfo articleCategory = new ArticleCategoryInfo(); articleCategory.CategoryId = categoryId; return(CommentsProvider.Instance().CreateUpdateDeleteArticleCategory(articleCategory, DataProviderAction.Delete)); }
public static bool DeleteHelpCategory(int categoryId) { HelpCategoryInfo helpCategory = new HelpCategoryInfo(); helpCategory.CategoryId = new int?(categoryId); return(CommentsProvider.Instance().CreateUpdateDeleteHelpCategory(helpCategory, DataProviderAction.Delete)); }
public static int DeleteHelpCategorys(List <int> categoryIds) { if ((categoryIds == null) || (categoryIds.Count == 0)) { return(0); } return(CommentsProvider.Instance().DeleteHelpCategorys(categoryIds)); }
public static int DeleteHelps(IList <int> helps) { if ((helps == null) || (helps.Count == 0)) { return(0); } return(CommentsProvider.Instance().DeleteHelps(helps)); }
public static int DeleteArticles(IList <int> articles) { if ((articles == null) || (articles.Count == 0)) { return(0); } return(CommentsProvider.Instance().DeleteArticles(articles)); }
public static int DeleteReview(IList <int> reviews) { if ((reviews == null) || (reviews.Count == 0)) { return(0); } return(CommentsProvider.Instance().DeleteReview(reviews)); }
public static bool UpdateArticleCategory(ArticleCategoryInfo articleCategory) { if (null == articleCategory) { return(false); } Globals.EntityCoding(articleCategory, true); return(CommentsProvider.Instance().CreateUpdateDeleteArticleCategory(articleCategory, DataProviderAction.Update)); }
public static bool CreateArticle(ArticleInfo article) { if (null == article) { return(false); } Globals.EntityCoding(article, true); return(CommentsProvider.Instance().AddArticle(article)); }
public static bool CreateHelp(HelpInfo help) { if (null == help) { return(false); } Globals.EntityCoding(help, true); return(CommentsProvider.Instance().AddHelp(help)); }
public static bool CreateHelpCategory(HelpCategoryInfo helpCategory) { if (null == helpCategory) { return(false); } Globals.EntityCoding(helpCategory, true); return(CommentsProvider.Instance().CreateUpdateDeleteHelpCategory(helpCategory, DataProviderAction.Create)); }
public static bool CreateAffiche(AfficheInfo affiche) { if (null == affiche) { return(false); } Globals.EntityCoding(affiche, true); return(CommentsProvider.Instance().AddAffiche(affiche)); }
public static int SendMessageToMember(IList <MessageBoxInfo> messageBoxInfos) { int num = 0; foreach (MessageBoxInfo info in messageBoxInfos) { if (CommentsProvider.Instance().InsertMessage(info, UserRole.Member)) { num++; } } return(num); }
public static int SendMessageToDistributor(IList <MessageBoxInfo> messageBoxInfos) { int num = 0; foreach (MessageBoxInfo current in messageBoxInfos) { if (CommentsProvider.Instance().InsertMessage(current, UserRole.Distributor)) { num++; } } return(num); }
public static int AddMessageToDistributor(IList <MessageBoxInfo> messageBoxInfos) { int num = 0; foreach (MessageBoxInfo info in messageBoxInfos) { if (CommentsProvider.Instance().AddMessage(info, UserRole.Distributor)) { num++; } } return(num); }
public static int DeleteReview(IList <int> reviews) { int result; if (reviews == null || reviews.Count == 0) { result = 0; } else { result = CommentsProvider.Instance().DeleteReview(reviews); } return(result); }
public static int DeleteHelpCategorys(List <int> categoryIds) { int result; if (categoryIds == null || categoryIds.Count == 0) { result = 0; } else { result = CommentsProvider.Instance().DeleteHelpCategorys(categoryIds); } return(result); }
public static int DeleteHelps(IList <int> helps) { int result; if (helps == null || helps.Count == 0) { result = 0; } else { result = CommentsProvider.Instance().DeleteHelps(helps); } return(result); }
public static int DeleteArticles(IList <int> articles) { int result; if (articles == null || articles.Count == 0) { result = 0; } else { result = CommentsProvider.Instance().DeleteArticles(articles); } return(result); }
public static bool UpdateAffiche(AfficheInfo affiche) { bool result; if (null == affiche) { result = false; } else { Globals.EntityCoding(affiche, true); result = CommentsProvider.Instance().UpdateAffiche(affiche); } return(result); }
public static bool CreateHelpCategory(HelpCategoryInfo helpCategory) { bool result; if (null == helpCategory) { result = false; } else { Globals.EntityCoding(helpCategory, true); result = CommentsProvider.Instance().CreateUpdateDeleteHelpCategory(helpCategory, DataProviderAction.Create); } return(result); }
public static bool UpdateHelp(HelpInfo help) { bool result; if (null == help) { result = false; } else { Globals.EntityCoding(help, true); result = CommentsProvider.Instance().UpdateHelp(help); } return(result); }
public static bool UpdateArticleCategory(ArticleCategoryInfo articleCategory) { bool result; if (null == articleCategory) { result = false; } else { Globals.EntityCoding(articleCategory, true); result = CommentsProvider.Instance().CreateUpdateDeleteArticleCategory(articleCategory, DataProviderAction.Update); } return(result); }
public static bool CreateArticle(ArticleInfo article) { bool result; if (null == article) { result = false; } else { Globals.EntityCoding(article, true); result = CommentsProvider.Instance().AddArticle(article); } return(result); }
public static int SendMessage(IList <SendMessageInfo> sendMessageList, IList <ReceiveMessageInfo> receiveMessageList) { int num = 0; foreach (SendMessageInfo info in sendMessageList) { Globals.EntityCoding(info, true); CommentsProvider.Instance().InsertSendMessage(info); num++; } foreach (ReceiveMessageInfo info2 in receiveMessageList) { Globals.EntityCoding(info2, true); CommentsProvider.Instance().InsertReceiveMessage(info2); num++; } return(num); }
public static bool ReplyMessage(SendMessageInfo reply) { IList <SendMessageInfo> sendMessageList = new List <SendMessageInfo>(); IList <ReceiveMessageInfo> receiveMessageList = new List <ReceiveMessageInfo>(); ReceiveMessageInfo item = new ReceiveMessageInfo(); item.Addressee = reply.Addressee; item.Addresser = reply.Addresser; item.Title = reply.Title; item.PublishContent = reply.PublishContent; item.PublishDate = DateTime.Now; sendMessageList.Add(reply); receiveMessageList.Add(item); if (SendMessage(sendMessageList, receiveMessageList) > 0) { CommentsProvider.Instance().PostMessageLastTime(reply.ReceiveMessageId.Value, item.PublishDate); } return(true); }
public static bool ReplyProductConsultation(ProductConsultationInfo productConsultation) { return(CommentsProvider.Instance().ReplyProductConsultation(productConsultation)); }
public static DataSet GetProductReviews(out int total, ProductReviewQuery reviewQuery) { return(CommentsProvider.Instance().GetProductReviews(out total, reviewQuery)); }
public static ProductConsultationInfo GetProductConsultation(int consultationId) { return(CommentsProvider.Instance().GetProductConsultation(consultationId)); }
public static ProductReviewInfo GetProductReview(int reviewId) { return(CommentsProvider.Instance().GetProductReview(reviewId)); }
public static DbQueryResult GetConsultationProducts(ProductConsultationAndReplyQuery consultationQuery) { return(CommentsProvider.Instance().GetConsultationProducts(consultationQuery)); }