/// <summary> /// 添加新问题 /// </summary> /// <returns></returns> public ActionResult AddQuestionV2(Question model) { var temp=qs.Add(model); return Json(temp, JsonRequestBehavior.AllowGet); }
/// <summary> /// 添加新问题 /// </summary> /// <param name="content">问题内容</param> /// <param name="typeid">问题类型id</param> /// <param name="regman">创建人</param> /// <param name="ishot">是否是热门问题</param> public Question AddQuestion(string title,string content,int typeid,bool ishot=false) { //验证信息 var model = new Question() { title=title, content = content, typeid = typeid, regman = Common.CommonClass.GetUserName(), regmanid=Common.CommonClass.GetPartyIdCount(), regdate = DateTime.Now, ishot=ishot }; return qs.Add(model); }