Beispiel #1
0
        private void miIzbornikNoviPlan_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            List <tocka> t  = new List <tocka>();
            int          zt = RadSPlanovima.najdiZadnjiId();

            /*Form1 NoviPlan = new Form1(prijavljeniKorisnik, t);
             * NoviPlan.Text = "Novi Operacijski plan";
             * NoviPlan.WindowState = FormWindowState.Maximized;
             * NoviPlan.Show();*/
        }
Beispiel #2
0
 private void btnPotvrdi_Click(object sender, EventArgs e)
 {
     if (ProvjeraUnosa.ProvjeriNaziv(txtNaziv.Text))
     {
         if (nazivPlana == null)
         {
             if (!RadSPlanovima.ProvjeriPlan(txtNaziv.Text))
             {
                 RadSPlanovima.SpremiPlan(2, nazivPlana);
                 MessageBox.Show("Uspješno ste spremili plan.", "Uspjeh", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 this.Close();
             }
             else
             {
                 MessageBox.Show("Takav naziv već postoji!", "Pogreška", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
         else
         {
             if (RadSPlanovima.ProvjeriPlan(txtNaziv.Text) && txtNaziv.Text != nazivPlana)
             {
                 MessageBox.Show("Takav naziv već postoji!", "Pogreška", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             else
             {
                 RadSPlanovima.PromijeniNaziv(nazivPlana, txtNaziv.Text);
                 MessageBox.Show("Uspješno ste izmijenili naziv.", "Uspjeh", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 this.Close();
             }
         }
     }
     else
     {
         MessageBox.Show("Naziv može sadržavati slova, brojke i razmak!", "Pogreška", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }