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));
 }
Esempio n. 6
0
 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);
        }
Esempio n. 13
0
        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);
        }
Esempio n. 15
0
        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);
        }
Esempio n. 16
0
        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);
        }
Esempio n. 17
0
        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);
        }
Esempio n. 18
0
        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);
        }
Esempio n. 19
0
        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);
        }
Esempio n. 20
0
        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);
        }
Esempio n. 21
0
        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);
        }
Esempio n. 22
0
        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);
        }
Esempio n. 23
0
        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);
        }
Esempio n. 24
0
        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);
        }
Esempio n. 25
0
        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);
        }
Esempio n. 26
0
 public static bool ReplyProductConsultation(ProductConsultationInfo productConsultation)
 {
     return(CommentsProvider.Instance().ReplyProductConsultation(productConsultation));
 }
Esempio n. 27
0
 public static DataSet GetProductReviews(out int total, ProductReviewQuery reviewQuery)
 {
     return(CommentsProvider.Instance().GetProductReviews(out total, reviewQuery));
 }
Esempio n. 28
0
 public static ProductConsultationInfo GetProductConsultation(int consultationId)
 {
     return(CommentsProvider.Instance().GetProductConsultation(consultationId));
 }
Esempio n. 29
0
 public static ProductReviewInfo GetProductReview(int reviewId)
 {
     return(CommentsProvider.Instance().GetProductReview(reviewId));
 }
Esempio n. 30
0
 public static DbQueryResult GetConsultationProducts(ProductConsultationAndReplyQuery consultationQuery)
 {
     return(CommentsProvider.Instance().GetConsultationProducts(consultationQuery));
 }