Ejemplo n.º 1
0
        /// <summary>
        /// 获取信息列表
        /// </summary>
        /// <param name="ent">实体</param>
        /// <param name="page">页</param>
        /// <param name="total">总数</param>
        /// <returns>返回结果</returns>
        public IList <SysUserInfoEntity> GetUsersInfoList(SysUserInfoEntity ent, PageInfo page, ref int total)
        {
            ent.isProc                 = true;
            ent.ProcName               = "Pagination_SP";
            ent.ProctParametersName    = "_DBTable,PrimaryKey,_SelectOrder,PageIndex,PageSize,_ActiveSelectCols,Filter,Group";
            ent.ProctOutParametersName = "[Total]";
            ent.PrimaryKey             = "p.UserID";
            ent._DBTable               = @"PublicSystemUser p 
                                left join PublicUserInfo b 
                                    on p.UserID=b.UserID 
                                left join PublicBranch c 
                                    on p.branchid=c.BranchID 
                                left join PublicCustomerGroup d 
                                    on p.CustomerGroupID=d.CustomerGroupID 
                                left join PublicPosition e 
                                    on p.PositionID=e.PositionID";
            StringBuilder filter = new StringBuilder();

            filter.Append("1=1 ");
            if (!string.IsNullOrEmpty(ent.UserType))
            {
                filter.Append(" and UserType='" + ent.UserType + "'");
            }
            if (ent.StaffNum.HasValue)
            {
                filter.Append(" and StaffNum='" + ent.StaffNum.ToString() + "'");
            }
            if (!string.IsNullOrEmpty(ent.UserName))
            {
                filter.Append(" and UserName='******'");
            }
            return(GetPageList <SysUserInfoEntity, DemoDAL>(ent, page, ref total));
        }
Ejemplo n.º 2
0
 public IList <SysUserInfoEntity> ExecProc(SysUserInfoEntity entity, PageInfo pageInfo, ref int total)
 {
     entity.isProc = true;
     //entity.ProcName = WorkspacesProc.PublicGetUserByFlowRole;
     //entity.ProctParametersName = WorkspacesProc.PublicGetUserByFlowRoleParams;
     //entity.ProctOutParametersName = WorkspacesProc.PublicGetUserByFlowRoleOutParams;
     return(base.GetPageList <SysUserInfoEntity, DemoDAL>(entity, pageInfo, ref total));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="UsersInfo">对象数据实体</param>
 /// <returns>返回结果</returns>
 public bool Update(SysUserInfoEntity UsersInfo)
 {
     if (UsersInfo.UserID.HasValue)
     {
         //局部更新
         UsersInfo._DBTable          = "PublicSystemUser";//在SysUserInfoEntity已经有默认设置
         UsersInfo._ActiveUpdateCols = "UserName";
         UsersInfo._UpdateWhereCols  = "UserID";
     }
     return(Save <SysUserInfoEntity, DemoDAL>(UsersInfo, SaveType.Update));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 判断实体是否存在
 /// </summary>
 /// <param name="UsersInfo">对象数据实体</param>
 /// <returns>返回结果</returns>
 public bool HasExist(SysUserInfoEntity UsersInfo)
 {
     UsersInfo._ActiveSelectCols = @"[UserID]";
     return(HasExist <SysUserInfoEntity, DemoDAL>(UsersInfo));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <param name="UsersInfo">对象数据实体</param>
 /// <returns>返回结果</returns>
 public bool Delete(SysUserInfoEntity UsersInfo)
 {
     return(Save <SysUserInfoEntity, DemoDAL>(UsersInfo, SaveType.Delete));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="UsersInfo">对象数据实体</param>
 /// <returns>返回结果</returns>
 public bool Insert(SysUserInfoEntity UsersInfo)
 {
     return(Save <SysUserInfoEntity, DemoDAL>(UsersInfo, SaveType.Insert));
 }
Ejemplo n.º 7
0
 public IList <SysUserInfoEntity> GetEntityList(SysUserInfoEntity entity, PageInfo pageInfo, ref int total)
 {
     return(base.GetPageList <SysUserInfoEntity, DemoDAL>(entity, pageInfo, ref total));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 获取单行详细信息
 /// </summary>
 /// <param name="ent">实体</param>
 /// <returns>返回结果</returns>
 public SysUserInfoEntity GetUsersInfoEntity(SysUserInfoEntity UsersInfo)
 {
     return(GetEntity <SysUserInfoEntity, DemoDAL>(UsersInfo));
 }