public ActionResult AddSponsor(Sponsor sponsor)
        {

            try
            {
                var memId = RDN.Library.Classes.Account.User.GetMemberId();
                var league = MemberCache.GetLeagueOfMember(memId);
                sponsor.SponsorForLeague = league.LeagueId;
                sponsor.SponsorAddByMember = memId;

                bool execute = RDN.Library.Classes.League.Sponsor.Add_New_Sponsor(sponsor);

            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }

            return Redirect(Url.Content("~/league/sponsors?u=" + SiteMessagesEnum.sac));
        }
Esempio n. 2
0
        private static Sponsor DisplaySponsorList(DataModels.League.Sponsorship oSponsor)
        {
            Sponsor bl = new Sponsor();
            bl.SponsorId = oSponsor.SponsorId;
            bl.SponsorName = oSponsor.SponsorName;
            bl.SponsorForLeague = oSponsor.SponsorForLeague.LeagueId;
            bl.IsDeleted = oSponsor.IsDeleted;
            bl.SponsorAddByMember = oSponsor.SponsorAddByMember.MemberId;
            bl.PromoCode = oSponsor.PromoCode;
            bl.Description = oSponsor.Description;
            bl.UsedCount = oSponsor.UsedCount;
            bl.Website = oSponsor.Website;
            bl.BeginDate = oSponsor.BeginDate.GetValueOrDefault();
            bl.EndDate = oSponsor.EndDate.GetValueOrDefault();
            bl.Sponsored = oSponsor.Sponsored;

            return bl;
        }
        public ActionResult EditSponsor(Sponsor oSponsor)
        {
            try
            {
                bool execute = RDN.Library.Classes.League.Sponsor.UpdateSponsorInfo(oSponsor);

                return Redirect(Url.Content("~/league/sponsors?u=" + SiteMessagesEnum.s));
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }
            return Redirect(Url.Content("~/?u=" + SiteMessagesEnum.sww));

        }