OA.WEB/Controllers/ActionInfoController.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using OA.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace OA.WEB.Controllers
{
public class ActionInfoController : BaseController
{
IBLL.IActionInfoService actionInfoService { get; set; }
IBLL.IRoleInfoService roleInfoService { get; set; }
// GET: ActionInfo
public ActionResult Index()
{
return View();
}
/// <summary>
/// 获取权限信息
/// </summary>
/// <returns></returns>
public ActionResult GetActionInfo()
{
int pageIndex = int.Parse(Request["page"]);
int pageSize = int.Parse(Request["rows"]);
int totalCount;
short delFlag = (short)DeleteEnumType.Normal;
var actionList = actionInfoService.LoadPageEntities<int>(pageIndex, pageSize, out totalCount, r => r.DelFlag == delFlag, r => r.ID, true);
var rows = from r in actionList
select new { ID = r.ID, RoleName = r.ActionInfoName, Sort = r.Sort, Remark = r.Remark, SubTime = r.SubTime , HttpMethod = r.HttpMethod, ActionTypeEnum=r.ActionTypeEnum, Url=r.Url};
return Json(new { rows = rows, totalCount = totalCount }, JsonRequestBehavior.AllowGet);
}
public ActionResult GetMenuIcon()
{
HttpPostedFileBase file= Request.Files[0];
string fileName = System.IO.Path.GetFileName(file.FileName);
string fileExt = System.IO.Path.GetExtension(fileName);
if (fileExt==".jpg")
{
string newFileName = Guid.NewGuid().ToString() + fileExt;
file.SaveAs(Server.MapPath("/MenuIcon/"+newFileName));
return Content("ok:/MenuIcon/"+newFileName);
}
else
{
return Content("no:");
}
//return Content(file.FileName);
}
/// <summary>
/// 添加权限信息
/// </summary>
/// <returns></returns>
public ActionResult AddActionInfo(ActionInfo actionInfo)
{
actionInfo.DelFlag = 0;
actionInfo.ModifiedOn = DateTime.Now.ToString();
后面还有 55 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。