private void zaposleniciDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = this.zaposleniciDataGridView1.Rows[e.RowIndex]; this.imeTextBox2.Text = row.Cells[1].Value.ToString(); this.prezimeTextBox2.Text = row.Cells[2].Value.ToString(); this.adresaTextBox.Text = row.Cells[3].Value.ToString(); this.broj_mobitelaTextBox.Text = row.Cells[4].Value.ToString(); radnik = new Zaposlenik(Int32.Parse(row.Cells[0].Value.ToString()), row.Cells[1].Value.ToString(), row.Cells[2].Value.ToString(), row.Cells[3].Value.ToString(), row.Cells[4].Value.ToString()); } }
private void zaposleniciDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = this.zaposleniciDataGridView.Rows[e.RowIndex]; this.imeTextBox.Text = row.Cells[1].Value.ToString(); this.prezimeTextBox.Text = row.Cells[2].Value.ToString(); radnik = new Zaposlenik(Int32.Parse(row.Cells[0].Value.ToString()), row.Cells[1].Value.ToString(), row.Cells[2].Value.ToString()); Console.WriteLine(radnik.ToString()); } }
//H:\Documents\Faks\9. semestar\Računarski praktikum 3\Projekt\Servis\RP3_projekt //C:\Users\marko\Documents\GitHub\Servis\RP3_projekt //private SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=H:\Documents\Faks\9. semestar\Računarski praktikum 3\Projekt\Servis\RP3_projekt\BazaPodataka.mdf;Integrated Security=True"); #region Load public Nalozi(Zaposlenik zap) { InitializeComponent(); radnik = zap; }
//H:\Documents\Faks\9. semestar\Računarski praktikum 3\Projekt\Servis\RP3_projekt //C:\Users\marko\Documents\GitHub\AutoServis\RP3_projekt\RP3_projekt //private SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=H:\Documents\Faks\9. semestar\Računarski praktikum 3\Projekt\Servis\RP3_projekt\BazaPodataka.mdf;Integrated Security=True"); #region Load public NalogRadov(Vozilo v, Zaposlenik z) { radnik = z; voz = v; InitializeComponent(); }