Exemple #1
0
        public void EditProfille(Pearson p)
        {
            string s = "UPDATE Users  " +
                       "set FirstName = '" + p.FirstName + "' , LastName = '" + p.LastName + "'  , Email = '" + p.Email + "'  , Address = '" + p.Adress + "'  , PhoneNumber = '" + p.Phone + "'  " +
                       "where Login_name = '" + p.UserName + "'";
            SqlCommand cmd = new SqlCommand(s, con.connect);

            cmd.ExecuteNonQuery();
        }
Exemple #2
0
        public void Register(Pearson p)
        {
            string s = "INSERT INTO Login (Login_name, Password, Block, Type)" +
                       "VALUES ('" + p.UserName + "','" + p.Password + "', 'No' , '" + p.Type + "');";
            SqlCommand cmd = new SqlCommand(s, con.connect);

            cmd.ExecuteNonQuery();
            s = "INSERT INTO Users(Login_name ,  FirstName , LastName , PhoneNumber , Address , Email ,Password, Type) " +
                "VALUES ('" + p.UserName + "','" + p.FirstName + "', '" + p.LastName + "' ,  '" + p.Phone + "' ,  '" + p.Adress + "' ,  '" + p.Email + "','" + p.Password + "', '" + p.Type + "');";
            cmd = new SqlCommand(s, con.connect);
            cmd.ExecuteNonQuery();
        }
Exemple #3
0
 public Edit_profile(Pearson user1)
 {
     InitializeComponent();
     user = user1;
 }