Exemplo n.º 1
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 4)
     {
         Model.PlanIProgram planIProgram = new Model.PlanIProgram
         {
             Id    = Int32.Parse(dataGridView1.Rows[e.RowIndex].Cells["Id"].Value.ToString()),
             Naziv = dataGridView1.Rows[e.RowIndex].Cells["Naziv"].Value.ToString()
         };
         frmPlanDetails frmPlanDetails = new frmPlanDetails(planIProgram);
         frmPlanDetails.Show();
     }
     else if (e.ColumnIndex == 5)
     {
         int             id = Int32.Parse(dataGridView1.Rows[e.RowIndex].Cells["Id"].Value.ToString());
         frmPlanIProgram frmPlanIProgram = new frmPlanIProgram(id);
         frmPlanIProgram.Show();
         this.Close();
     }
 }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmPlanIProgram frmPlanIProgram = new frmPlanIProgram(null);

            frmPlanIProgram.Show();
        }