コード例 #1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtOrderId.Text))
            {
                strErr += "OrderId不是数字!\\n";
            }
            if (!PageValidate.IsNumber(txtProductId.Text))
            {
                strErr += "ProductId不是数字!\\n";
            }
            if (!PageValidate.IsDecimal(txtProductFee.Text))
            {
                strErr += "ProductFee不是数字!\\n";
            }
            if (!PageValidate.IsNumber(txtQuantity.Text))
            {
                strErr += "Quantity不是数字!\\n";
            }
            if (!PageValidate.IsDecimal(txtDerateFee.Text))
            {
                strErr += "DerateFee不是数字!\\n";
            }
            if (!PageValidate.IsDecimal(txtMerchantPrice.Text))
            {
                strErr += "MerchantPrice不是数字!\\n";
            }
            if (!PageValidate.IsDecimal(txtTotalFee.Text))
            {
                strErr += "TotalFee不是数字!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int     OrderId       = int.Parse(this.txtOrderId.Text);
            int     ProductId     = int.Parse(this.txtProductId.Text);
            decimal ProductFee    = decimal.Parse(this.txtProductFee.Text);
            int     Quantity      = int.Parse(this.txtQuantity.Text);
            decimal DerateFee     = decimal.Parse(this.txtDerateFee.Text);
            decimal MerchantPrice = decimal.Parse(this.txtMerchantPrice.Text);
            decimal TotalFee      = decimal.Parse(this.txtTotalFee.Text);


            NoName.NetShop.Model.OrderItemModel model = new NoName.NetShop.Model.OrderItemModel();
            model.OrderId       = OrderId;
            model.ProductId     = ProductId;
            model.ProductFee    = ProductFee;
            model.Quantity      = Quantity;
            model.DerateFee     = DerateFee;
            model.MerchantPrice = MerchantPrice;
            model.TotalFee      = TotalFee;

            NoName.NetShop.BLL.OrderItemModelBll bll = new NoName.NetShop.BLL.OrderItemModelBll();
            bll.Update(model);
        }
コード例 #2
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsNumber(txtOrderId.Text))
            {
            strErr+="OrderId�������֣�\\n";
            }
            if(!PageValidate.IsNumber(txtProductId.Text))
            {
            strErr+="ProductId�������֣�\\n";
            }
            if(!PageValidate.IsDecimal(txtProductFee.Text))
            {
            strErr+="ProductFee�������֣�\\n";
            }
            if(!PageValidate.IsNumber(txtQuantity.Text))
            {
            strErr+="Quantity�������֣�\\n";
            }
            if(!PageValidate.IsDecimal(txtDerateFee.Text))
            {
            strErr+="DerateFee�������֣�\\n";
            }
            if(!PageValidate.IsDecimal(txtMerchantPrice.Text))
            {
            strErr+="MerchantPrice�������֣�\\n";
            }
            if(!PageValidate.IsDecimal(txtTotalFee.Text))
            {
            strErr+="TotalFee�������֣�\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            int OrderId=int.Parse(this.txtOrderId.Text);
            int ProductId=int.Parse(this.txtProductId.Text);
            decimal ProductFee=decimal.Parse(this.txtProductFee.Text);
            int Quantity=int.Parse(this.txtQuantity.Text);
            decimal DerateFee=decimal.Parse(this.txtDerateFee.Text);
            decimal MerchantPrice=decimal.Parse(this.txtMerchantPrice.Text);
            decimal TotalFee=decimal.Parse(this.txtTotalFee.Text);

            NoName.NetShop.Model.OrderItemModel model=new NoName.NetShop.Model.OrderItemModel();
            model.OrderId=OrderId;
            model.ProductId=ProductId;
            model.ProductFee=ProductFee;
            model.Quantity=Quantity;
            model.DerateFee=DerateFee;
            model.MerchantPrice=MerchantPrice;
            model.TotalFee=TotalFee;

            NoName.NetShop.BLL.OrderItemModelBll bll=new NoName.NetShop.BLL.OrderItemModelBll();
            bll.Update(model);
        }
コード例 #3
0
 private void ShowInfo(int OrderItem)
 {
     NoName.NetShop.BLL.OrderItemModelBll bll=new NoName.NetShop.BLL.OrderItemModelBll();
     NoName.NetShop.Model.OrderItemModel model=bll.GetModel(OrderItem);
     this.lblOrderId.Text=model.OrderId.ToString();
     this.lblProductId.Text=model.ProductId.ToString();
     this.lblProductFee.Text=model.ProductFee.ToString();
     this.lblQuantity.Text=model.Quantity.ToString();
     this.lblDerateFee.Text=model.DerateFee.ToString();
     this.lblMerchantPrice.Text=model.MerchantPrice.ToString();
     this.lblTotalFee.Text=model.TotalFee.ToString();
 }
コード例 #4
0
 private void ShowInfo(int OrderItem)
 {
     NoName.NetShop.BLL.OrderItemModelBll bll   = new NoName.NetShop.BLL.OrderItemModelBll();
     NoName.NetShop.Model.OrderItemModel  model = bll.GetModel(OrderItem);
     this.lblOrderId.Text       = model.OrderId.ToString();
     this.lblProductId.Text     = model.ProductId.ToString();
     this.lblProductFee.Text    = model.ProductFee.ToString();
     this.lblQuantity.Text      = model.Quantity.ToString();
     this.lblDerateFee.Text     = model.DerateFee.ToString();
     this.lblMerchantPrice.Text = model.MerchantPrice.ToString();
     this.lblTotalFee.Text      = model.TotalFee.ToString();
 }