Esempio n. 1
0
 private void overrideQuote()
 {
     //
     try {
         if (this.mQuote != null)
         {
             //Validate total charge does not go below the total charge minimum
             decimal totalCharge = decimal.Parse(this.txtTotal.Text);
             if (totalCharge >= this.mQuote.TotalChargeMin)
             {
                 //Update the quote
                 this.mQuote.LTLQuote.TotalCharge = totalCharge;
                 LTLQuote2 quote = FreightGateway.CreateQuoteForSalesRep(this.mQuote.LTLQuote);
                 this.txtRate.Text = quote.PalletRate.ToString();
                 this.txtFSC.Text  = quote.FuelSurcharge.ToString();
             }
             else
             {
                 //Restore the quote
                 this.txtTotal.Text = this.mQuote.LTLQuote.TotalCharge.ToString();
                 this.txtTotal.Focus();
                 MessageBox.Show("The total charge cannot be less than " + this.mQuote.TotalChargeMin.ToString(), App.Product, MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
     }
     catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
 }