Exemplo n.º 1
0
        public ActionResult ConfirmSubscriptions(ManageSubsModel m)
        {
            m.UpdateSubscriptions();
            List <Person> Staff = null;

            if (m.masterorgid != null)
            {
                Staff = DbUtil.Db.StaffPeopleForOrg(m.masterorgid.Value);
            }
            else
            {
                Staff = DbUtil.Db.StaffPeopleForDiv(m.divid.Value);
            }
            if (Staff.Count == 0)
            {
                Staff = DbUtil.Db.AdminPeople();
            }

            DbUtil.Db.Email(Staff.First().FromEmail, m.person,
                            "Subscription Confirmation",
                            @"Thank you for managing your subscriptions to {0}<br/>
You have the following subscriptions:<br/>
{1}".Fmt(m.Description(), m.Summary));

            DbUtil.Db.Email(m.person.FromEmail, Staff, "Subscriptions managed", @"{0} managed subscriptions to {1}<br/>
You have the following subscriptions:<br/>
{2}".Fmt(m.person.Name, m.Description(), m.Summary));

            SetHeaders(m.divid ?? m.masterorgid.Value);
            return(View(m));
        }
Exemplo n.º 2
0
        public ActionResult ConfirmSubscriptions(ManageSubsModel m)
        {
            m.UpdateSubscriptions();
            var Staff = DbUtil.Db.StaffPeopleForOrg(m.masterorgid.Value);

            var msg = DbUtil.Db.ContentHtml("ConfirmSubscriptions", Resource1.ConfirmSubscriptions);

            msg = msg.Replace("{org}", m.Description()).Replace("{details}", m.Summary);
            DbUtil.Db.Email(Staff.First().FromEmail, m.person, "Subscription Confirmation", msg);

            DbUtil.Db.Email(m.person.FromEmail, Staff, "Subscriptions managed",
                            @"{0} managed subscriptions to {1}<br/>{2}".Fmt(m.person.Name, m.Description(), m.Summary));

            SetHeaders(m.masterorgid.Value);
            return(View("ManageSubscriptions/Confirm", m));
        }
Exemplo n.º 3
0
        public ActionResult ConfirmSubscriptions(ManageSubsModel m)
        {
            m.UpdateSubscriptions();

            var Staff = CurrentDatabase.StaffPeopleForOrg(m.masterorgid);

            var msg     = CurrentDatabase.ContentHtml("ConfirmSubscriptions", Resource1.ConfirmSubscriptions);
            var orgname = m.Description();

            msg = msg.Replace("{org}", orgname).Replace("{details}", m.Summary);
            CurrentDatabase.Email(Staff.First().FromEmail, m.person, "Subscription Confirmation", msg);

            CurrentDatabase.Email(m.person.FromEmail, Staff, "Subscriptions managed",
                                  $@"{m.person.Name} managed subscriptions to {m.Description()}<br/>{m.Summary}");

            SetHeaders(m.masterorgid);
            m.Log("Confirm");
            return(View("ManageSubscriptions/Confirm", m));
        }