Exemplo n.º 1
0
 public void spremeni_Geslo(string a)
 {
     using (NpgsqlConnection con = new NpgsqlConnection("Server=hattie.db.elephantsql.com; User Id=qrallryw;" + "Password=42JSx-SoQO5TfgzavjTAU5Bz2qJli0rN; Database=qrallryw;"))
     {
         con.Open();
         NpgsqlCommand    com    = new NpgsqlCommand("SELECT update_geslo_uporabnika(" + Public.id + ",'" + Ena.CreateMD5(a) + "')", con);
         NpgsqlDataReader reader = com.ExecuteReader();
         while (reader.Read())
         {
         }
         con.Close();
     }
 }
Exemplo n.º 2
0
        public static bool Registracija(string a, string b, string c, string d)
        {
            bool x = false;

            using (NpgsqlConnection con = new NpgsqlConnection("Server=hattie.db.elephantsql.com; User Id=qrallryw;" + "Password=42JSx-SoQO5TfgzavjTAU5Bz2qJli0rN; Database=qrallryw;"))
            {
                con.Open();
                NpgsqlCommand    com    = new NpgsqlCommand("SELECT add_uporabnik1('" + a + "','" + b + "','" + c + "','" + Ena.CreateMD5(d) + "')", con);
                NpgsqlDataReader reader = com.ExecuteReader();
                while (reader.Read())
                {
                    Public.Change(reader.GetInt32(0));
                    x = true;
                    //comboBox1.Items.Add(ime);
                    //comboBox1.Items.Add(a);
                }
                con.Close();
            }
            return(x);
        }