private void button1_Click(object sender, EventArgs e) // add button { int c_no = int.Parse(textBox1.Text); String n = textBox2.Text; String a = textBox3.Text; String p = textBox4.Text; String em = textBox5.Text; String w = textBox6.Text; if (c_no == null || String.IsNullOrEmpty(n) || String.IsNullOrEmpty(p)) { MessageBox.Show("empty name, phone or customerNo"); return; } currCustomer = Customers.Add(c_no, n, a, p, em, w); LoadAll(); }