Ejemplo n.º 1
0
        /// <summary>
        /// 订单中新增商品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            if (selectOrder == null)
            {
                MessageBox.Show("请选择一个订单");
                return;
            }
            AddPurchaseCommodities purchaseCommodityForm = new AddPurchaseCommodities();

            purchaseCommodityForm.PurchaseOrderID = selectOrder.ID;
            if (purchaseCommodityForm.ShowDialog() == DialogResult.OK)
            {
                BLLPurchaseOrders.PurchaseManagerServiceClient purchaseClient = WCFServiceBLL.GetPurchaseService();
                dataGridViewPurchaseList.DataSource = purchaseClient.GetPurchaseCommoditiesByID(selectOrder.ID);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 修改订单中产品
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripButton5_Click(object sender, EventArgs e)
 {
     //订单已经提交的情况下,不能修改产品
     if (dataGridViewPurchaseList.SelectedRows.Count > 0)
     {
         int cID = int.Parse(dataGridViewPurchaseList.SelectedRows[0].Cells["ColumnID"].Value.ToString());//31
         AddPurchaseCommodities updatePurchaseCommodity = new AddPurchaseCommodities(cID);
         //updatePurchaseCommodity.PurchaseOrderID = selectOrder.ID;//3
         if (updatePurchaseCommodity.ShowDialog() == DialogResult.OK)
         {
             BLLPurchaseOrders.PurchaseManagerServiceClient client = WCFServiceBLL.GetPurchaseService();
             dataGridViewPurchaseList.DataSource = client.GetPurchaseCommoditiesByID(selectOrder.ID);
         }
     }
     else
     {
         MessageBox.Show("请选择要修改的商品");
         return;
     }
 }