public List<ClubMembersEntity> Search(QueryCondition<ClubMembersEntity> entity)
 {
     CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("ClubMembersSearch");
     using (DynamicSqlBuilder sqlBuilder = new DynamicSqlBuilder(command, entity.PagingInfo, "SysNo Desc"))
     {
         ClubMembersEntity query = entity.Condition;
         sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " Status <> -1");
         if (query != null)
         {
             if (!string.IsNullOrEmpty(query.Title))
             {
                 sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " (Title Like'%'+@Title+'%')");
                 command.AddInputParameter("@Title", DbType.String, query.Title);
             }
             if (!string.IsNullOrEmpty(query.InDateCondition) &&
                 query.InDateCondition.IndexOf('-') > 0)
             {
                 sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " InDate BETWEEN @BeginInDate AND @EndInDate");
                 command.AddInputParameter("@BeginInDate", DbType.String, query.InDateCondition.Split('-')[0]);
                 command.AddInputParameter("@EndInDate", DbType.String, query.InDateCondition.Split('-')[1]);
             }
         }
         command.CommandText = sqlBuilder.BuildQuerySql();
         return command.ExecuteEntityList<ClubMembersEntity>();
     }
 }
 public List<ErrorLogEntity> Seach(QueryCondition<ErrorLogEntity> entity)
 {
     CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("ErrorLogSearch");
     using (DynamicSqlBuilder sqlBuilder = new DynamicSqlBuilder(command, entity.PagingInfo, "SysNo Desc"))
     {
         ErrorLogEntity query = entity.Condition;
         if (query != null)
         {
             if (!string.IsNullOrEmpty(query.GlobalName))
             {
                 sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " (GlobalName Like'%'+@GlobalName+'%')");
                 command.AddInputParameter("@GlobalName", DbType.String, query.GlobalName);
                 //sqlBuilder.Conditions.AddCondition("UserName", DbType.String, "@UserName", query.UserName);
             }
         }
         command.CommandText = sqlBuilder.BuildQuerySql();
         return command.ExecuteEntityList<ErrorLogEntity>();
     }
 }
 public List<BrowsingHistoryEntity> Search(QueryCondition<BrowsingHistoryEntity> entity)
 {
     CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("BrowsingHistorySearch");
     using (DynamicSqlBuilder sqlBuilder = new DynamicSqlBuilder(command, entity.PagingInfo, "SysNo Desc"))
     {
         BrowsingHistoryEntity query = entity.Condition;
         sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " Status <> -1");
         if (query != null)
         {
             if (!string.IsNullOrEmpty(query.PageName))
             {
                 sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " (PageName Like'%'+@PageName+'%')");
                 command.AddInputParameter("@PageName", DbType.String, query.PageName);
             }
         }
         command.CommandText = sqlBuilder.BuildQuerySql();
         return command.ExecuteEntityList<BrowsingHistoryEntity>();
     }
 }
 public List<SystemUserEntity> Search(QueryCondition<SystemUserEntity> entity)
 {
     CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("SystemUserSearch");
     using (DynamicSqlBuilder sqlBuilder = new DynamicSqlBuilder(command, entity.PagingInfo, "SysNo Desc"))
     {
         SystemUserEntity query = entity.Condition;
         sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " Status <> -1");
         if (query != null)
         {
             if (!string.IsNullOrEmpty(query.UserName))
             {
                 sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " (UserName Like'%'+@UserName+'%')");
                 command.AddInputParameter("@UserName", DbType.String, query.UserName);
                 //sqlBuilder.Conditions.AddCondition("UserName", DbType.String, "@UserName", query.UserName);
             }
             if (query.DropRole > 0)
             {
                 sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " SysNo IN (SELECT SystemUserSysNo FROM SystemUser_RoleMapping WHERE RoleSysNo = RoleSysNo)");
                 command.AddInputParameter("@RoleSysNo", DbType.Int32, query.DropRole);
             }
             if (!string.IsNullOrEmpty(query.InDateCondition) &&
                 query.InDateCondition.IndexOf('-') > 0)
             {
                 sqlBuilder.Conditions.AddCustomCondition(RelationType.AND, " InDate BETWEEN @BeginInDate AND @EndInDate");
                 command.AddInputParameter("@BeginInDate", DbType.String, query.InDateCondition.Split('-')[0]);
                 command.AddInputParameter("@EndInDate", DbType.String, query.InDateCondition.Split('-')[1]);
             }
         }
         command.CommandText = sqlBuilder.BuildQuerySql();
         return command.ExecuteEntityList<SystemUserEntity>();
     }
 }