Exemplo n.º 1
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     if (selectedId > 0)
     {
         NoviLijekForma forma = new NoviLijekForma(selectedId, vrstaKorisnika);
         if (this.veterinarMDIForma != null)
         {
             forma.MdiParent = this.veterinarMDIForma;
         }
         else if (this.tehnicarMDIForma != null)
         {
             forma.MdiParent = this.tehnicarMDIForma;;
         }
         forma.Show();
     }
 }
Exemplo n.º 2
0
        private void veterinarMDIMeniUnosNovogLijeka_Click(object sender, EventArgs e)
        {
            FormCollection formCollection = Application.OpenForms;
            bool           findForm       = false;

            foreach (Form form in formCollection)
            {
                if (form.Name == "NoviLijekForma")
                {
                    form.Refresh();
                    findForm = true;
                    form.Activate();
                }
            }

            if (findForm == false)
            {
                noviLijek           = new NoviLijekForma();
                noviLijek.MdiParent = this;
                noviLijek.Show();
            }
        }