Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!int.TryParse(this.Page.Request.QueryString["preSaleId"], out this.preSaleId))
     {
         base.GotoResourceNotFound();
     }
     else if (!this.Page.IsPostBack)
     {
         ProductPreSaleInfo productPreSaleInfo = ProductPreSaleHelper.GetProductPreSaleInfo(this.preSaleId);
         if (productPreSaleInfo == null || productPreSaleInfo.ProductId <= 0)
         {
             base.GotoResourceNotFound();
         }
         else
         {
             Literal literal = this.litProductSaleAmount;
             int     num     = ProductPreSaleHelper.GetPreSaleProductAmount(this.preSaleId);
             literal.Text = num.ToString();
             Literal literal2 = this.litPayAllProductAmount;
             num           = ProductPreSaleHelper.GetPreSalePayFinalPaymentAmount(this.preSaleId);
             literal2.Text = num.ToString();
             this.litPayDepositTotal.Text   = ProductPreSaleHelper.GetPayDepositTotal(this.preSaleId).F2ToString("f2");
             this.litFinalPaymentTotal.Text = ProductPreSaleHelper.GetPayFinalPaymentTotal(this.preSaleId).F2ToString("f2");
             this.litAllTotal.Text          = (ProductPreSaleHelper.GetPayFinalPaymentTotal(this.preSaleId) + ProductPreSaleHelper.GetPayDepositTotal(this.preSaleId)).F2ToString("f2");
         }
     }
 }