public static string ReplaceVersammlungsparameter(string Mailtext, Conregation Versammlung) { Log.Info(nameof(ReplaceVersammlungsparameter)); if (string.IsNullOrEmpty(Mailtext)) { return(string.Empty); } if (Versammlung is null) { Versammlung = DataContainer.ConregationFind("Unbekannt"); } if (Versammlung is null) { return("Fehler beim verarbeiten der Vorlage '" + Mailtext + "'"); } return(Mailtext .Replace("{Versammlung}", Versammlung.Name) .Replace("{Koordinator Mail}", GetMailadresseKoordinator(Versammlung)) .Replace("{Koordinator Name}", Versammlung.Koordinator) .Replace("{Kreis}", Versammlung.Kreis.ToString(Helper.German)) .Replace("{Versammlung Telefon}", Versammlung.Telefon) .Replace("{Versammlung Anreise}", Versammlung.Anreise) .Replace("{Versammlung Zoom}", Versammlung.Zoom) .Replace("{Versammlung Anschrift1}", Versammlung.Anschrift1) .Replace("{Versammlung Anschrift2}", Versammlung.Anschrift2)); }
public static string GetMailTextEreignisTauschenAnKoordinator(Conregation conregation, DateTime startDatum, DateTime zielDatum, string name, string vortrag, string versammlung) { Log.Info(nameof(GetMailTextEreignisTauschenAnKoordinator)); if (conregation is null) { return("Fehler beim verarbeiten der Vorlage"); } var mailAdresse = GetMailadresseKoordinator(conregation); return(GetMailTextEreignisTauschenAnRedner(name, vortrag, versammlung, mailAdresse, conregation.Koordinator, startDatum, zielDatum)); }
public static string GetMailTextRednerAnfragen(Conregation versammlung, string rednerListe, string terminListe) { Log.Info(nameof(GetMailTextRednerAnfragen)); if (versammlung == null) { return(string.Empty); } var mt = Templates.GetTemplate(Templates.TemplateName.RednerAnfragenMailText).Inhalt; mt = mt .Replace("{Freie Termine}", terminListe) .Replace("{Liste Redner}", rednerListe) .Replace("{Koordinator Mail}", $"{versammlung.KoordinatorJw}; {versammlung.KoordinatorMail}") .Replace("{Koordinator Name}", versammlung.Koordinator) .Replace("{Versammlung}", versammlung.Name) .Replace("{Signatur}", GetTemplate(TemplateName.Signatur).Inhalt); return(mt); }
private static string GetMailadresseKoordinator(Conregation versammlung) { var ergebnis = string.IsNullOrEmpty(versammlung?.KoordinatorJw) ? versammlung?.KoordinatorMail : versammlung?.KoordinatorJw; return(string.IsNullOrWhiteSpace(ergebnis) ? "unbekannt" : ergebnis); }