private void Osebe_Load(object sender, EventArgs e) { try { // TODO: This line of code loads data into the 'posojilaDataSet.Oseba' table. You can move, or remove it, as needed. this.osebaTableAdapter.Fill(this.posojilaDataSet.Oseba); } catch { DBHandle.DBError(); } var slovarKrajev = new Dictionary <Object, String>(); slovarKrajev.Add(DBNull.Value, "ni določen"); foreach (var row in DBHandle.db.Posta.OrderBy(p => p.PostnaStevilka)) { slovarKrajev.Add(row.PostnaStevilka.ToString(), row.PostnaStevilka + " " + row.Kraj); } var val = "Value"; var key = "Key"; dataGridViewTextBoxColumn5.DataSource = new BindingSource(slovarKrajev, null); dataGridViewTextBoxColumn5.DisplayMember = val; dataGridViewTextBoxColumn5.ValueMember = key; }
private void UserManagment_Load(object sender, EventArgs e) { try { // TODO: This line of code loads data into the 'bazaDataSet.Uporabniki' table. You can move, or remove it, as needed. this.uporabnikiTableAdapter.Fill(this.bazaDataSet.Uporabniki); } catch { DBHandle.DBError(); } }
private void Valute_Load(object sender, EventArgs e) { try { // TODO: This line of code loads data into the 'bazaDataSet.Posta' table. You can move, or remove it, as needed. this.postaTableAdapter.Fill(this.bazaDataSet.Posta); } catch { DBHandle.DBError(); } }
public void FillAll() { try { // TODO: This line of code loads data into the 'db.Uporabniki' table. You can move, or remove it, as needed. this.uporabnikiTableAdapter.Fill(bazaDataSet.Uporabniki); } catch { DBHandle.DBError(); } }
private void fillByImeToolStripButton_Click(object sender, EventArgs e) { var ime = imeToolStripTextBox.Text.Trim() == "" ? "" : imeToolStripTextBox.Text + "%"; var priimek = priimekToolStripTextBox.Text.Trim() == "" ? "" : priimekToolStripTextBox.Text + "%"; try { this.osebaTableAdapter.FillByIme(this.posojilaDataSet.Oseba, ime, priimek); } catch { DBHandle.DBError(); } }
public void FillAll() { try { // TODO: This line of code loads data into the 'bazaDataSet.Oseba' table. You can move, or remove it, as needed. this.osebaTableAdapter.Fill(this.bazaDataSet.Oseba); // TODO: This line of code loads data into the 'bazaDataSet.Posojila' table. You can move, or remove it, as needed. this.posojilaTableAdapter.Fill(this.bazaDataSet.Posojila); // TODO: This line of code loads data into the 'bazaDataSet.Valute' table. You can move, or remove it, as needed. this.valuteTableAdapter.Fill(this.bazaDataSet.Valute); } catch { DBHandle.DBError(); } }