public async Task <ActionResult> Index(Models.Med med) { await _medService.Initialize(); List <MedEntity> meds = await _medService.GetMeds(); return(View(meds)); }
public async Task <ActionResult> Med(Models.Med med) { if (ModelState.IsValid) { await _medService.Initialize(); //PatientEntity patient1=new PatientEntity("roxanabodin","delfin"){ Name="Bodin Roxana",Email="*****@*****.**",Phone="0771242729"}; //await service.AddPatient(patient1); List <MedEntity> p = await _medService.GetMedByUserName(med.Name); if (p.Count != 0 && p[0].RowKey == med.Password) { return(RedirectToAction("Index", "Med", new { Date = med.Name })); } else { ModelState.AddModelError("", "Autentificare esuata!"); } } return(View(med)); }