Ejemplo n.º 1
0
 /// <summary>
 /// Function called to search the model
 /// for availability of the specified string.
 /// </summary>
 /// <param name="str">The search string</param>
 /// <returns>True, if the string is contained in the model, else false</returns>
 public override bool Contains(string str)
 {
     return((ActivityCategory != null && ActivityCategory.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
            (ActivityCode != null && ActivityCode.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
            (OAActivityCodeId != null && OAActivityCodeId.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
            (Account != null && Account.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
            (JobCode != null && JobCode.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
            (OAJobCodeId != null && OAJobCodeId.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
            (CostCenter != null && CostCenter.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
            (OACostCenterId != null && OACostCenterId.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Function called to search the model
 /// for availability of the specified string.
 /// </summary>
 /// <param name="str">The search string</param>
 /// <returns>True, if the string is contained in the model, else false</returns>
 public override bool Contains(string str)
 {
     return(
         PeriodFrequency != null && PeriodFrequency.StartsWith(str, StringComparison.CurrentCultureIgnoreCase) ||
         ActivityCode != null && ActivityCode.StartsWith(str, StringComparison.CurrentCultureIgnoreCase) ||
         OAJobCodeId != null && OAJobCodeId.StartsWith(str, StringComparison.CurrentCultureIgnoreCase) ||
         BaseAnnualAmount != 0 && BaseAnnualAmount.ToString().StartsWith(str, StringComparison.CurrentCultureIgnoreCase) ||
         FirstPeriodStartDate != null && FirstPeriodStartDate.Value.ToShortDateString().Contains(str) ||
         FirstPeriodAmount != 0 && FirstPeriodAmount.ToString().StartsWith(str, StringComparison.CurrentCultureIgnoreCase) ||
         FirstRenewalDate != null && FirstRenewalDate.Value.ToShortDateString().Contains(str) ||
         FinalRenewalStartDate != null && FinalRenewalStartDate.Value.ToShortDateString().Contains(str) ||
         FinalRenewalEndDate != null && FinalRenewalEndDate.Value.ToShortDateString().Contains(str) ||
         EndAmount != null && EndAmount.ToString().StartsWith(str, StringComparison.CurrentCultureIgnoreCase));
 }