Пример #1
0
        private void bSacuvaj_Click(object sender, RoutedEventArgs e)
        {
            this.original.SetValues(copyObj);

            if (mod == MOD.DODAVANJE)
            {
                try
                {
                    UplateDAO.Create(original);
                    Aplikacija.Instanca.Uplate.Add(original);
                    foreach (Ucenik u in Aplikacija.Instanca.Ucenici)
                    {
                        if (u.JMBG == original.Ucenik.JMBG)
                        {
                            u.Uplate.Add(original);
                        }
                    }
                }
                catch { }
            }
            else
            {
                UplateDAO.Update(original);
            }
            UplateDAO.Read();
            this.DialogResult = true;
            this.Close();
        }
Пример #2
0
 public App()
 {
     UcenikDAO.Read();
     TipKorisnikaDAO.Read();
     KorisnikDAO.Read();
     NastavnikDAO.Read();
     JezikDAO.Read();
     TipKursaDAO.Read();
     KursDAO.Read();
     UplateDAO.Read();
 }
Пример #3
0
 public App()
 {
     KorisniciDAO.Read();
     Aplikacija.Instanca.Skola = SkolaDAO.Read();
     NastavniciDAO.Read();
     KurseviDAO.Read();
     UceniciDAO.Read();
     PredajeDAO.Read();
     PohadjaDAO.Read();
     UplateDAO.Read();
 }
Пример #4
0
        public UplateWindow()
        {
            UplateDAO.Read();
            InitializeComponent();
            bIzmeni.IsEnabled              = false;
            bObrisi.IsEnabled              = false;
            rbImeUcenikKursa.IsEnabled     = false;
            rbPrezimeUcenikKursa.IsEnabled = false;
            rbJMBGUcenikKursa.IsEnabled    = false;
            rbIme.IsEnabled            = false;
            rbPrezime.IsEnabled        = false;
            rbJMBG.IsEnabled           = false;
            rbIme.IsChecked            = true;
            rbImeUcenikKursa.IsChecked = true;
            rbJezik.IsChecked          = true;
            rbKurs.IsChecked           = true;

            cvs                  = new CollectionViewSource();
            cvs.Source           = Aplikacija.Instanca.Uplate;
            dgUplate.ItemsSource = cvs.View;

            dgUplate.IsReadOnly          = true;
            dgUplate.SelectionMode       = DataGridSelectionMode.Single;
            dgUplate.AutoGenerateColumns = false;

            DataGridTextColumn c = new DataGridTextColumn();

            c.Header  = "Ucenik";
            c.Binding = new Binding("Ucenik.ImePrezime");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgUplate.Columns.Add(c);

            c         = new DataGridTextColumn();
            c.Header  = "Kurs";
            c.Binding = new Binding("Kurs.JezikKursa");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgUplate.Columns.Add(c);

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

            c         = new DataGridTextColumn();
            c.Header  = "Datum";
            c.Binding = new Binding("Datum");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgUplate.Columns.Add(c);
        }