Skip to content

Commit 071a1f8

Browse files
remove old mail message code in controller related to #66
1 parent f08806d commit 071a1f8

1 file changed

Lines changed: 3 additions & 28 deletions

File tree

Controllers/EventRegistrationController.cs

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ public ActionResult Save()
545545
string ref_id = GetRefIdFromEmail(email);
546546

547547
string notificationType = "";
548-
string message = "";
549548

550549
// Check for logged in user
551550
User user = subManager.Subjects.Where(a => a.Name == HttpContext.User.Identity.Name).FirstOrDefault() as User;
@@ -568,14 +567,13 @@ public ActionResult Save()
568567
erManager.UpdateEventRegistration(reg);
569568

570569
SendEmailNotification("updated", email, ref_id, data, e, user);
571-
message = "Registration details sucessfully updated.";
572570
}
573571
else
574-
CreateNewEventRegistration(e, data, user, email, notificationType, ref_id, message);
572+
CreateNewEventRegistration(e, data, user, email, notificationType, ref_id);
575573
}
576574
// New event registration
577575
else
578-
CreateNewEventRegistration(e, data, user, email, notificationType, ref_id, message);
576+
CreateNewEventRegistration(e, data, user, email, notificationType, ref_id);
579577

580578

581579
return Json(new { result = "redirect", url = Url.Action("EventRegistration", "EventRegistration", new { area = "EMM", ref_id = ref_id }) }, JsonRequestBehavior.AllowGet);
@@ -587,7 +585,7 @@ public ActionResult Save()
587585
/// </summary>
588586
/// <param name=""></param>
589587
/// <returns></returns>
590-
private void CreateNewEventRegistration(Event e, XDocument data, User user, string email, string notificationType, string ref_id, string message)
588+
private void CreateNewEventRegistration(Event e, XDocument data, User user, string email, string notificationType, string ref_id)
591589
{
592590
using (var erManager = new EventRegistrationManager())
593591
{
@@ -597,48 +595,25 @@ private void CreateNewEventRegistration(Event e, XDocument data, User user, stri
597595
int countRegs = erManager.GetNumerOfRegistrationsByEvent(e.Id);
598596
if (countRegs >= e.ParticipantsLimitation)
599597
{
600-
message = "Number of participants has been reached. You are now on the waiting list.";
601598
notificationType = "succesfully_registered_waiting_list";
602599
}
603600
else
604601
{
605-
message = "You registered sucessfully.";
606602
notificationType = "succesfully_registered";
607603
}
608604
}
609605
else
610606
{
611-
message = "You registered sucessfully.";
612607
notificationType = "succesfully_registered";
613608
}
614609

615-
// Add hint to message text
616-
string change = "";
617-
if (e.EditAllowed == true)
618-
{
619-
change = "and change";
620-
}
621-
else
622-
{
623-
change = "(edit is not allowed - in urgent cases please contact ...)"; // todo fill with mail adress
624-
}
625-
if (user != null)
626-
{
627-
message = message + " To view " + change + " your registration log in or follow the link send via email.";
628-
}
629-
else
630-
{
631-
message = message + " To view " + change + " your registration follow the link send via email.";
632-
}
633-
634610
// Save registration and send notification
635611
erManager.CreateEventRegistration(XmlMetadataWriter.ToXmlDocument(data), e, user, false, ref_id);
636612

637613
SendEmailNotification(notificationType, email, ref_id, data, e, user);
638614
}
639615
}
640616

641-
642617
#endregion
643618

644619
#region Validation

0 commit comments

Comments
 (0)