Master.CanYinWu.Web/Controllers/QuestionController.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Master.CanYinWu.DAL;
using Master.CanYinWu.Entity;
using Master.CanYinWu.Entity.Param;
using Master.CanYinWu.Entity.ViewModel;
using Master.CanYinWu.Utility;
using Master.CanYinWu.Web.App_Start.Filter;
namespace Master.CanYinWu.Web.Controllers
{
[LoginCheck]
public class QuestionController : Controller
{
QuestionDAL dal = new QuestionDAL();
// GET: Question
public ActionResult List()
{
return View();
}
public JsonResult GetQuestionList(int page, int limit, string key, string title, int? bigCategoryId, int? smallCategoryId)
{
QuestionSearch search = new QuestionSearch()
{
PageIndex = page,
PageSize = limit,
Title = title,
ShortName = key,
BigCategoryId = bigCategoryId,
SmallCategoryId = smallCategoryId
};
var data = dal.GetList(search);
return Json(new { data = data.Item1, count = data.Item2, code = 0 }, JsonRequestBehavior.AllowGet);
}
[HttpGet]
public ActionResult EditQuestion(int id = 0)
{
if (id == 0)
{
ViewData.Model = new QuestionDetailVM();
}
else
{
var model = dal.GetModel(id);
if (model != null)
{
ViewData.Model = model;
}
else
{
return HttpNotFound();
}
}
return View();
}
[HttpPost]
public string EditQuestion(QuestionDetailVM model)
后面还有 40 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
