Guest User

Untitled

a guest
Jun 4th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. package com.hospital.emr;
  2.  
  3. import java.sql.ResultSet;
  4. import java.sql.SQLException;
  5.  
  6. import android.app.Activity;
  7. import android.os.Bundle;
  8. import android.widget.Button; // ET
  9. import android.view.View; // ET
  10.  
  11.  
  12. public class LoginActivity extends Activity {
  13.     /** Called when the activity is first created. */
  14.    
  15.     JdbcConnection myConnection;
  16.    
  17.     @Override
  18.     public void onCreate(Bundle savedInstanceState) {
  19.         super.onCreate(savedInstanceState);
  20.         setContentView(R.layout.main);
  21.        
  22.         final String userName = getString(R.string.username);
  23.         final String password = getString(R.string.password);
  24.        
  25.         final Button button = (Button) findViewById(R.id.submitButton);
  26.         button.setOnClickListener(new View.OnClickListener() {
  27.             public void onClick(View v) {
  28.                 // Perform action on click
  29.                 // Check username/password against the database
  30.                 myConnection.CheckLogin(userName, password);
  31.             }
  32.         });
  33.     }
  34. }
Add Comment
Please, Sign In to add comment