Login.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace FietsClientV2
  11. {
  12. public partial class Login : Form
  13. {
  14. public Login()
  15. {
  16. InitializeComponent();
  17. }
  18. private void SubmitButton_Click(object sender, EventArgs e)
  19. {
  20. string username = UsernameBox.Text;
  21. string password = PasswordBox.Text;
  22. PasswordBox.Text = "";
  23. //temporary fake login as patient
  24. if (true)
  25. {
  26. PatientForm patientForm = new PatientForm();
  27. this.Hide();
  28. patientForm.Show();
  29. }
  30. else
  31. {
  32. DoctorForm doctorForm = new DoctorForm();
  33. this.Hide();
  34. doctorForm.Show();
  35. }
  36. //TO DO
  37. // add way to check if correct username or password
  38. // and if doctor or patient
  39. /*
  40. if (patient)
  41. {
  42. PatientForm patientForm = new PatientForm();
  43. this.Hide();
  44. patientForm.Show();
  45. }
  46. //else if (doctor)
  47. {
  48. DoctorForm doctorForm = new DoctorForm();
  49. this.Hide();
  50. doctorForm.Show();
  51. }
  52. */
  53. }
  54. }
  55. }