private static bool CheckPhoneCriteria(ColumnFilterCriteria crit, PLATFORM_USER user, string specimen) { if (crit == ColumnFilterCriteria.авно && user.Phone1 != specimen && user.Phone2 != specimen) { return(false); } if (crit == ColumnFilterCriteria.НеРавно && (user.Phone1 == specimen || user.Phone2 == specimen)) { return(false); } if (crit == ColumnFilterCriteria.Включает && (user.Phone1.Contains(specimen) || user.Phone2.Contains(specimen)) == false) { return(false); } if (crit == ColumnFilterCriteria.НачинаетсяС && (user.Phone1.StartsWith(specimen) || user.Phone2.StartsWith(specimen)) == false) { return(false); } if (crit == ColumnFilterCriteria.КончаетсяНа && (user.Phone1.EndsWith(specimen) || user.Phone2.EndsWith(specimen)) == false) { return(false); } return(true); }
protected static bool CheckStringCriteria(ColumnFilterCriteria crit, string value, string specimen) { if (crit == ColumnFilterCriteria.Равно && value != specimen) return false; if (crit == ColumnFilterCriteria.НеРавно && value == specimen) return false; if (crit == ColumnFilterCriteria.Включает && value.Contains(specimen) == false) return false; if (crit == ColumnFilterCriteria.НачинаетсяС && value.StartsWith(specimen) == false) return false; if (crit == ColumnFilterCriteria.КончаетсяНа && value.EndsWith(specimen) == false) return false; return true; }
public ColumnFilter(string title, string category, PropertyInfo propInfo, ColumnFilterCriteria enabledCriterias, Object[] enabledValues, bool autoCheck) { Title = title; Category = category; PropInfo = propInfo; EnabledCriterias = enabledCriterias; EnabledValues = enabledValues; AutoCheck = autoCheck; }
protected static bool CheckStringCriteria(ColumnFilterCriteria crit, int?value, string specimen) { var values = specimen.ToIntArrayUniform(); if (crit == ColumnFilterCriteria.Включает) { return(values.Any(i => crit == ColumnFilterCriteria.Включает && value == i)); } return(crit == ColumnFilterCriteria.НеВключает && values.All(i => i != value)); }
public ColumnFilterUser(ColumnFilterUser us) { critTitle = us.critTitle; critName = us.critName; critSurname = us.critSurname; critPatronym = us.critPatronym; critPhone = us.critPhone; critEmail = us.critEmail; critRole = us.critRole; critAccount = us.critAccount; valTitle = us.valTitle; valName = us.valName; valSurname = us.valSurname; valPatronym = us.valPatronym; valPhone = us.valPhone; valEmail = us.valEmail; valAccounts = us.valAccounts; valRole = us.valRole; }
protected static bool CheckStringCriteria(ColumnFilterCriteria crit, DateTime?value, DateTime?specimen) { if (crit == ColumnFilterCriteria.авно && value != specimen) { return(false); } if (crit == ColumnFilterCriteria.НеРавно && value == specimen) { return(false); } if (crit == ColumnFilterCriteria.Больше && value <= specimen) { return(false); } if (crit == ColumnFilterCriteria.Меньше && value >= specimen) { return(false); } return(true); }
protected static bool CheckStringCriteria(ColumnFilterCriteria crit, string value, string specimen) { if (crit == ColumnFilterCriteria.авно && value != specimen) { return(false); } if (crit == ColumnFilterCriteria.НеРавно && value == specimen) { return(false); } if (crit == ColumnFilterCriteria.Включает && value.Contains(specimen) == false) { return(false); } if (crit == ColumnFilterCriteria.НачинаетсяС && value.StartsWith(specimen) == false) { return(false); } if (crit == ColumnFilterCriteria.КончаетсяНа && value.EndsWith(specimen) == false) { return(false); } return(true); }
protected static bool CheckStringCriteria(ColumnFilterCriteria crit, DateTime? value, DateTime? specimen) { if (crit == ColumnFilterCriteria.Равно && value != specimen) return false; if (crit == ColumnFilterCriteria.НеРавно && value == specimen) return false; if (crit == ColumnFilterCriteria.Больше && value <= specimen) return false; if (crit == ColumnFilterCriteria.Меньше && value >= specimen) return false; return true; }
protected static bool CheckStringCriteria(ColumnFilterCriteria crit, int? value, string specimen) { var values = specimen.ToIntArrayUniform(); if (crit == ColumnFilterCriteria.Включает) { return values.Any(i => crit == ColumnFilterCriteria.Включает && value == i); } return crit == ColumnFilterCriteria.НеВключает && values.All(i => i != value); }
private static bool CheckPhoneCriteria(ColumnFilterCriteria crit, PLATFORM_USER user, string specimen) { if (crit == ColumnFilterCriteria.Равно && user.Phone1 != specimen && user.Phone2 != specimen) return false; if (crit == ColumnFilterCriteria.НеРавно && (user.Phone1 == specimen || user.Phone2 == specimen)) return false; if (crit == ColumnFilterCriteria.Включает && (user.Phone1.Contains(specimen) || user.Phone2.Contains(specimen)) == false) return false; if (crit == ColumnFilterCriteria.НачинаетсяС && (user.Phone1.StartsWith(specimen) || user.Phone2.StartsWith(specimen)) == false) return false; if (crit == ColumnFilterCriteria.КончаетсяНа && (user.Phone1.EndsWith(specimen) || user.Phone2.EndsWith(specimen)) == false) return false; return true; }