Ejemplo n.º 1
0
 private void insertUsernameAndPassword(string username, string password, string angajatID)
 {
     using (SqlConnection connection = new System.Data.SqlClient.SqlConnection(Helper.ConnectionValue("connectionString")))
     {
         connection.Open();
         Encrypter  passwordEncrypter = new Encrypter();
         UserData   userData          = new UserData();
         DataTable  dataTable         = new DataTable();
         SqlCommand sqlCommand        = new SqlCommand("dbo.Angajati_InsertUser @username ='******' ,@password = '******' ,@angajatID =  " + angajatID, connection);
         try
         {
             sqlCommand.ExecuteNonQuery();
         }
         catch (Exception ex)
         {
             MessageBox.Show("Utilizatorul exista deja");
         }
     }
 }