private void addButton_Click(object sender, EventArgs e) { string name = nameTextBox.Text; string address = addressTextBox.Text; string contact = contactTextBox.Text; if (name == "" || address == "" || contact == "") { MessageBox.Show("Please,,Field must not be empty.."); return; } customers.Name = nameTextBox.Text; customers.Address = addressTextBox.Text; customers.Contact = contactTextBox.Text; if (_customerManager.Add(customers)) { MessageBox.Show("Saved"); showDataGridView.DataSource = _customerManager.Display(); return; } else { MessageBox.Show("Not Saved"); return; } }