private void btnSubmit_Click(object sender, EventArgs e) { if (list.Count == 0) { lbWarning.Text = "Empty Part"; } else { XuLy.addPurchaseOrder(1, int.Parse(cbbSuppliers.SelectedValue.ToString()), int.Parse(cbbWarehouse.SelectedValue.ToString()), dtpDate.Value, list); form f = new form(); f.Show(); Program.list = XuLy.getInventoryManagementView(); Program.f.viewInventoryTable(Program.list); lbWarning.Text = ""; this.Close(); } }