using BS.Shared.DataContracts; using BS.Shared.Interface; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Dakota { public static class DakotaExtensions { public static bool IsSozioTherapie(this ServiceInvoiceDC serviceDC) => IsSozioTherapie(serviceDC?.InvoiceBase); public static bool IsSozioTherapie(this InvoiceBaseDC invoiceBase) { try { if (invoiceBase.InvoiceTitle?.ToLower().Contains("soziotherapie") ?? false) return true; if (invoiceBase.InvoiceId?.ToLower().Contains("soziotherapie") ?? false) return true; } catch(Exception e) { } return false; } public static bool IsSozioTherapie(this IInvoiceBase invoiceBase) { try { if (invoiceBase.InvoiceTitle?.ToLower().Contains("soziotherapie") ?? false) return true; if (invoiceBase.InvoiceId?.ToLower().Contains("soziotherapie") ?? false) return true; } catch (Exception e) { } return false; } } }