Пример #1
0
        protected void bnReturn_Click(object sender, System.EventArgs e)
        {
            try
            {
                int       code;
                MyContent content = new MyContent(appEnv.GetConnection());
                Account   account = new Account(appEnv.GetConnection());

                content.Insert(cid, Convert.ToInt32(dr["Version"]) + 1, 0,
                               dr["Headline"].ToString(), dr["Source"].ToString(),
                               Convert.ToInt32(dr["Byline"]),
                               dr["Teaser"].ToString(), dr["Body"].ToString(),
                               dr["TagLine"].ToString(),
                               Convert.ToInt32(dr["Editor"]), 0,
                               account.GetAccountID(User.Identity.Name),
                               (code = StatusCodes.RequiresEditing));

                new Distribution(appEnv.GetConnection()).Remove(cid, ver);

                EmailAlert ea = new EmailAlert(Context, code, Convert.ToInt32(dr["Editor"]));
                ea.Send();
            }
            catch (Exception err)
            {
                Page_Error("The following error occured: " + err.Message);
            }

            Response.Redirect("DeployList.aspx");
        }
        private void bnWithdraw_Click(object sender, System.EventArgs e)
        {
            try
            {
                int     code;
                Content content = new Content(appEnv.GetConnection());
                Account account = new Account(appEnv.GetConnection());

                DataRow dr = dt.Rows[0];

                content.Insert(cid, Convert.ToInt32(dr["Version"]) + 1, 0,
                               dr["Headline"].ToString(), dr["Source"].ToString(),
                               Convert.ToInt32(dr["Byline"]),
                               dr["Teaser"].ToString(), dr["Body"].ToString(),
                               dr["TagLine"].ToString(), 0,
                               Convert.ToInt32(dr["Approver"]),
                               account.GetAccountID(User.Identity.Name),
                               (code = StatusCodes.AwaitingEdit));

                EmailAlert ea = new EmailAlert(Context, code, 0);
                ea.Send();
            }
            catch (Exception err)
            {
                Page_Error("The following error occured: " + err.Message);
            }

            Response.Redirect("EdList.aspx");
        }
Пример #3
0
        private void bnSubmit_Click(object sender, System.EventArgs e)
        {
            int code;

            content.SetStatus(Convert.ToInt32(dt.Rows[0]["ContentID"]),
                              Convert.ToInt32(dt.Rows[0]["Version"]),
                              (code = StatusCodes.AwaitingApproval));

            EmailAlert ea = new EmailAlert(Context, code, 0);

            ea.Send();

            Response.Redirect("EdList.aspx");
        }
Пример #4
0
        protected void bnReturn_Click(object sender, System.EventArgs e)
        {
            int code;

            content.SetStatus(Convert.ToInt32(dt.Rows[0]["ContentID"]),
                              Convert.ToInt32(dt.Rows[0]["Version"]),
                              (code = StatusCodes.RequiresEditing));

            EmailAlert ea = new EmailAlert(Context, code, Convert.ToInt32(dt.Rows[0]["Editor"]));

            ea.Send();

            Response.Redirect("AppList.aspx");
        }
Пример #5
0
        protected void bnApprove_Click(object sender, System.EventArgs e)
        {
            Account account = new Account(appEnv.GetConnection());

            content.SetApproval(Convert.ToInt32(dt.Rows[0]["ContentID"]),
                                Convert.ToInt32(dt.Rows[0]["Version"]),
                                account.GetAccountID(User.Identity.Name));

            EmailAlert ea = new EmailAlert(Context, StatusCodes.Approved, 0);

            ea.Send();

            Response.Redirect("AppList.aspx");
        }
Пример #6
0
        // To protect from overposting attacks, see https://aka.ms/RazorPagesCRUD
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Ticket.Add(Ticket);
            await _context.SaveChangesAsync();

            EmailAlert.Send("ticket created " + Ticket.TicketId, "ticket created " + Ticket.TicketId, "Chris Peck", "*****@*****.**");

            return(RedirectToPage("./Index"));
        }
Пример #7
0
        protected void bnSubmit_Click(object sender, System.EventArgs e)
        {
            int code;

            content = new MyContent(appEnv.GetConnection());
            content.SetStatus(Convert.ToInt32(dt.Rows[0]["ContentID"]),
                              Convert.ToInt32(dt.Rows[0]["Version"]),
                              (code = StatusCodes.RequiresUpdate));

            EmailAlert ea = new EmailAlert(Context, code, Convert.ToInt32(dt.Rows[0]["ByLine"]));

            ea.Send();

            Response.Redirect("EdList.aspx");
        }
Пример #8
0
        protected void bnSubmit_Click(object sender, System.EventArgs e)
        {
            int code;

            content.SetStatus(Convert.ToInt32(dt.Rows[0]["ContentID"]),
                              Convert.ToInt32(dt.Rows[0]["Version"]),
                              (code = (Convert.ToInt32(dt.Rows[0]["Editor"]) == 0)?
                                      StatusCodes.AwaitingEdit : StatusCodes.Editing));
            //  Any Editor              or Specific Editor

            EmailAlert ea = new EmailAlert(Context, code, Convert.ToInt32(dt.Rows[0]["Editor"]));

            ea.Send();

            Response.Redirect("AutList.aspx");
        }
Пример #9
0
        private void bnReturn_Click(object sender, System.EventArgs e)
        {
            int     code;
            Account account = new Account(appEnv.GetConnection());

            content.SetApproval(Convert.ToInt32(dt.Rows[0]["ContentID"]),
                                Convert.ToInt32(dt.Rows[0]["Version"]),
                                account.GetAccountID(User.Identity.Name));
            content.SetStatus(Convert.ToInt32(dt.Rows[0]["ContentID"]),
                              Convert.ToInt32(dt.Rows[0]["Version"]),
                              (code = StatusCodes.Discontinued));

            EmailAlert ea = new EmailAlert(Context, code, Convert.ToInt32(dt.Rows[0]["Editor"]));

            ea.Body = tbEdReason.Text;
            ea.Send();

            ea      = new EmailAlert(Context, code, Convert.ToInt32(dt.Rows[0]["ByLine"]));
            ea.Body = tbAutReason.Text;
            ea.Send();

            Response.Redirect("AppList.aspx");
        }