public ActionResult DuesSettings(DuesModel duesModel)
 {
     DuesPortableModel dues = duesModel;
     try
     {
         dues.DuesEmailText = duesModel.DuesEmailDisplayText;
         ViewBag.IsSuccessful = DuesFactory.UpdateDuesSettings(dues);
         ViewData["whoPaysFeesSelectList"] = WhoPaysProcessorFeesEnum.Sender.ToSelectList();
         duesModel.ProcessorFeesTotal = (dues.DuesCost * .029 + .50).ToString("N2");
         return Redirect(Url.Content("~/dues/settings/" + duesModel.OwnerEntity + "/" + duesModel.LeagueOwnerId.ToString().Replace("-", "") + "/" + duesModel.DuesId.ToString().Replace("-", "") + "?u=" + SiteMessagesEnum.s));
     }
     catch (Exception exception)
     {
         ErrorDatabaseManager.AddException(exception, GetType());
     }
     return Redirect(Url.Content("~/?u=" + SiteMessagesEnum.sww));
 }
        public ActionResult DuesSettings(string type, string id, string duesId)
        {
            DuesModel dues = new DuesModel();
            try
            {
                DuesPortableModel due = DuesFactory.GetDuesSettings(new Guid(id), new Guid(duesId));

                NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(Request.Url.Query);
                string u = nameValueCollection["u"];

                if (u == SiteMessagesEnum.s.ToString())
                {
                    SiteMessage message = new SiteMessage();
                    message.MessageType = SiteMessageType.Success;
                    message.Message = "Successfully Updated.";
                    this.AddMessage(message);
                }

                dues.DayOfMonthToCollectDefault = due.DayOfMonthToCollectDefault;
                dues.DaysBeforeDeadlineToNotifyDefault = due.DaysBeforeDeadlineToNotifyDefault;
                dues.DuesCost = due.DuesCost;
                dues.DuesCostDisplay = due.DuesCostDisplay;
                dues.DuesFees = due.DuesFees;
                dues.DuesId = due.DuesId;
                dues.LeagueOwnerId = due.LeagueOwnerId;
                dues.LeagueOwnerName = due.LeagueOwnerName;
                dues.OwnerEntity = due.OwnerEntity;
                dues.DuesEmailDisplayText = due.DuesEmailText;
                dues.PayPalEmailAddress = due.PayPalEmailAddress;
                dues.WhoPaysProcessorFeesEnum = due.WhoPaysProcessorFeesEnum;
                dues.AcceptPaymentsOnline = due.AcceptPaymentsOnline;
                dues.LockDownManagementToManagersOnly = due.LockDownManagementToManagersOnly;
                dues.Currency = due.Currency;

                ViewData["whoPaysFeesSelectList"] = WhoPaysProcessorFeesEnum.Sender.ToSelectList();
                dues.ProcessorFeesTotal = (due.DuesCost * .029 + .50).ToString("N2");
                dues.CurrencyList = new SelectList(SiteCache.GetCurrencyExchanges(), "CurrencyAbbrName", "CurrencyNameDisplay", "USD");

                ViewBag.IsSuccessful = false;
                return View(dues);
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, GetType());
            }
            return Redirect(Url.Content("~/?u=" + SiteMessagesEnum.sww));

        }