Exemplo n.º 1
0
        public void OnSuccessfulConnection() // Successful connection to database
        {
            // Open new form with tabs
            // Izbor zeljenog lekara, vakcina, dijagnostifikovano, izbor termina
            PacijentForm pacijent_form = new PacijentForm(view.GetJMBG(), view.GetLBO());

            pacijent_form.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            pacijent_form.ShowDialog();
            //view.Message("Uspešno učitani podaci iz baze");
        }
Exemplo n.º 2
0
        private void metroGridPacijenti_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            MetroGrid mg = sender as MetroGrid;

            if (mg == null)
            {
                throw new Exception("Error in MetroGrid conversion");
            }

            MetroMessageBox.Show(this,
                                 "Selektovali ste " + mg.SelectedRows[0].Cells["Ime"].Value.ToString() + " " +
                                 mg.SelectedRows[0].Cells["Prezime"].Value.ToString(),
                                 "Info!", MessageBoxButtons.OK, MessageBoxIcon.Information);


            //  MetroMessageBox.Show(this,
            //    "Selektovali ste " + mg.SelectedCells[0].Value.ToString() + " " + mg.SelectedCells["Prezime"].Value.ToString() +
            //  " LBO " + mg.SelectedCells[1].Value.ToString(), "Info!", MessageBoxButtons.OK, MessageBoxIcon.Information);
            aktivni_pacijent = (Pacijent)mg.SelectedRows[0].DataBoundItem;
            PacijentForm pf = new PacijentForm(session, aktivni_pacijent); // jmbg (from MetroGrid), lbo(not needed)

            pf.ShowDialog();
        }