void LoadAllSube() { try { IList <Sube> listSube = managerSube.GetAll(); dataGridView1.DataSource = listSube; } catch (Exception exc) { MessageBox.Show(exc.Message); LogWrite.Write(exc); } }
void LoadAsynData() { try { //Stopwatch stopwatch =new Stopwatch(); //stopwatch.Start(); IList <Sube> listSube = mngSube.GetAll(); mngSube.CloeseSession(); //foreach (Sube sube in listSube) // cmbSube.Items.Add(sube.Id); //ChangePanels(); //stopwatch.Stop(); //txtKulAdi.Text = stopwatch.Elapsed.Seconds.ToString(); } catch (Exception exc) { MessageBox.Show(exc.Message); LogWrite.Write(exc); } }
void LoadSube() { try { IList <Sube> liste = mngSube.GetAll(); bool first = true; foreach (Sube sube in liste) { cmbSubeKodu.Items.Add(sube); if (first) { cmbSubeKodu.Text = sube.Id.ToString(); txtSubeIsmi.Text = sube.SubeIsmi; first = false; } } } catch (Exception exc) { MessageBox.Show(exc.Message); LogWrite.Write(exc); } }