Advertisement
raven145

Untitled

Nov 27th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. package com.ermanager.activities;
  2.  
  3. import com.ermanager.backend.Nurse;
  4. import com.ermanager.backend.User;
  5. import com.ermanager.backend.UserLogin;
  6. import com.ermanager.database.Database;
  7. import com.ermanager.database.TablePatients;
  8.  
  9. import android.app.Activity;
  10. import android.database.Cursor;
  11. import android.os.Bundle;
  12. import android.util.Log;
  13. import android.view.Menu;
  14. import android.view.MenuItem;
  15.  
  16. import android.content.Intent;
  17.  
  18. public class MainActivity extends Activity {
  19.  
  20. private static final User User = null;
  21. @Override
  22. protected void onCreate(Bundle savedInstanceState) {
  23. super.onCreate(savedInstanceState);
  24. //setContentView(R.layout.activity_main);
  25. }
  26.  
  27. @Override
  28. public boolean onCreateOptionsMenu(Menu menu) {
  29. // Inflate the menu; this adds items to the action bar if it is present.
  30. getMenuInflater().inflate(R.menu.main, menu);
  31. return true;
  32. }
  33.  
  34. @Override
  35. public boolean onOptionsItemSelected(MenuItem item) {
  36. // Handle action bar item clicks here. The action bar will
  37. // automatically handle clicks on the Home/Up button, so long
  38. // as you specify a parent activity in AndroidManifest.xml.
  39. int id = item.getItemId();
  40. if (id == R.id.action_settings) {
  41. return true;
  42. }
  43. return super.onOptionsItemSelected(item);
  44. }
  45.  
  46. //login nurse or physician. If it is nurse go to search page.
  47. public void login(String username, String password ) {
  48. User a = User;
  49. if(a.isNurse()) {
  50. Intent intent = new Intent(this, SearchActivity.class);
  51.  
  52. }
  53. else{
  54. Intent intent = new Intent(this, PrsActivity.class);
  55. }
  56.  
  57. // Do something in response to button
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement