public DataTable GetAllDataTable(string Tc) { CksManager cksManager = new CksManager(); var ciftciKayit = cksManager.GetByTc(Tc); return(_dal.GetAllDataTable(ciftciKayit.Id)); }
public List <SertifikaliTohum> Get(string Tc) { CksManager cksManager = new CksManager(); var ciftciKayit = cksManager.GetByTc(Tc); return(_dal.GetAll().Where(I => I.CksId == ciftciKayit.Id).ToList()); }
private void btnAdd_Click(object sender, EventArgs e) { Utilities.ErrorHandle._try(() => { if (Islem == Operation.EklemeIslemi) { var ciftci = FormToEntity(); int result = _ciftcilerManager.Add(ciftci); if (result > 0) { dgwList.DataSource = _ciftcilerManager.GetAll().OrderByDescending(I => I.Id).ToList(); Utilities.Mesaj.MessageBoxInformation("Kayıt Başarılı"); if (_formNerdenGeldi == FormNerdenGeldi.CksKayitDefteri) { Form f = Application.OpenForms["CksForm"]; foreach (var item in f.Controls) { if (item is DataGridView) { DataGridView dgw = (DataGridView)item; CksManager cksManager = new CksManager(); dgw.DataSource = cksManager.GetAll(); } } this.Close(); } } } else if (Islem == Operation.GuncellemeIslemi) { //guncelleme işlemi yap. var ciftci = FormToEntity(); ciftci.Id = (int)txtTc.Tag; int result = _ciftcilerManager.Update(ciftci); //formu temizle FormuTemizle(); //Listeyi güncelle dgwList.DataSource = _ciftcilerManager.GetAll().OrderByDescending(I => I.Id).ToList(); btnAdd.Text = "Yeni Kayıt Ekle"; Islem = Operation.EklemeIslemi; } }); }
public CksForm() { InitializeComponent(); _cksManager = new CksManager(); _ciftcilerManager = new CiftcilerManager(); }