예제 #1
0
        public ActionResult DeleteData(advt_topics V_topics)
        {
            var result = false;

            V_topics.updatedt  = DateTime.Now;//更新时间
            V_topics.available = (byte)Status.Normal.Verify;
            var info = Data.advt_topics.Update_advt_topics(V_topics, null, new string[] { "id" });

            if (info == 1)
            {
                result = true;
            }
            return(Json(new { result = result }, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public ActionResult EditData(advt_topics V_topics)
        {
            var result = false;

            V_topics.updatedt = DateTime.Now;//更新时间
            V_topics.username = this.UserNameContext;
            var info = Data.advt_topics.Update_advt_topics(V_topics, null, new string[] { "id", "createdt" });

            if (info == 1)
            {
                result = true;
            }
            return(Json(new { result = result, update = V_topics.updatedt }, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public ActionResult AddData(advt_topics V_topics)
        {
            bool result = false;

            Model.PageModel.PEModel model = new Model.PageModel.PEModel();
            V_topics.createdt  = Convert.ToDateTime(DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day); //上传时间
            V_topics.username  = this.advt_user.username;                                                                   //分享人
            V_topics.available = (byte)Status.Normal.Enable;
            var info = Data.advt_topics.Insert_advt_topics(V_topics, null, new string[] { "id" });

            if (info == 1)
            {
                result = true;
            }
            return(Json(new { result = result, createdate = V_topics.createdt, username = V_topics.username, files = V_topics.attachment, item9 = V_topics.item9 }, JsonRequestBehavior.AllowGet));
        }