示例#1
0
        public void podatki()
        {
            leklabel.Visible              = false;
            lekizpis.Visible              = false;
            delavecbutton.Visible         = true;
            odstranidelavcabutton.Visible = false;

            upo = baza.izpis_uporabnika(ajdi);

            ime.Text = "Pozdravljen " + upo.ime;

            emlab.Text  = upo.email;
            paslab.Text = dekript(upo.pass);
            tellab.Text = upo.telefon;
            krlab.Text  = upo.kraj;


            if (upo.Idlekarne != 0)
            {
                string lekarna = baza.ime_lek(upo.Idlekarne);
                lekizpis.Visible              = true;
                leklabel.Visible              = true;
                delavecbutton.Visible         = false;
                odstranidelavcabutton.Visible = true;

                lekizpis.Text = lekarna;
            }
        }
示例#2
0
        public updateuporanbik(uporabnik upo)
        {
            InitializeComponent();
            imetext.Text   = upo.ime;
            emailtext.Text = upo.email;

            passtext.Text    = dekript(upo.pass);
            telefontext.Text = upo.telefon;
            kraj();
            krajcombo.SelectedIndex = krajcombo.FindString(upo.kraj);
            id = baza.iduporabnika(upo.email, upo.pass);
        }
示例#3
0
文件: baza.cs 项目: nyxthejon/Lekarne
        public static uporabnik izpis_uporabnika(int id)
        {
            string connection = baza.connect();

            using (NpgsqlConnection con = new NpgsqlConnection(connection))
            {
                con.Open();
                NpgsqlCommand    com    = new NpgsqlCommand(" SELECT * FROM izpisuporabnika(" + id + ");", con);
                NpgsqlDataReader reader = com.ExecuteReader();
                reader.Read();
                uporabnik upo = new uporabnik(reader.GetString(0), reader.GetString(1), reader.GetString(2), reader.GetString(3), reader.GetString(4), reader.GetInt32(5));


                con.Close();
                return(upo);
            }
        }