Esempio n. 1
0
        public DataTable GetAllDataTable(string Tc)
        {
            CksManager cksManager  = new CksManager();
            var        ciftciKayit = cksManager.GetByTc(Tc);

            return(_dal.GetAllDataTable(ciftciKayit.Id));
        }
Esempio n. 2
0
        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());
        }
Esempio n. 3
0
 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;
         }
     });
 }
Esempio n. 4
0
 public CksForm()
 {
     InitializeComponent();
     _cksManager       = new CksManager();
     _ciftcilerManager = new CiftcilerManager();
 }