/// <summary>
 /// счета не проверяются здесь
 /// </summary>        
 public bool PredicateFunc(UserTag user)
 {
     if (IsOff) return true;
     if (critTitle != ColumnFilterCriteria.Нет)
         if (!CheckStringCriteria(critTitle, user.user.Title, valTitle)) return false;
     if (critName != ColumnFilterCriteria.Нет)
         if (!CheckStringCriteria(critName, user.user.Name, valName)) return false;
     if (critSurname != ColumnFilterCriteria.Нет)
         if (!CheckStringCriteria(critSurname, user.user.Surname, valSurname)) return false;
     if (critPatronym != ColumnFilterCriteria.Нет)
         if (!CheckStringCriteria(critPatronym, user.user.Patronym, valPatronym)) return false;
     if (critPhone != ColumnFilterCriteria.Нет)
         if (!CheckPhoneCriteria(critPhone, user.user, valPhone)) return false;
     if (critEmail != ColumnFilterCriteria.Нет)
         if (!CheckStringCriteria(critEmail, user.user.Email, valEmail)) return false;
     if (critRole != ColumnFilterCriteria.Нет)
     {
         if (critRole == ColumnFilterCriteria.Равно && user.user.RoleMask != (int)valRole) return false;
         if (critRole == ColumnFilterCriteria.НеРавно && user.user.RoleMask == (int)valRole) return false;
     }
     return true;
 }
Beispiel #2
0
 /// <summary>
 /// счета не проверяются здесь
 /// </summary>
 public bool PredicateFunc(UserTag user)
 {
     if (IsOff)
     {
         return(true);
     }
     if (critTitle != ColumnFilterCriteria.Нет)
     {
         if (!CheckStringCriteria(critTitle, user.user.Title, valTitle))
         {
             return(false);
         }
     }
     if (critName != ColumnFilterCriteria.Нет)
     {
         if (!CheckStringCriteria(critName, user.user.Name, valName))
         {
             return(false);
         }
     }
     if (critSurname != ColumnFilterCriteria.Нет)
     {
         if (!CheckStringCriteria(critSurname, user.user.Surname, valSurname))
         {
             return(false);
         }
     }
     if (critPatronym != ColumnFilterCriteria.Нет)
     {
         if (!CheckStringCriteria(critPatronym, user.user.Patronym, valPatronym))
         {
             return(false);
         }
     }
     if (critPhone != ColumnFilterCriteria.Нет)
     {
         if (!CheckPhoneCriteria(critPhone, user.user, valPhone))
         {
             return(false);
         }
     }
     if (critEmail != ColumnFilterCriteria.Нет)
     {
         if (!CheckStringCriteria(critEmail, user.user.Email, valEmail))
         {
             return(false);
         }
     }
     if (critRole != ColumnFilterCriteria.Нет)
     {
         if (critRole == ColumnFilterCriteria.авно && user.user.RoleMask != (int)valRole)
         {
             return(false);
         }
         if (critRole == ColumnFilterCriteria.НеРавно && user.user.RoleMask == (int)valRole)
         {
             return(false);
         }
     }
     return(true);
 }