//Update Product private void btnUpdatePro_Click(object sender, EventArgs e) { if(dgvProductInfo.SelectedRows.Count>0) { int id = Convert.ToInt32(dgvProductInfo.SelectedRows[0].Cells[0].Value.ToString()); ProductInfoBLL bll = new ProductInfoBLL(); ProductInfo pro = bll.GetProductInfoById(id); if(pro!=null) { meaFcp.Obj = pro; InsertOrUpdate(4); } } else { MessageBox.Show("请选中Product"); } }