private void btnUploadNew_Click(object sender, EventArgs e) { FormProduct product = new FormProduct(); product.Show(); this.Hide(); }
private void btnUploadExistedProduct_Click(object sender, EventArgs e) { if (this.dataGridView.SelectedRows.Count == 0 || this.dataGridView.SelectedRows.Count > 1) { MessageBox.Show("请选择一个已有的产品!"); return; } Product p = GetSelectedProduct(); FormProduct formProduct = new FormProduct(); formProduct.ExistedProduct = p; formProduct.Show(); this.Hide(); }