Advertisement
raven145

Untitled

Nov 27th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. package com.ermanager.activities;
  2.  
  3. import com.ermanager.activities.R.id;
  4. import com.ermanager.backend.Nurse;
  5. import com.ermanager.backend.Patient;
  6. import com.ermanager.backend.User;
  7. import com.ermanager.backend.Waitlist;
  8. import com.ermanager.exceptions.ERException;
  9.  
  10. import android.app.Activity;
  11. import android.os.Bundle;
  12. import android.view.Menu;
  13. import android.view.MenuItem;
  14.  
  15. public class SearchActivity extends Activity {
  16.  
  17. @Override
  18. protected void onCreate(Bundle savedInstanceState) {
  19. super.onCreate(savedInstanceState);
  20. setContentView(R.layout.activity_searchpatient);
  21. }
  22.  
  23. @Override
  24. public boolean onCreateOptionsMenu(Menu menu) {
  25. // Inflate the menu; this adds items to the action bar if it is present.
  26. getMenuInflater().inflate(R.menu.search, menu);
  27. return true;
  28. }
  29.  
  30. @Override
  31. public boolean onOptionsItemSelected(MenuItem item) {
  32. // Handle action bar item clicks here. The action bar will
  33. // automatically handle clicks on the Home/Up button, so long
  34. // as you specify a parent activity in AndroidManifest.xml.
  35. int id = item.getItemId();
  36. if (id == R.id.action_settings) {
  37. return true;
  38. }
  39. return super.onOptionsItemSelected(item);
  40. }
  41.  
  42.  
  43.  
  44.  
  45.  
  46. //search patient by health card number
  47. public void searchpatient(int healthcardnumber) {
  48. User n = new Nurse(null, null);
  49. try {
  50. n.findPatient(healthcardnumber);
  51. } catch (ERException e) {
  52. // TODO Auto-generated catch block
  53. e.printStackTrace();
  54. }
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement