Beispiel #1
0
        //<---------------------------------新增回文---------------------------->
        public JsonResult CreateReDiscuss(int MemberID, string Main, int ArticleID)
        {
            tReArticle list = new tReArticle()
            {
                ArticleID = ArticleID,
                Main      = Main,
                MemberID  = MemberID,
                UpTime    = DateTime.Now,
                LoveCount = 0,
            };

            tra.create(list);
            return(Json("", JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        //<---------------------------------新增回文留言---------------------------->
        public JsonResult CreateReComment(int MemberID, string Main, int ReArticleID)
        {
            tReComment list = new tReComment()
            {
                MemberID    = MemberID,
                Main        = Main,
                ReArticleID = ReArticleID,
                UpTime      = DateTime.Now,
            };

            trc.create(list);

            return(Json(trc.getAll().LastOrDefault(t => t.No > 0).No, JsonRequestBehavior.AllowGet));
        }
        public JsonResult CreateMember(tMembers form)
        {
            tMembers aa = new tMembers()
            {
                MemberName     = form.MemberName,
                Account        = form.Account,
                Password       = form.Password,
                RegisteredDate = DateTime.Now,
                Authority      = "Member",
                Status         = 1
            };

            tm.create(aa);
            return(Json("", JsonRequestBehavior.AllowGet));
        }
Beispiel #4
0
        //<---------------------------------新增文章---------------------------->
        public JsonResult CreateDiscuss(tArticle form)
        {
            tArticle list = new tArticle()
            {
                Category  = form.Category,
                Title     = form.Title,
                Main      = form.Main,
                UpTime    = DateTime.Now,
                LoveCount = 0,
                ViewCount = 0,
                MemberID  = form.MemberID
            };

            ta.create(list);
            var ID = ta.getAll().LastOrDefault(m => m.ArticleID > 0).ArticleID;

            return(Json(ID, JsonRequestBehavior.AllowGet));
        }