Exemple #1
0
        private void LoadAddProByOrder(int p)
        {
            R_Order_ProductBLL ropbll = new R_Order_ProductBLL();

            dgvROrderProduct.AutoGenerateColumns = false;
            dgvROrderProduct.DataSource          = ropbll.GetProductByOrderId(p);
            dgvROrderProduct.ClearSelection();
        }
        //显示点的菜
        private void LoadProductByOrderId(int p)
        {
            dgvROrderProduct.AutoGenerateColumns = false;
            List <R_Order_Product> list = ropbll.GetProductByOrderId(p);
            double sum = 0;

            foreach (R_Order_Product pro in list)
            {
                sum += pro.ProMoney;
            }
            labCount.Text               = list.Count.ToString();
            labSumMoney.Text            = sum.ToString();
            dgvROrderProduct.DataSource = list;
            dgvROrderProduct.ClearSelection();//清除默认选中项
        }