MVC-CZBK.ItcastOA.BLL.UserInfoService

using CZBK.ItcastOA.IBLL;
using CZBK.ItcastOA.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CZBK.ItcastOA.BLL
{
    public class UserInfoService : BaseService<UserInfo>,IUserInfoService
    {

        public override void SetCurrentDal()
        {
            CurrentDal = this.CurrentDBSession.UserInfoDal;
        }

        /// <summary>
        /// 批量删除多条用户数据
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public bool DeleteEntities(List<int> list)
        {
            var userInfoList = this.CurrentDBSession.UserInfoDal.LoadEntities(u=>list.Contains(u.ID));
            foreach (var userInfo in userInfoList)
            {
                this.CurrentDBSession.UserInfoDal.DeleteEntity(userInfo);
            }
           return this.CurrentDBSession.SaveChanges();
        }


        /// <summary>
        /// 完成用户信息的搜索
        /// </summary>
        /// <param name="userInfoSearch">封装的搜索条件数据</param>
        /// <returns></returns>
        public IQueryable<UserInfo> LoadSearchEntities(Model.Search.UserInfoSearch userInfoSearch,short delFlag)
        {
            var temp = this.CurrentDBSession.UserInfoDal.LoadEntities(c=>c.DelFlag==delFlag);
            //根据用户名来搜索
            if (!string.IsNullOrEmpty(userInfoSearch.UserName))
            {
                temp = temp.Where<UserInfo>(u=>u.UName.Contains(userInfoSearch.UserName));
            }
            if (!string.IsNullOrEmpty(userInfoSearch.UserRemark))
            {
                temp = temp.Where<UserInfo>(u=>u.Remark.Contains(userInfoSearch.UserRemark));
            }
            userInfoSearch.TotalCount = temp.Count();
            return temp.OrderBy<UserInfo, int>(u => u.ID).Skip<UserInfo>((userInfoSearch.PageIndex - 1) * userInfoSearch.PageSize).Take<UserInfo>(userInfoSearch.PageSize);
               
        }

    }
   
}

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在LaTeX中,"Undefined control sequence"是一个常见的错误消息,它表示出现了非法命令。这个错误通常出现在你使用了一个未定义的命令或者忘记引入相应的宏包时。 为了解决这个问题,你可以尝试以下几个步骤: 1. 检查你是否正确地书写了命令。确保命令的拼写和大小写都是正确的。 2. 确认你是否引入了相关的宏包。有些命令可能需要特定的宏包支持才能正常工作。你可以在导言区使用\usepackage命令引入所需的宏包。 3. 删除生成的辅助文件。在编译过程中,LaTeX会生成一些辅助文件,比如.aux文件和.bll文件。你可以尝试删除与出现错误消息相关的文件,然后重新编译一次。 4. 如果上述步骤仍然不能解决问题,那么可能是因为你忘记引入某个宏包。你可以尝试在导言区添加\usepackage{}命令,并在大括号内填写可能需要的宏包名称。 总之,当在LaTeX中遇到"Undefined control sequence"错误时,你应该检查命令的拼写、是否引入了相关的宏包,并尝试删除生成的辅助文件。如果问题仍然存在,可以尝试引入可能需要的宏包。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [[翻译] [LaTeX] Undefined control sequence](https://blog.csdn.net/xovee/article/details/106567282)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [latex出现“Undefined control sequence”问题解决方法](https://blog.csdn.net/weixin_44442186/article/details/126484660)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值