private void btnAdd_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtName.Text)) { MessageBox.Show("Müşteri ismi boş olamaz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } try { DatabaseOperations.AddCustomer(txtName.Text, txtCompany.Text, txtTel.Text); MainForm.BtnRefreshPerformClick(); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); } }