private void btnFindCustoEditItem_Click(object sender, EventArgs e) { try { cusDupdate cusData = new cusDupdate(); cusData.no = dgvFindCusto.CurrentRow.Cells["Coustomer_No"].Value.ToString(); cusData.Fname = dgvFindCusto.CurrentRow.Cells["First_Name"].Value.ToString(); cusData.lname = dgvFindCusto.CurrentRow.Cells["Last_Name"].Value.ToString(); cusData.bisname = dgvFindCusto.CurrentRow.Cells["Bussiness_Name"].Value.ToString(); cusData.add1 = dgvFindCusto.CurrentRow.Cells["Address_Line1"].Value.ToString(); cusData.add2 = dgvFindCusto.CurrentRow.Cells["Address_Line2"].Value.ToString(); cusData.city = dgvFindCusto.CurrentRow.Cells["City"].Value.ToString(); cusData.zip = dgvFindCusto.CurrentRow.Cells["Zip_Postal_Code"].Value.ToString(); cusData.phone = dgvFindCusto.CurrentRow.Cells["Phone"].Value.ToString(); cusData.mobil = dgvFindCusto.CurrentRow.Cells["Mobile"].Value.ToString(); cusData.fax = dgvFindCusto.CurrentRow.Cells["Fax"].Value.ToString(); cusData.discount = dgvFindCusto.CurrentRow.Cells["Discount"].Value.ToString(); cusData.email = dgvFindCusto.CurrentRow.Cells["Email"].Value.ToString(); cusData.notes = dgvFindCusto.CurrentRow.Cells["Notes"].Value.ToString(); Edit_Customer ccc = new Edit_Customer(cusData); ccc.ShowDialog(this); } catch (Exception) { } }
public Edit_Customer(cusDupdate mdc) { InitializeComponent(); cusData = mdc; }