Esempio n. 1
0
 private void btn_AddP_Click(object sender, EventArgs e)
 {
     if (CurrentOrderID == "")
     {
         tb_Tips.Text = "错误!";
     }
     else
     {
         string GoodsName = comboBox_Goods.Text;
         int    GoodsNum  = Convert.ToInt32(tb_num.Text);
         try
         {
             service.AddItem(CurrentOrderID, GoodsName, GoodsNum);
             bs_OrderList.DataSource = service.GetAllOrder();
             bs_OrderItem.DataSource = service.GetItem(CurrentOrderID);
             bs_OrderList.ResetBindings(false);
             bs_OrderItem.ResetBindings(false);
         }
         catch (Exception) { }
     }
 }