コード例 #1
0
        public ActionResult Create(OnlineCommentsModel model)
        {
            if (ModelState.IsValid)
            {
                OnlineComments info = new OnlineComments();
                info.Id = Guid.NewGuid();

                info.Title = model.Title;

                info.Content = model.Content;


                ////背景介绍
                //info.BackgroundIntroduction = model.BackgroundIntroduction;
                ////草案全文
                //info.DraftFullText = model.DraftFullText;
                ////公众意见与建议
                //info.Opinion = model.Opinion;
                ////公众意见采纳情况反馈
                //info.Feedback = model.Feedback;
                //是否结束
                info.IsEnd = model.IsEnd;

                info.StartTime = model.StartTime;
                info.EndTime   = model.EndTime;


                service.Add(info);
                return(Json(new AjaxResult()
                {
                    Result = Result.Success
                }));
            }
            return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model));
        }
コード例 #2
0
        public void Update(OnlineComments info)
        {
            var query = repository.Table;

            repository.Update(info);
        }
コード例 #3
0
 public void Delete(OnlineComments info)
 {
     repository.Delete(info);
 }
コード例 #4
0
        public void Add(OnlineComments info)
        {
            var query = repository.Table;

            repository.Insert(info);
        }