private void CsStringColumns(Column column, string value, SqlWhereCollection where) { if (column.HasChoices()) { var param = value.Deserialize <List <string> >(); if (param?.Any() == true) { where.Add(or: new SqlWhereCollection( CsStringColumnsWhere(column, param), CsStringColumnsWhereNull(column, param))); } } else { if (!value.IsNullOrEmpty()) { var name = Strings.NewGuid(); where.SqlWhereLike( name: name, searchText: value, clauseCollection: "([{0}].[{1}] like '%' + @{2}#ParamCount#_#CommandCount# + '%')" .Params(column.TableName(), column.Name, name) .ToSingleList()); } } }
/// <summary> /// Fixed: /// </summary> public static SqlWhereCollection SearchText( this SqlWhereCollection self, string searchText) { return(self.SqlWhereLike(searchText, Rds.Users_UserId_WhereLike(), Rds.Users_LoginId_WhereLike(), Rds.Users_Name_WhereLike(), Rds.MailAddresses_MailAddress_WhereLike("MailAddresses"))); }
/// <summary> /// Fixed: /// </summary> public static SqlWhereCollection SearchText( this SqlWhereCollection self, string searchText) { return(self .SqlWhereLike(searchText, Rds.Users_LoginId_WhereLike(), Rds.Users_Name_WhereLike(), Rds.Users_UserCode_WhereLike(), Rds.Users_Body_WhereLike(), Rds.Depts_DeptCode_WhereLike(), Rds.Depts_DeptName_WhereLike(), Rds.Depts_Body_WhereLike(), Rds.MailAddresses_MailAddress_WhereLike("MailAddresses")) .Users_Disabled(0)); }
/// <summary> /// Fixed: /// </summary> public static SqlWhereCollection SearchText( this SqlWhereCollection self, string searchText) { return(self .SqlWhereLike( name: "SearchText", searchText: searchText, clauseCollection: new List <string>() { Rds.Users_LoginId_WhereLike(), Rds.Users_Name_WhereLike(), Rds.Users_UserCode_WhereLike(), Rds.Users_Body_WhereLike(), Rds.Depts_DeptCode_WhereLike(), Rds.Depts_DeptName_WhereLike(), Rds.Depts_Body_WhereLike(), Rds.MailAddresses_MailAddress_WhereLike("MailAddresses") }) .Users_Disabled(0)); }
/// <summary> /// Fixed: /// </summary> public static SqlWhereCollection SearchText( this SqlWhereCollection self, Context context, string searchText) { return(self .SqlWhereLike( tableName: "Users", name: "SearchText", searchText: searchText, clauseCollection: new List <string>() { Rds.Users_LoginId_WhereLike(factory: context), Rds.Users_Name_WhereLike(factory: context), Rds.Users_UserCode_WhereLike(factory: context), Rds.Users_Body_WhereLike(factory: context), Rds.Depts_DeptCode_WhereLike(factory: context), Rds.Depts_DeptName_WhereLike(factory: context), Rds.Depts_Body_WhereLike(factory: context), Rds.MailAddresses_MailAddress_WhereLike( factory: context, tableName: "MailAddresses") }) .Users_Disabled(false)); }