예제 #1
0
 public App()
 {
     UcenikDAO.Read();
     TipKorisnikaDAO.Read();
     KorisnikDAO.Read();
     NastavnikDAO.Read();
     JezikDAO.Read();
     TipKursaDAO.Read();
     KursDAO.Read();
     UplateDAO.Read();
 }
예제 #2
0
 public App()
 {
     KorisnikDAO.Read();
     JezikDAO.Read();
     NivoDAO.Read();
     KursDAO.Read();
     NastavnikDAO.Read();
     UcenikDAO.Read();
     NastavnikKursDAO.Read();
     UcenikKursDAO.Read();
     UplataDAO.Read();
     SkolaDAO.Read();
 }
예제 #3
0
        public KurseviWindow()
        {
            KursDAO.Read();
            InitializeComponent();
            bIzmeni.IsEnabled  = false;
            bObrisi.IsEnabled  = false;
            rbUcenik.IsChecked = true;
            rbIme.IsChecked    = true;
            cvs                   = new CollectionViewSource();
            cvs.Source            = Aplikacija.Instanca.Kursevi;
            dgKursevi.ItemsSource = cvs.View;

            dgKursevi.IsReadOnly    = true;
            dgKursevi.SelectionMode = DataGridSelectionMode.Single;

            dgKursevi.AutoGenerateColumns = false;
            DataGridTextColumn c = new DataGridTextColumn();

            c.Header  = "Jezik";
            c.Binding = new Binding("JezikKursa.Naziv");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgKursevi.Columns.Add(c);

            c         = new DataGridTextColumn();
            c.Header  = "Tip";
            c.Binding = new Binding("Tip.Nivo");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgKursevi.Columns.Add(c);

            c         = new DataGridTextColumn();
            c.Header  = "Cena";
            c.Binding = new Binding("Cena");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgKursevi.Columns.Add(c);

            c         = new DataGridTextColumn();
            c.Header  = "Predavac";
            c.Binding = new Binding("Predavac.ImePrezime");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgKursevi.Columns.Add(c);
        }
예제 #4
0
        private void bSacuvaj_Click(object sender, RoutedEventArgs e)
        {
            this.original.SetValues(copyObj);

            if (mod == MOD.DODAVANJE)
            {
                try
                {
                    Aplikacija.Instanca.Kursevi.Add(original);
                    KursDAO.Create(original);
                }
                catch { }
            }
            else
            {
                try { KursDAO.Update(original); }
                catch { }
            }
            KursDAO.Read();
            this.DialogResult = true;
            this.Close();
        }