public ActionResult DeclineInvitation(int invitationID) { DeclineInvitationStatus status = InvitationService.DeclineProjectInvitation(invitationID); switch (status) { case DeclineInvitationStatus.Declined: ShowMessage((L)"Invitation declined."); return(RedirectToAction("Index", "FormDefinition")); case DeclineInvitationStatus.NotTarget: ShowMessage((L)"You are not the invited user!", HtmlMessageType.Warning); return(RedirectToAction("Index", "FormDefinition")); case DeclineInvitationStatus.NoSuchInvitation: ShowMessage((L)"Invitations doesn't exist!", HtmlMessageType.Warning); return(RedirectToAction("Index", "FormDefinition")); } return(RedirectToAction("Index", "FormDefinition")); }