protected void PopulateForm()
    {
        try
        {
            MarketPlaceDataLayer mdlDataLayer = DataLayerFactory.GetMarketPlace();
            XMLCoverter          conConverter = new XMLCoverter();

            m_dasAuction = mdlDataLayer.AucGetAuctionDetailForAuctionID(AuctionID, true);

            lblTitle.Text    = m_dasAuction.Tables[0].Rows[0]["adeName"].ToString();
            lblSubTitle.Text = m_dasAuction.Tables[0].Rows[0]["adeSubName"].ToString();

            btnPlaceBid1.Visible = Session["MemberId"] != null && Session["MemberId"].ToString() != string.Empty;
            if (m_dasAuction.Tables[0].Rows[0]["StatusCode"].ToString() != "OPEN")
            {
                btnPlaceBid1.Visible = false;
            }

            conConverter.AuctionTypeReached += conConverter_AuctionTypeReached;
            conConverter.AddControls(m_dasAuction.Tables[0].Rows[0]["adeXML"].ToString(), plaDetails, this.Page);
        }
        catch (Exception ex)
        {
            Response.Redirect("Default.aspx", false);
        }
    }
Пример #2
0
    void apbPlaceBid_FinishClick(object sender, EventArgsWithCancel e)
    {
        MarketPlaceDataLayer     mdlDataLayer = DataLayerFactory.GetMarketPlace();
        Controls_AuctionPlaceBid abbBid       = (Controls_AuctionPlaceBid)sender;

        if (abbBid.IsOneTimeBid)
        {
            try
            {
                mdlDataLayer.AucInsertNewBid(AuctionID, abbBid.Bid, abbBid.Voucher, Username);
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("Error:HB"))
                {
                    /* MPC 2010-07-29
                     * This line of code prevents the error message from being displayed
                     *
                     * Also, this error is being displayed when an employee bids, we need
                     * to look at the usp_AucInsertNewBid stored procedure when we have
                     * some time or when we re-write this.
                     */
                    //abbBid.ActivateBidTab();
                    abbBid.BidErrorText = "Your bid amount is less than or equal to an existing autobid. Please choose another amount.";
                    e.Cancel            = true;
                    return;
                }
                else
                {
                    abbBid.BidErrorText = "We encountered an error.  " + ex.Message;
                    e.Cancel            = true;
                    return;
                }
            }
        }
        else
        {
            try
            {
                mdlDataLayer.AucInsertAutoBid(AuctionID, abbBid.Bid, abbBid.Voucher, Username);
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("Error:AB"))
                {
                    /* MPC 2010-07-29
                     * This line of code prevents the error message from being displayed
                     */
                    //abbBid.ActivateBidTab();
                    abbBid.BidErrorText = "Your bid amount matches an existing bid. Please choose another amount.";
                    e.Cancel            = true;
                    return;
                }
            }
        }
        lblTitle.Text = "Bid Confirmation: " + lblTitle.Text;
    }
Пример #3
0
    protected void PopulateForm()
    {
        MarketPlaceDataLayer mdlDataLayer = DataLayerFactory.GetMarketPlace();
        XMLCoverter          conConverter = new XMLCoverter();

        m_dasAuction     = mdlDataLayer.AucGetAuctionDetailForAuctionID(AuctionID, false);
        lblTitle.Text    = m_dasAuction.Tables[0].Rows[0]["adeName"].ToString();
        lblSubTitle.Text = m_dasAuction.Tables[0].Rows[0]["adeSubName"].ToString();
        conConverter.AuctionTypeReached += conConverter_AuctionTypeReached;
        m_bolHasBidForm = false;
        conConverter.AddControls(m_dasAuction.Tables[0].Rows[0]["adeXML"].ToString(), plaDetails, this.Page, false);
    }
Пример #4
0
    void apbPlaceBid_AutoBidValidRequest(object sender, EventArgsWithCancel e)
    {
        MarketPlaceDataLayer     mdlDataLayer = DataLayerFactory.GetMarketPlace();
        Controls_AuctionPlaceBid abbBid       = (Controls_AuctionPlaceBid)sender;
        DataSet dasResult = mdlDataLayer.AucValidateAutoBid(AuctionID, abbBid.Bid);

        if (dasResult.Tables[0].Rows[0]["Mess"].ToString() != "")
        {
            abbBid.SetBidErrorMessage(dasResult.Tables[0].Rows[0]["Mess"].ToString());
            e.Cancel = true;
        }
    }
Пример #5
0
    void apbPlaceBid_SaveClick(object sender, EventArgs e)
    {
        Controls_AuctionPlaceBid abbBid = (Controls_AuctionPlaceBid)sender;

        string ccNum  = abbBid.CCNum.Contains("*") ? abbBid.GetClearCCNumber() : abbBid.CCNum;
        string ccCode = abbBid.CCSecNum;

        if (!Luhn.ValidateCCNum(ccNum, abbBid.CCType))
        {
            /* MPC 2010-07-29
             * make sure we display the actual cc data that we have in the database
             */
            SetBillingInformation(abbBid);
            abbBid.SetBillingErrorMessage("<br />The credit card number you entered appears to be invalid. Please verify your credit card number and try again.");
            abbBid.ActivateBillingTab("Invalid credit card number.");

            return;
        }

        MarketPlaceDataLayer mdlDataLayer = DataLayerFactory.GetMarketPlace();


        mdlDataLayer.AucUpdateBillingInfo(
            Username,
            abbBid.CCName,
            abbBid.PhoneNumber,
            "",
            abbBid.Email,
            abbBid.CCType,
            ccNum,
            abbBid.CCMonth,
            abbBid.CCYear,
            ccCode,
            abbBid.BillingAddress1,
            abbBid.BillingAddress2,
            abbBid.BillingAddress3,
            abbBid.BillingCity,
            abbBid.BillingRegion,
            abbBid.BillingCountry,
            abbBid.BillingPostalCode);

        abbBid.SetBidErrorMessage("Your billing information has been saved.  Please ensure that your bid is correct.  Then click next.");

        abbBid.ActivateBidTab();
    }
Пример #6
0
    protected void SetDropDownTable()
    {
        MarketPlaceDataLayer mdlDataLayer = DataLayerFactory.GetMarketPlace();

        m_dasDropDowns = mdlDataLayer.AucGetBidPageDropDowns();
    }