Exemple #1
0
        protected void BindData()
        {
            this.Label3.Text = "单号:" + EnterStock_ID;
            //DataSet BuyOrder_Detail = new BLL.BuyOrder_Detail().GetProDetail(EnterStock_ID);
            Model.EnterStock ml_es = bl_es.GetModel(EnterStock_ID);
            this.DropDownList1.SelectedValue = ml_es.StoreHouse_ID.ToString();
            DataSet ds_es = bl_esd.GetEnterStock(EnterStock_ID);

            this.GridView1.DataSource = ds_es;
            this.GridView1.DataBind();
            decimal AllTot = 0;

            foreach (GridViewRow row in GridView1.Rows)
            {
                decimal price  = Convert.ToDecimal(row.Cells[4].Text);
                decimal qty    = Convert.ToDecimal(row.Cells[5].Text);
                decimal RowTot = price * qty;
                row.Cells[7].Text = RowTot.ToString();
                AllTot           += RowTot;
            }
            this.Label1.Text = AllTot.ToString();
            this.Label2.Text = Maticsoft.Common.Rmb.CmycurD(AllTot);
            string OldId    = "";
            string OldPrice = "";
            string OldQty   = "";

            for (int i = 0; i < ds_es.Tables[0].Rows.Count; i++)
            {
                OldId    += ds_es.Tables[0].Rows[i]["Product_ID"] + "|";
                OldPrice += ds_es.Tables[0].Rows[i]["Price"] + "|";
                OldQty   += ds_es.Tables[0].Rows[i]["Quantity"] + "|";
            }
            this.oldId.Value    = OldId.ToString();
            this.oldPrice.Value = OldPrice.ToString();
            this.oldQty.Value   = OldQty.ToString();
            this.newId.Value    = OldId.ToString();
            this.newPrice.Value = OldPrice.ToString();
            this.newQty.Value   = OldQty.ToString();
        }
Exemple #2
0
        protected void BindData()
        {
            this.Label3.Text = "单号:" + EnterStock_ID;
            Model.EnterStock ml_es = bl_es.GetModel(EnterStock_ID);
            this.Label4.Text = new BLL.StoreHouse().GetModel(ml_es.StoreHouse_ID).Address;
            DataSet ds_es = bl_esd.GetEnterStock(EnterStock_ID);

            this.GridView1.DataSource = ds_es;
            this.GridView1.DataBind();
            decimal AllTot = 0;

            foreach (GridViewRow row in GridView1.Rows)
            {
                decimal price  = Convert.ToDecimal(row.Cells[4].Text);
                decimal qty    = Convert.ToDecimal(row.Cells[5].Text);
                decimal RowTot = price * qty;
                row.Cells[7].Text = RowTot.ToString();
                AllTot           += RowTot;
            }
            this.Label1.Text = AllTot.ToString();
            this.Label2.Text = Maticsoft.Common.Rmb.CmycurD(AllTot);
        }