private void PatientForm_Load(object sender, EventArgs e) { this.currentUser = MedicController.getByUsername(this.username); patientListView.Items.Clear(); patientListView.Columns.Add("Patient List", 100); patientListView.Columns.Add("ID", 50); patientListView.Columns.Add("Name", 150); patientListView.Columns.Add("Surname", 150); patientListView.Columns.Add("Blood Type", 150); List <Patient> pList = PatientController.getAll(); patientListView.BeginUpdate(); foreach (Patient elem in pList) { ListViewItem lvi = new ListViewItem(); lvi.SubItems.Add(elem.Id.ToString()); lvi.SubItems.Add(elem.Name); lvi.SubItems.Add(elem.Surname); lvi.SubItems.Add(elem.BloodType); patientListView.Items.Add(lvi); } patientListView.EndUpdate(); }
public AddPrescriptionForm(int patientId, int medicId, string username) { this.patientId = patientId; this.medicId = medicId; this.username = username; this.currentUser = MedicController.getById(this.medicId); this.selectedPatient = PatientController.getById(this.patientId); this.FormClosing += FormUtility.CloseForm; InitializeComponent(); }
public void CreateIllness() { var model = new SharedModels.IllnessModel { IdPatient = 3 }; var controller = new MedicController(); var result = controller.CreateIllness(3) as ViewResult; var modelR = (SharedModels.IllnessModel)result.Model; Assert.AreEqual(3, modelR.IdPatient); }
public void CreateIllnessResult() { var db = new DbServices.PatientsContext(ComunicationControllers.WcfConfig.WcfUri); var count = db.TablePatientWasSick.Count(); SharedModels.IllnessModel model = new SharedModels.IllnessModel { Date = DateTime.Now, Description = "test", Name = "test", IdPatient = 3 }; var controller = new MedicController(); var result = (RedirectToRouteResult)controller.CreateIllnessResult(model); var countAfter = db.TablePatientWasSick.Count(); Assert.AreEqual(3, result.RouteValues["id"]); Assert.AreEqual(countAfter, count + 1); }
bool IsGameOver() { MedicController cc = medic.GetComponent <MedicController>(); return(cc.IsDead()); }
public DoctorPanel() { InitializeComponent(); mc = new MedicController(); sc = new SpecialtyController(); }