/// <summary> /// 分页列表 /// </summary> /// <param name="gvMgt"></param> /// <returns></returns> public List <SysMenu> GetMgt(Grid gvMgt, Dictionary <string, string> map) { string sql = @"Select (RowNum) From SysMenu t Where t.IsActive = 0 And MenuName like @MenuName"; string sqlCount = SqlWidget.GetMgtTotal(sql, "t.MenuID"); gvMgt.RecordCount = ConvertHelper.ToInt32(this.DbInstance.GetCell(sqlCount, GetParameters(map))); string sqlMgt = SqlWidget.GetMgtSql(sql, gvMgt); return(this.DbContext.SysMenu.SqlQuery(sqlMgt, GetParameters(map)).ToList()); }
/// <summary> /// ·ÖÒ³Áбí /// </summary> /// <param name="gvMgt"></param> /// <returns></returns> public List <SysUser> GetMgt(Grid gvMgt, Dictionary <string, string> map) { string filter = SqlWidget.GetFilter(map); string sql = $"Select (RowNum) From SysUser t Where t.IsActive = 0 and UserName like @Keyword {filter}"; string sqlCount = SqlWidget.GetMgtTotal(sql, "t.UserId"); gvMgt.RecordCount = ConvertHelper.ToInt32(this.DbInstance.GetCell(sqlCount, GetParameters(map))); string sqlMgt = SqlWidget.GetMgtSql(sql, gvMgt); return(this.DbContext.SysUser.SqlQuery(sqlMgt, GetParameters(map)).ToList()); }