Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Exception ex = Server.GetLastError();
            if (ex != null)
            {
                string message = ex.GetBaseException().Message;
                MessageLabel.Text = message;

                ViewPayment.LogsError(ex, "System");
            }
        }
    }
Exemplo n.º 2
0
    private void InitParameters()
    {
        PaymentId = Request.QueryString["PaymentId"];
        Ticket    = Request.QueryString["Ticket"];

        if (string.IsNullOrEmpty(PaymentId) || string.IsNullOrEmpty(Ticket))
        {
            throw new ArgumentException("MISSING_REQUIRED_PARAMETERS");
        }

        if (Model == null)
        {
            Model = new ViewPayment();
            Model.Initialize(Main, long.Parse(PaymentId), long.Parse(Ticket));
        }
    }
Exemplo n.º 3
0
    private void InitModel()
    {
        bool init = false;

        if (Model == null)
        {
            init = true;
        }
        else if (Model.PaymentId != PaymentId)
        {
            init = true;
        }

        if (init)
        {
            Model = new ViewPayment();
            Model.Initialize(Main, long.Parse(PaymentId), long.Parse(Ticket));
        }
    }
Exemplo n.º 4
0
        public ActionResult Payment()
        {
            if (Session["email"] != null)
            {
                var logedCustomer = Session["Customer"] as Customer;

                ViewPayment model = new ViewPayment()
                {
                    Address      = logedCustomer.Address,
                    Phone        = logedCustomer.Phone,
                    ShoppingList = Chart.ShoppingList,
                    Name         = logedCustomer.Name
                };

                return(View(model));
            }
            else
            {
                return(RedirectToAction("Login", "Customer"));
            }
        }