protected virtual void OnIncomeAdded(SupportIncome obj) { SupportIncomeEventArgs evtArgs = new SupportIncomeEventArgs(); evtArgs.SupportIncome = obj; IncomeAdded?.Invoke(this, evtArgs); }
public void SendSupportIncomeMail(SupportIncome obj) { if (Convert.ToBoolean(ConfigurationManager.AppSettings["SendEmailForSupportIncome"])) { // Placeholders for sending emails Dictionary <string, string> placeHolders = new Dictionary <string, string>(); placeHolders.Add("{AmountEarned}", obj.Amount.ToString("00.00", CultureInfo.InvariantCulture)); placeHolders.Add("{SupportIncomeDate}", obj.SupportDate.ToString(ConfigurationManager.AppSettings["DateDisplay"])); placeHolders.Add("{Description}", obj.Description); EmailParams emailParams = new EmailParams(ConfigurationManager.AppSettings["AdminEmail"], SendEmailType.SupportIncomeMail, placeHolders, ccMail: string.Empty, mailAttachments: string.Empty); EmailUtility.SendMail(emailParams); } }