protected void FinishedClicked() { EventArgsWithCancel eacEventArgs; eacEventArgs = new EventArgsWithCancel(); if (bfrBidForm.IsOneTimeBid) { this.OnOneTimeBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) { return; } } else { this.OnAutoBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) { return; } } OnFinishClick(eacEventArgs); if (eacEventArgs.Cancel) { return; } this.ActivateSummarySection(); }
protected void OnOneTimeBidValidRequest(EventArgsWithCancel e) { if (OneTimeBidValidRequest != null) { OneTimeBidValidRequest(this, e); } }
protected void OnAutoBidValidRequest(EventArgsWithCancel e) { if (AutoBidValidRequest != null) { AutoBidValidRequest(this, e); } }
protected void OnBidNextClick(EventArgsWithCancel e) { if (BidNextClick != null) { BidNextClick(this, e); } }
protected void OnFinishClick( EventArgsWithCancel e) { if (FinishClick != null) { FinishClick(this, e); } }
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; }
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; } }
protected void btnBidNext_Click(object sender, EventArgs e) { EventArgsWithCancel eacEventArgs; if (!bfrBidForm.AgreeToTerms) { bfrBidForm.SetErrorMessage("You must agree to the Terms and Conditions to bid."); return; } eacEventArgs = new EventArgsWithCancel(); if (bfrBidForm.IsOneTimeBid) { this.OnOneTimeBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) { return; } } else { this.OnAutoBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) { return; } } OnBidNextClick(eacEventArgs); if (eacEventArgs.Cancel) { return; } /******************************************************************* * if no CC #, show error and activate modify billing info tab *******************************************************************/ ActivateConfirmSection(); }
void apbPlaceBid_BidNextClick(object sender, EventArgsWithCancel e) { Controls_AuctionPlaceBid abbBid = (Controls_AuctionPlaceBid)sender; if (m_dasBillingInfo == null) { throw new Exception("Billing info is null."); } if (m_dasBillingInfo.Tables[0].Rows.Count <= 0 || m_dasBillingInfo.Tables[1] == null || m_dasBillingInfo.Tables[1].Rows.Count <= 0 || string.IsNullOrEmpty(m_dasBillingInfo.Tables[1].Rows[0]["CardNum"].ToString())) { abbBid.ActivateBillingTab("Now that we have your bid please enter your billing information."); e.Cancel = true; } }
protected void FinishedClicked() { EventArgsWithCancel eacEventArgs; eacEventArgs = new EventArgsWithCancel(); if (bfrBidForm.IsOneTimeBid) { this.OnOneTimeBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) return; } else { this.OnAutoBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) return; } OnFinishClick(eacEventArgs); if (eacEventArgs.Cancel) return; this.ActivateSummarySection(); }
protected void btnBidNext_Click(object sender, EventArgs e) { EventArgsWithCancel eacEventArgs; if (!bfrBidForm.AgreeToTerms) { bfrBidForm.SetErrorMessage("You must agree to the Terms and Conditions to bid."); return; } eacEventArgs = new EventArgsWithCancel(); if (bfrBidForm.IsOneTimeBid) { this.OnOneTimeBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) return; } else { this.OnAutoBidValidRequest(eacEventArgs); if (eacEventArgs.Cancel) return; } OnBidNextClick(eacEventArgs); if (eacEventArgs.Cancel) return; /******************************************************************* * if no CC #, show error and activate modify billing info tab *******************************************************************/ ActivateConfirmSection(); }
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; }