private void SuppEdit_Click(object sender, RoutedEventArgs e) { dataAccess data = new dataAccess(); suppliers supp = new suppliers(); if (SupplierID.Text == "" || CompanyName.Text == "" || Address.Text == "" || City.Text == "" || Region.Text == "" || Postal.Text == "" || Country.Text == "" || Email.Text == "" || Phone.Text == "") { MessageBox.Show("All Fields are required"); } else { supp.Address = Address.Text; supp.City = City.Text; supp.CompanyName = CompanyName.Text; supp.Country = Country.Text; supp.Email = Email.Text; supp.Phone = long.Parse(Phone.Text); supp.PostalCode = int.Parse(Postal.Text); supp.Region = Region.Text; supp.SupplierID = int.Parse(SupplierID.Text); data.editSuppliers(supp); MessageBox.Show("Suppliers" + supp.CompanyName + " Modified Successfully"); } }