Exemplo n.º 1
0
        private void SendSubmittedEmail(string sHistory, Classes.cCharacterHistory cHist)
        {
            try
            {
                Classes.cUser User     = new Classes.cUser(Master.UserName, "PasswordNotNeeded", Session.SessionID);
                string        sSubject = cHist.CampaignName + " character history from " + cHist.PlayerName + " - " + cHist.CharacterAKA;

                string sBody = (string.IsNullOrEmpty(User.NickName) ? User.FirstName : User.NickName) +
                               " " + User.LastName + " has submitted a character history for " + cHist.CharacterAKA + ".<br><br>" +
                               sHistory;

                if (hidNotificationEMail.Value.Length > 0)
                {
                    Classes.cEmailMessageService cEMS = new Classes.cEmailMessageService();
                    cEMS.SendMail(sSubject, sBody, cHist.NotificationEMail, "", "", "CharacterHistory", Master.UserName);
                }
                //Classes.cSendNotifications SendNot = new Classes.cSendNotifications();
                //SendNot.SubjectText = sSubject;
                //SendNot.EMailBody = sBody;
                //SendNot.NotifyType = Classes.cNotificationTypes.HISTORYSUBMIT;
                //SendNot.SendNotification(Master.UserID, Master.UserName);
            }
            catch (Exception ex)
            {
                // Write the exception to error log and then throw it again...
                Classes.ErrorAtServer lobjError = new Classes.ErrorAtServer();
                lobjError.ProcessError(ex, "CharacterEdit.aspx.SendSubmittedEmail", "", Session.SessionID);
            }
        }
Exemplo n.º 2
0
        private void SendEmailPELSubmitted(string sEmailBody)
        {
            try
            {
                if (ViewState["PELNotificationEMail"].ToString().Length > 0)
                {
                    string sPlayerName    = ViewState["PlayerName"].ToString();
                    string sCharacterName = "";
                    if (ViewState["CharacterAKA"] != null)
                    {
                        sCharacterName = ViewState["CharacterAKA"].ToString();
                    }

                    string sEventDate = "";
                    if (ViewState["EventDate"] != null)
                    {
                        DateTime dtTemp;
                        if (DateTime.TryParse(ViewState["EventDate"].ToString(), out dtTemp))
                        {
                            sEventDate = " that took place on " + ViewState["EventDate"].ToString();
                        }
                    }

                    string sEventName            = ViewState["EventName"].ToString();
                    string sPELNotificationEMail = ViewState["PELNotificationEMail"].ToString();

                    string sSubject = "PEL Submitted: " + sPlayerName + " has submitted a PEL.";
                    string sBody    = sPlayerName + " has submitted a PEL for " + sCharacterName + " for the event " + sEventName + sEventDate + "<br><br>" +
                                      sEmailBody;

                    Classes.cEmailMessageService cEMS = new Classes.cEmailMessageService();
                    cEMS.SendMail(sSubject, sBody, sPELNotificationEMail, "", "", "PEL", Session["Username"].ToString());
                }
            }
            catch (Exception ex)
            {
                // Write the exception to error log and then throw it again...
                Classes.ErrorAtServer lobjError = new Classes.ErrorAtServer();
                lobjError.ProcessError(ex, "PELEdit.aspx.SendEmailPELSubmitted", "", Session.SessionID);
            }
        }
Exemplo n.º 3
0
        private void SendSubmittedEmail(string sHistory, Classes.cCharacterHistory cHist)
        {
            try
            {
                if (hidNotificationEMail.Value.Length > 0)
                {
                    Classes.cUser User     = new Classes.cUser(Session["UserName"].ToString(), "PasswordNotNeeded");
                    string        sSubject = cHist.CampaignName + " character history from " + cHist.PlayerName + " - " + cHist.CharacterAKA;

                    string sBody = (string.IsNullOrEmpty(User.NickName) ? User.FirstName : User.NickName) +
                                   " " + User.LastName + " has submitted a character history for " + cHist.CharacterAKA + ".<br><br>" +
                                   sHistory;
                    Classes.cEmailMessageService cEMS = new Classes.cEmailMessageService();
                    cEMS.SendMail(sSubject, sBody, cHist.NotificationEMail, "", "", "CharacterHistory", Session["Username"].ToString());
                }
            }
            catch (Exception ex)
            {
                // Write the exception to error log and then throw it again...
                Classes.ErrorAtServer lobjError = new Classes.ErrorAtServer();
                lobjError.ProcessError(ex, "CharacterEdit.aspx.SendSubmittedEmail", "", Session.SessionID);
            }
        }