private void btnBuroKaydet_Click(object sender, EventArgs e) { yeniBuro.SicilNo = txtSicil.Text; yeniBuro.TcKimlikNo = txtTC.Text; yeniBuro.VergiNumarsi = txtTC.Text; yeniBuro.AdSoyad = txtAd.Text; yeniBuro.KomisyonIl = txtIl.Text; yeniBuro.KomisyonIlce = txtIlce.Text; yeniBuro.EPosta = txtEposta.Text; yeniBuro.Adres = txtEposta.Text; //SABİT yeniTel = new TelefonBilgileri() { SabitCepFax = TelefonTipi.Sabit, BuroID = yeniBuro.ID, Numara = txtSabit.Text, }; yeniBuro.TelefonBilgileri.Add(yeniTel); //CEP yeniTel = new TelefonBilgileri() { SabitCepFax = TelefonTipi.Cep, BuroID = yeniBuro.ID, Numara = txtCep.Text, }; yeniBuro.TelefonBilgileri.Add(yeniTel); //FAX yeniTel = new TelefonBilgileri() { SabitCepFax = TelefonTipi.Fax, BuroID = yeniBuro.ID, Numara = txtFax.Text, }; yeniBuro.TelefonBilgileri.Add(yeniTel); if (((HesapBilgileri)gridViewBanka.GetRow(0)) != null) { for (int i = 0; i < gridViewBanka.RowCount; i++) { yeniHesap = ((HesapBilgileri)gridViewBanka.GetRow(i)); yeniBuro.HesapBilgileri.Add(yeniHesap); } } if (buroDB.Insert(yeniBuro) > 0) { ArabulucuHelper.KayitBasariliFormGetir(); this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show("Bir Hata Oluştu. Lütfen Bilgileri Kontrol Edip Tekrar Deneyiniz."); } }
private void btnHeyetKaydet_Click(object sender, EventArgs e) { string txt = gridViewHesapSec.GetFocusedRowCellValue("ID").ToString(); secilenHesap = hesapBilgileri.Find(x => x.ID == new Guid(txt)); this.DialogResult = DialogResult.OK; }
public HesapEkleForm() { InitializeComponent(); yeniHesap = new HesapBilgileri(); }