OA.WEB/Controllers/UserInfoController.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using OA.BLL;
using OA.IBLL;
using OA.Model;
using OA.Model.SearchCondition;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OA.WEB.Controllers
{
    public class UserInfoController : Controller
    {
        // GET: UserInfo
        // OAEntities oa = new OAEntities();
        //IUserInfoService userInfoService = new UserInfoService();
        IBLL.IUserInfoService userInfoService { get; set; }//SpringNet配置“改”
        IBLL.IRoleInfoService roleInfoService { get; set; }

        IBLL.IActionInfoService actionInfoService { get; set; }
        IBLL.IR_UserInfo_ActionInfoService r_UserInfo_ActionInfoService { get; set; }
        public ActionResult Index()
        {
            // var userInfo = oa.UserInfo.Where<UserInfo>(c=>c.ID==21);
            var userInfos = userInfoService.LoadEntities(c=>true);
            ViewData.Model = userInfos;//ViewData(强类型视图)
            return View();
        }
        //以这里开始
        public ActionResult Home()
        {
            return View();
        }
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        public ActionResult GetUserInfo()
        {
            int pageIndex = int.Parse(Request["page"]);
            int pageSize = int.Parse(Request["rows"]);
            int totalCount=0;
            string name = Request["name"];
            string remark = Request["remark"];
            UserInfoFilterCondition condition = new UserInfoFilterCondition()//构造用户搜索条件
            {
                Name = name,
                Remak = remark,
                PageIndex=pageIndex,
                PageSize=pageSize,
                TotalCount=totalCount
            };
            var userInfoList=userInfoService.LoadSearchInfo(condition);
            #region 没加查询条件时的写法
            //short deleteType =(short) DeleteEnumType.Normal;
            //var userInfoList=userInfoService.LoadPageEntities<string>(pageIndex,pageSize,out totalCount,c=>c.Flag==deleteType,c=>c.Sort,true);
            #endregion
            var temp = from u in userInfoList
                       select new {ID=u.ID,UserName=u.UserName, UserPwd = u.UserPwd,Remark=u.Remark,SubTime=u.SubTime,Flag=u.Flag,Sort=u.Sort };
后面还有 141 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。