private void cB_Kurs_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cB_Kurs.SelectedIndex != 0)
            {
                int TrainingTypeID = (int)cB_Kurs.SelectedValue;

                DA_Training.getKurseviViewbyKurs(dSPretragaKandidata.view_Kursevi, TrainingTypeID);
                dGV_Kursevi.AutoGenerateColumns = false;
                dGV_Kursevi.DataSource          = dSPretragaKandidata.view_Kursevi;

                DA_Training.getTrainingSubType(dSPretragaKandidata.TrainingSubType, TrainingTypeID);
                cB_Modul.Enabled = true;

                cB_Modul.SelectedIndex = 0;
            }
            else
            {
                dGV_Kursevi.DataSource = null;
                cB_Modul.Enabled       = false;
                DA_Training.getTrainingSubType(dSPretragaKandidata.TrainingSubType, 0);
                cB_Modul.DataSource = dSPretragaKandidata.TrainingSubType;
            }

            dGV_Grupe.DataSource     = null;
            dGV_Kandidati.DataSource = null;
        }
        private void frm_PretragaKandidata_Load(object sender, EventArgs e)
        {
            DA_Training.getTrainingType(dSPretragaKandidata.TrainingType);
            DA_Training.getTrainingSubType(dSPretragaKandidata.TrainingSubType, 0);
            DA_Training.getKurseviViewbyKurs(dSPretragaKandidata.view_Kursevi, 0);

            dv_Original_Kursevi.Table = dSPretragaKandidata.view_Kursevi.DefaultView.ToTable();

            DS_PretragaKandidata.TrainingTypeRow TT_Row = dSPretragaKandidata.TrainingType.NewTrainingTypeRow();
            TT_Row.TrainingTypeID = 0;
            TT_Row.Name           = "Naziv kursa";
            dSPretragaKandidata.TrainingType.Rows.InsertAt(TT_Row, 0);

            cB_Kurs.DisplayMember = "Name";
            cB_Kurs.ValueMember   = "TrainingTypeID";
            cB_Kurs.DataSource    = dSPretragaKandidata.TrainingType;

            cB_Modul.DisplayMember = "Name";
            cB_Modul.ValueMember   = "TrainingSubTypeID";
            cB_Modul.DataSource    = dSPretragaKandidata.TrainingSubType;

            dGV_Kursevi.AutoGenerateColumns = false;
            dGV_Kursevi.DataSource          = dSPretragaKandidata.view_Kursevi;
        }