private void BtncustomerEdit_Click(object sender, EventArgs e) { CCC = new CustomerConnectComponent(); CCC.musteriDuzenleControl((int)datagridview1.CurrentRow.Cells["CustomerID"].Value, txtcustomerName, txtCustomerSurname, txtcustomerTelephone, txtcustomerOccupotion, cmbcustomerReference, txtcustomerAccount, rctxtcustomerAddress, rctxtcustomerDetails); CCC.musteriListe(datagridview1); CCC.cmboboxReferansDoldur(cmbcustomerReference); foreach (var item in this.groupBox3.Controls) { if (item is TextBox) { TextBox tx = (TextBox)item; tx.Clear(); } else if (item is NumericUpDown) { NumericUpDown num = (NumericUpDown)item; num.Value = 0; } else if (item is RichTextBox) { RichTextBox rx = (RichTextBox)item; rx.Clear(); } else if (item is MaskedTextBox) { MaskedTextBox ms = (MaskedTextBox)item; ms.Clear(); } } }
private void FindCustomer(object sender, EventArgs e) { if ((String.IsNullOrEmpty(txtisimSearch.Text) && String.IsNullOrEmpty(txtSoyisimSearch.Text))) { this.datagridview1 = CCC.musteriListe(datagridview1); } //isim Var soyisim Yok ise else if (!String.IsNullOrEmpty(txtisimSearch.Text) && String.IsNullOrEmpty(txtSoyisimSearch.Text)) { datagridview1 = CCC.isimMusteriListe(datagridview1, txtisimSearch); } //soyisim Var isim Yok ise else if (String.IsNullOrEmpty(txtisimSearch.Text) && !String.IsNullOrEmpty(txtSoyisimSearch.Text)) { datagridview1 = CCC.soyisimMusteriListe(datagridview1, txtSoyisimSearch); } //İkiside Dolu ise else if (!(String.IsNullOrEmpty(txtisimSearch.Text) && String.IsNullOrEmpty(txtSoyisimSearch.Text))) { datagridview1 = CCC.isimvesoyisimMusteriListe(datagridview1, txtisimSearch, txtSoyisimSearch); } }
private void BtncustomerDelete_Click(object sender, EventArgs e) { CCC.musteriSilControl((int)datagridview1.CurrentRow.Cells["CustomerID"].Value); CCC.musteriListe(datagridview1); }