Ejemplo n.º 1
0
 private void btnDodaj_Click(object sender, EventArgs e)
 {
     frmPolaznik frm = new frmPolaznik();
     //frm.Show();
     ((MDI)this.Parent.Parent).OpenChildFOrm(frm);
 }
Ejemplo n.º 2
0
        private void dgvPolaznici_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
                e.RowIndex >= 0)
            {
                //TODO - Button Clicked - Execute Code Here
                int polaznikId = 0;
                if (Int32.TryParse(senderGrid.Rows[e.RowIndex].Cells["PolaznikID"].Value.ToString(), out polaznikId))
                {
                    //MessageBox.Show("PolaznikID: " + polaznikId);
                    frmPolaznik frm = new frmPolaznik(polaznikId);
                    frm.Show();
                }
            }
        }