コード例 #1
0
    /// <summary>
    /// Confirms the transaction in the database and displays the transaction info
    /// </summary>
    /// Creator: Olivia Johnson 11-28-12
    private void golfConfirmation()
    {
        BusinessTier bt = new BusinessTier();
        DataSet ds = new DataSet();
        Decimal cost = 0;
        Decimal numOfGolfers = 0;

        try
        {
            ds = bt.confirmGolfPayment(customerInfo);

            lblticketType1.Text = "Golf Event Ticket x" + ds.Tables[1].Rows[0][5].ToString();
            lblprice1.Text = cost.ToString("C");
            lbltotalCost.Text = (cost * numOfGolfers).ToString("C");

            cost = Convert.ToDecimal(ds.Tables[1].Rows[0][7].ToString());
            numOfGolfers = Convert.ToDecimal(ds.Tables[1].Rows[0][5].ToString());

            sendConfirmationEmail("Golf Event", ds.Tables[1].Rows[0][0].ToString(), ds.Tables[1].Rows[0][3].ToString());

        }
        catch (Exception ex)
        {
            ErrorLog.logError(ex);
            Response.Redirect("Oops.aspx");
        }
    }