Ejemplo n.º 1
0
 /// <summary>
 /// This method will call the Event Manager class method to Delete the event in the database
 /// </summary>
 /// <param name="objEvent">An Event Object which contain event id which wants to delete</param>
 public void DeleteEvent(Events objEvent)
 {
     try
     {
         FacadeManager.EventManager.DeleteEvent(objEvent);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This method will call the Event Manager class method to get the event detail in the database
 /// </summary>
 /// <param name="objEvent">An Event Object which contain Event Id for which wants to get the detail of the event</param>
 /// <returns>This method will return the Events object which contain the Event information</returns>
 public Events GetFullEvent(Events objEvent)
 {
     try
     {
         return FacadeManager.EventManager.GetFullEvent(objEvent);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// This method will call the Event Manager method to invite the guest for the event
 /// </summary>
 /// <param name="objEvent">n Event Object which contain event id and Guest List</param>
 public int InviteGuest(Events objEvent)
 {
     try
     {
         return FacadeManager.EventManager.InviteGuest(objEvent);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public void GetMyEventsTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            Events onjevents = new Events();
            onjevents.UserId = InsertDummyUser("tj_op");
            object[] objvalue = { onjevents, 1, 1 };
            //object[] objValue = {,1,1}; // TODO: Initialize to an appropriate value
            List<Events> expected = new List<Events>(); // TODO: Initialize to an appropriate value
            Events objMyEvents = new Events();
            objMyEvents.EventID = 431;
            objMyEvents.EventName = "tj";
            objMyEvents.EventDesc = "Birthday";
            objMyEvents.EventDate = DateTime.Parse("03-11-2011 AM 12:00:00");
            objMyEvents.EventRsvp = "Awaiting Response";
            objMyEvents.TributeId = 38575;
            expected.Add(objMyEvents);

            List<Events> actual;
            actual = target.GetMyEvents(objvalue);
            Assert.AreEqual(expected[0].EventID, actual[0].EventID);
            Assert.AreEqual(expected[0].EventName, actual[0].EventName);
            Assert.AreEqual(expected[0].EventDesc, actual[0].EventDesc);
            Assert.AreEqual(expected[0].EventDate, actual[0].EventDate);
            Assert.AreEqual(expected[0].EventRsvp, actual[0].EventRsvp);
            Assert.AreEqual(expected[0].TributeId, actual[0].TributeId);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Ejemplo n.º 5
0
 /// <summary>
 /// This method will call the Event Manager class method to get the event list from the database
 /// </summary>
 /// <param name="objEvent">An Event Object which contain Tribute Id for which wants to get the event list</param>
 /// <returns>This method will return the list of Events object which contain the Event list</returns>
 public IList<Events> GetEventList(Events objEvent)
 {
     try
     {
         return FacadeManager.EventManager.GetEventList(objEvent);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public List<Events> GetMyEvents(object[] objValue)
        {
            Events objUserReg = (Events)objValue[0];
            List<Events> lstEvents = new List<Events>();

            object[] objParam = { objUserReg.UserId, int.Parse(objValue[1].ToString()), int.Parse(objValue[2].ToString()) };
            DataSet _objDataSet = GetDataSet("usp_GetUserevents", objParam);
            if (_objDataSet.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in _objDataSet.Tables[0].Rows)
                {
                    Events objMyEvents = new Events();
                    objMyEvents.EventID = int.Parse(dr["EventID"].ToString());
                    objMyEvents.EventName = dr["EventName"].ToString();
                    objMyEvents.EventDesc = dr["TypeDescription"].ToString();
                    objMyEvents.EventDate = DateTime.Parse(dr["EventDate"].ToString());
                    objMyEvents.EventRsvp = dr["RSVP"].ToString();
                    objMyEvents.TributeId = int.Parse(dr["TributeId"].ToString());
                    lstEvents.Add(objMyEvents);
                    objMyEvents = null;
                }
            }
            return lstEvents;
        }
        public void GetEventNameTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            Events actual;

            Events onjevents = new Events();
            onjevents.UserId = InsertDummyUser("tj_op");
            object[] objvalue = { onjevents, 1, 1 };

            actual = target.GetEventName(target.GetMyEvents(objvalue)[0].EventID);
            Assert.AreEqual("tj", actual.EventName);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Ejemplo n.º 8
0
        /// <summary>
        /// This method will call the Event Resource class method to Update the event in the database
        /// And send the email to all admin about the event updation for all public event and also
        /// resend the mail to all guest list about teh event updation
        /// </summary>
        /// <param name="objEvent">An Event Object which contain updated Event information</param>
        public void UpdateEvent(Events objEvent)
        {
            try
            {
                EventResource objEventRes = new EventResource();

                // First get the Guest List for the event which are going to update
                Events guestList = objEventRes.GetEventGuestList(objEvent);

                // Now Update the Event Detail
                object identity = objEventRes.UpdateEvent(objEvent);

                // Send the email to all the adminstrator if event is public that event has been updated
                if ((objEvent != null) && (objEvent.CustomError == null) && (identity != null)
                    && (int.Parse(identity.ToString()) != 0) && (objEvent.IsPrivate == false))
                {
                    string EmailSubject = objEvent.FirstName + " " + objEvent.LastName + " updated the event \"" + objEvent.EventName + "\"";
                    string EmailBody = "<font style='font-size: 12px; font-family:Lucida Sans;'><p>" + objEvent.FirstName + " " + objEvent.LastName + " updated the event \"" + objEvent.EventName + "\"<br/> <br/> To see more details, follow the link below: <br/> " + objEvent.ServerURL.ToLower() + "<br/>" + "----" + "<br/>" + "Your Tribute Team</p></font>";

                    SendEmail(objEvent.TributeId, EmailSubject, EmailBody.Replace("##", objEvent.EventID.ToString()));
                }

                // If an event name an event type combination already exist in database then
                // return an error message
                if (int.Parse(identity.ToString()) == 0)
                {
                    Errors objError = new Errors();
                    objError.ErrorMessage = "This Event Name '" + objEvent.EventName + "' with this Event Type already exist";
                    objEvent.CustomError = objError;
                }
                else   // Otherwise send the mail to all Guests about the updation
                {
                    // Send the email to all the Guest who are invited for the event that event has been updated
                    if (guestList.EventAwaiting != null)
                    {
                        for (int i = 0; i < guestList.EventAwaiting.Count; i++)
                        {
                            Events emailEvent = new Events();

                            emailEvent.EventID = objEvent.EventID;
                            emailEvent.EmailId = guestList.EventAwaiting[i].UserName.ToString();

                            string EmailSubject = objEvent.FirstName + " " + objEvent.LastName + " invited you to the event " + objEvent.TributeName;
                            string EmailBody = "<font style='font-size: 12px; font-family:Lucida Sans;'><p>" + objEvent.FirstName + " " + objEvent.LastName + " invited you to the event '" + objEvent.EventName + "' in the " + objEvent.TributeName + " Tribute. <br/> <br/> To RSVP and see more details, follow the link below: <br/> <br/>";

                            string href = objEvent.InviteGuestURL + "?EventID=" + objEvent.EventID + "&TributeID=" + objEvent.TributeId + "&mode=emailPage" + "&Email=" + emailEvent.EmailId;
                            EmailBody += href + "'>" + "http://" + objEvent.TributeType.ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "/event.aspx?&EventId=" + objEvent.EventID + "</a>" + "<br/> <br/>" + "----" + "<br/>" + "Your Tribute Team</p></font>";

                            EmailMessages objEmail = EmailMessages.Instance;
                            bool val = objEmail.SendMessages("Your Tribute<" + WebConfig.NoreplyEmail + ">", emailEvent.EmailId, EmailSubject, CreateBody(EmailBody), EmailMessages.TextFormat.Html.ToString());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public Events GetEventName(int EventID)
        {
            Events objEvent = new Events();
            try
            {
                object[] objParam = { EventID };
                DataSet dsEvent = GetDataSet("usp_GetEventOnId", objParam);

                if (dsEvent.Tables.Count > 0)
                {
                    if (dsEvent.Tables[0].Rows.Count > 0)
                    {
                        DataRow drEvent = dsEvent.Tables[0].Rows[0];

                        objEvent.EventName = drEvent["EventName"].ToString();
                        objEvent.EventID = int.Parse(drEvent["EventId"].ToString());
                        objEvent.TributeId = int.Parse(drEvent["TributeId"].ToString());
                        objEvent.UserId = int.Parse(drEvent["UserId"].ToString());
                    }
                }

            }
            catch (Exception ex)
            {
                throw ex;
            }

            return objEvent;
        }
Ejemplo n.º 10
0
        /// <summary>
        /// This method will call the Event Resource class method to Add the event in the database
        /// And send the email to all admin about the event insertion for all public event
        /// </summary>
        /// <param name="objEvent">An Event Object which contain Event information</param>
        public void SaveEvent(Events objEvent)
        {
            try
            {
                EventResource objEventRes = new EventResource();
                object identity = objEventRes.SaveEvent(objEvent);

                // Send the email to all the adminstrator if event is public that event has been created
                if ((objEvent != null) && (objEvent.CustomError == null) && (identity != null)
                    && (int.Parse(identity.ToString()) != 0) && (objEvent.IsPrivate == false))
                {
                    string EmailSubject = objEvent.FirstName + " " + objEvent.LastName + " added a new event on Your " + WebConfig.ApplicationWordForInternalUse.ToString() + "...";
                    string EmailBody = "<font style='font-size: 12px; font-family:Lucida Sans;'><p>" + objEvent.FirstName + " " + objEvent.LastName + " added a new event in the " + objEvent.TributeName + " " + objEvent.TributeType + " " + WebConfig.ApplicationWordForInternalUse.ToString() + ".</p><p> To view the event, follow the link below: <br/> " + objEvent.ServerURL + " </p>" + "<p>----" + "<br/>" + "Your " + WebConfig.ApplicationWord.ToString() + " Team</p></font>";

                    SendEmail(objEvent.TributeId, EmailSubject, EmailBody.Replace("##", identity.ToString()));
                }

                // If an event name an event type combination already exist in database then
                // return an error message
                if (int.Parse(identity.ToString()) == 0)
                {
                    Errors objError = new Errors();
                    objError.ErrorMessage = "This Event Name '" + objEvent.EventName + "' with this Event Type already exist";
                    objEvent.CustomError = objError;
                }
                else    // otherwise return the eventid
                {
                    objEvent.EventID = int.Parse(identity.ToString());
                }

                SessionValue objSessionValue = null;
                StateManager objStateManager = StateManager.Instance;
                objSessionValue = (SessionValue)objStateManager.Get(PortalEnums.SessionValueEnum.objSessionvalue.ToString(), StateManager.State.Session);
                if ((objEvent != null) && (objEvent.CustomError == null) && (identity != null)
                   && (int.Parse(identity.ToString()) != 0))
                {
                   object value =  objEventRes.SaveRsvpForCreator(objEvent,objSessionValue);
                   if (value != null)
                   {
                       if (int.Parse(value.ToString()) != 0)
                       {
                           //Insert the Hashcode for the Guest
                           string Hashcode = GetHashCode(int.Parse(value.ToString()));
                           objEventRes.InsertHashCodeForGuest(int.Parse(value.ToString()), Hashcode);
                       }
                   }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// This method will call the Event Resource class method to Delete the event in the database
        /// And send the email to all admin about the event deletion for all public event and also
        /// resend the mail to all guest list about teh event deletion
        /// </summary>
        /// <param name="objEvent">An Event Object which contain event id which wants to delete</param>
        public void DeleteEvent(Events objEvent)
        {
            try
            {
                EventResource objEventRes = new EventResource();

                // First get the Guest List for the event which are going to update
                Events guestList = objEventRes.GetEventGuestList(objEvent);
                TributesPortal.Utilities.StateManager stateManager = TributesPortal.Utilities.StateManager.Instance;
                //string Servername = (string)stateManager.Get("SERVERNAME", TributesPortal.Utilities.StateManager.State.Session);

                // Now Delete the Event and Guest List
                objEventRes.DeleteEvent(objEvent);

                // Send the email to all the adminstrator that event has been updated
                if ((objEvent != null) && (objEvent.CustomError == null) && (objEvent.IsPrivate == false))
                {
                    string EmailSubject = string.Empty;

                    if (!string.IsNullOrEmpty(objEvent.LastName))
                        EmailSubject = objEvent.FirstName + " " + objEvent.LastName + " cancelled the event \"" + objEvent.EventName + "\"";
                    else
                        EmailSubject = objEvent.FirstName + " cancelled the event \"" + objEvent.EventName + "\"";
                    string EmailBody = "<font style='font-size: 12px; font-family:Lucida Sans;'><p>" + objEvent.FirstName + " " + objEvent.LastName + " cancelled the event \"" + objEvent.EventName + "\"" + " in the " + objEvent.TributeName + " " + objEvent.TributeType + "  Tribute." +
                        "<br/><br/>" + "To view the tribute, follow the link below:" + "<br/>";
                    //string href = "<a href='http://" + objEvent.TributeType.Trim().ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "'> http://" + Servername + "/" + objEvent.TributeURL + "</a>" + "<br/> <br/>" + "----" + "<br/>" + "Your Tribute Team</p></font>";
                    string href = "<a href='http://" + objEvent.TributeType.Trim().ToLower().Replace("new baby", "newbaby") + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "'> http://" + objEvent.TributeType.Trim().ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "</a>" + "<br/> <br/>" + "----" + "<br/>" + "Your Tribute Team</p></font>";
                    EmailBody += href;

                    SendEmail(objEvent.TributeId, EmailSubject, EmailBody);
                }

                if (guestList.EventAwaiting != null)
                {
                    // Send the email to all the Guest who are invited for the event that event has been updated
                    for (int i = 0; i < guestList.EventAwaiting.Count; i++)
                    {
                        Events emailEvent = new Events();
                        emailEvent.EventID = objEvent.EventID;
                        emailEvent.EmailId = guestList.EventAwaiting[i].UserName.ToString();
                        string EmailSubject = string.Empty;

                        if (!string.IsNullOrEmpty(objEvent.LastName))
                            EmailSubject = objEvent.FirstName + " " + objEvent.LastName + " cancelled the event \"" + objEvent.EventName + "\"";
                        else
                            EmailSubject = objEvent.FirstName + " cancelled the event \"" + objEvent.EventName + "\"";

                        string EmailBody = "<font style='font-size: 12px; font-family:Lucida Sans;'><p>" + objEvent.FirstName + " " + objEvent.LastName + "  cancelled the event \"" + objEvent.EventName + "\"" + " in the " + objEvent.TributeName + " " + objEvent.TributeType + " Tribute." +
                        "<br/><br/>" + "To view the tribute, follow the link below:" + "<br/>";
                        //string href = "<a href='http://" + objEvent.TributeType.Trim().ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "'> http://" + Servername + "/" + objEvent.TributeURL + "</a>" + "<br/> <br/>" + "----" + "<br/>" + "Your Tribute Team</p></font>";
                        string href = "<a href='http://" + objEvent.TributeType.Trim().ToLower().Replace("new baby", "newbaby") + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "'> http://" + objEvent.TributeType.Trim().ToLower().Replace("new baby", "newbaby") + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "</a>" + "<br/> <br/>" + "----" + "<br/>" + "Your Tribute Team</p></font>";
                        //string href = "<a href='http://" + objEvent.TributeType.Trim().ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "'> http://" + objEvent.TributeType.Trim().ToLower() + "." + WebConfig.TopLevelDomain + "/" + "/" + objEvent.TributeURL + "</a>" + "<br/> <br/>" + "----" + "<br/>" + "Your Tribute Team</p></font>";
                        EmailBody += href;

                        EmailMessages objEmail = EmailMessages.Instance;
                        bool val = objEmail.SendMessages("Your Tribute<" + WebConfig.NoreplyEmail + ">", emailEvent.EmailId, EmailSubject, CreateBody(EmailBody), EmailMessages.TextFormat.Html.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// This method will call the Event resource method to invite the guest for the event
        /// </summary>
        /// <param name="objEvent">An Event Object which contain event id and Guest List</param>
        public int InviteGuest(Events objEvent)
        {
            int count = 0;

            try
            {
                StateManager objStateManager = StateManager.Instance;
                SessionValue objSessionValue = (SessionValue)objStateManager.Get(PortalEnums.SessionValueEnum.objSessionvalue.ToString(), StateManager.State.Session);

                StateManager objStateManager_ = StateManager.Instance;
                Tributes objTribute = (Tributes)objStateManager_.Get(PortalEnums.SessionValueEnum.TributeSession.ToString(), StateManager.State.Session);

                TributesPortal.Utilities.StateManager stateManager = TributesPortal.Utilities.StateManager.Instance;
                string Servername = (string)stateManager.Get("SERVERNAME", TributesPortal.Utilities.StateManager.State.Session);

                EventResource objEventRes = new EventResource();
                Events objEventDetails = objEventRes.GetEventInfo(objEvent);

                //Added by amit
                objEventDetails.EventID = objEvent.EventID;
                objEventDetails.TributeId = objEvent.TributeId;
                objEventDetails.IsActive = true;
                objEventDetails.UserId = objEvent.UserId;
                objEventDetails.ModifiedBy = objEvent.UserId;
                objEventDetails.TributeType = objEvent.TributeType;
                objEventDetails.EventThemeID = objEvent.EventThemeID;
                objEventDetails.EventMessage = objEvent.EventMessage;
                objEventDetails.State = objEvent.State;
               // objEventDetails.IsAskForMeal = objEventRes.IsAskForMeal;
                objEventRes.UpdateEvent(objEventDetails);

                string EmailSubject = objSessionValue.FirstName + " " + objSessionValue.LastName + " invited you to the event \"" + objEventDetails.EventName + "\"";
                for (int i = 0; i < objEvent.EventAwaiting.Count; i++)
                {
                    Events emailEvent = new Events();
                    emailEvent.EventID = objEvent.EventID;
                    emailEvent.EmailId = objEvent.EventAwaiting[i].UserName.ToString();
                    emailEvent.IsAskForMeal = objEventDetails.IsAskForMeal;
                    emailEvent.MealOptions = objEventDetails.MealOptions;
                    object identity = objEventRes.InviteGuest(emailEvent);
                    if (identity != null)
                    {
                        if (int.Parse(identity.ToString()) != 0)
                        {
                            //Insert the Hashcode for the Guest
                            string Hashcode = GetHashCode(int.Parse(identity.ToString()));
                            objEventRes.InsertHashCodeForGuest(int.Parse(identity.ToString()), Hashcode);

                            EmailMessages objEmail = EmailMessages.Instance;

                            EventTheme objTheme = GetEventThemeByID(objEventDetails.EventThemeID);

                            StringBuilder objEmailBody = new StringBuilder();
                            objEmailBody.Append("<html>");
                            objEmailBody.Append("<head>");
                            objEmailBody.Append("<title>Event Invitation Mail</title>");
                            objEmailBody.Append("</head>");
                            objEmailBody.Append("<body text='#000000' link='#000000'>");
                            objEmailBody.Append("<table width='700' border='0' align='center' cellpadding='0' cellspacing='0'>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><table width='100%' border='0' cellspacing='10' cellpadding='0'>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Having trouble seeing this email? <a href='http://" + objEventDetails.TributeType.Replace("New Baby", "newbaby").ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "/event.aspx?EventID=" + objEventDetails.EventID + "'> Visit our Event webpage.</a></font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("</table></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td><table width='520' height='650' border='0' align='center' cellpadding='0' cellspacing='10' bgcolor='" + objTheme.ThemeBackgroundColor + "'>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><img src='" + GetImageURL(objTheme.ThemeFullSizeImage) + "' alt='Invitation Photo' /></font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>&nbsp;</font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><strong><font size='4' face='Verdana, Arial, Helvetica, sans-serif'>" + objEventDetails.EventName + " </font></strong></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>" + objEventDetails.EventMessage + " </font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>When:</strong></font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>" + DateTime.Parse(objEventDetails.EventDate.ToString()).ToString("MMMM dd, yyyy") + ", " + objEventDetails.EventStartTime + " - " + objEventDetails.EventEndTime + "</font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>Where:</strong></font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>" + objEventDetails.EventPlace + "</font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>Website:</strong></font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><a href='http://" + objEventDetails.TributeType.Replace("New Baby", "newbaby").ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "/'>http://" + objEventDetails.TributeType.Replace("New Baby", "newbaby").ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "/</a></font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>&nbsp;</font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("</table>");
                            objEmailBody.Append("</td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td><table width='100%' border='0' cellspacing='10' cellpadding='0'>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><a href='http://" + objEventDetails.TributeType.Replace("New Baby", "newbaby").ToLower() + "." + WebConfig.TopLevelDomain + "/" + objEvent.TributeURL + "/event.aspx?EventID=" + objEventDetails.EventID + "&TributeID=" + objEventDetails.TributeId + "&Hashcode=" + Hashcode + "'><b><font size='4' face='Verdana, Arial, Helvetica, sans-serif'>Please visit our " + objEventDetails.TributeType + " Tribute to RSVP</font></b></a></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("</table>");
                            objEmailBody.Append("</td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td><table width='100%' border='0' cellspacing='5' cellpadding='0'>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>This email has a unique link just for you, please do not forward it to others.</font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Your Tribute respects your privacy. For any privacy concerns please <a href='"+ WebConfig.AppBaseDomain +"privacy.aspx'>click here.</a></font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Your Tribute, Inc.</font></td>");
                            objEmailBody.Append("</tr>");
                            objEmailBody.Append("<tr>");
                            objEmailBody.Append("<td align='center'><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>2875 North Lamb Blvd. Bldg 8, Las Vegas, NV 89115</font></td>");
                            objEmailBody.Append("</tr></table></td>");
                            objEmailBody.Append("</tr></table></body></html>");

                            bool val = objEmail.SendMessages("Your Tribute<" + WebConfig.NoreplyEmail + ">", emailEvent.EmailId, EmailSubject, objEmailBody.ToString(), EmailMessages.TextFormat.Html.ToString());
                            count++;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return count;
        }
Ejemplo n.º 13
0
 /// <summary>
 /// This method will call the Event Resource class method to get the event detail in the database
 /// </summary>
 /// <param name="objEvent">An Event Object which contain Event Id for which wants to get the detail of the event</param>
 /// <returns>This method will return the Events object which contain the Event information</returns>
 public Events GetFullEvent(Events objEvent)
 {
     try
     {
         EventResource objEventRes = new EventResource();
         return objEventRes.GetFullEvent(objEvent);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 14
0
 /// <summary>
 /// This method will call the Event Resource class method to get the event list from the database
 /// </summary>
 /// <param name="objEvent">An Event Object which contain Tribute Id for which wants to get the event list</param>
 /// <returns>This method will return the list of Events object which contain the Event list</returns>
 public IList<Events> GetEventList(Events objEvent)
 {
     try
     {
         EventResource objEventRes = new EventResource();
         return objEventRes.GetEventList(objEvent);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }