示例#1
0
        public ActionResult PeriodicPayment2(PeriodicPaymentModel model)
        {
            bool TheError = false;

            if (ModelState.IsValid)
            {
                Connection.Connection con = new Connection.Connection();
                if (User.Identity.GetUserId() == null)
                {
                    TheError = con.AddUserAndDonator(model);
                }
                else
                {
                    TheError = con.UpdateUserAndDonator(model, User.Identity.GetUserId());
                }
            }
            if (TheError == false)
            {
                return(RedirectToAction("Index", "Manage", new { Message = Models.ManageMessageId.PeriodicPaymentFormSuccess }));
            }
            else
            {
                return(View(model));
            }
        }