public IActionResult GoreviOnayla(GorevlendirEkipViewModel model) { var hasta = _hastaService.GetirAciliyetileHastaListesiById(model.HastaId); var ekip = _userManager.Users.FirstOrDefault(x => x.Id == model.UserId); AppUserListViewModel userModel = new AppUserListViewModel(); userModel.Id = ekip.Id; userModel.Email = ekip.Email; userModel.Name = ekip.Name; userModel.Surname = ekip.Surname; userModel.UserName = ekip.UserName; HastaListViewModel hastaModel = new HastaListViewModel(); hastaModel.Id = hasta.Id; hastaModel.KimlikNo = hasta.KimlikNo; hastaModel.AdSoyad = hasta.AdSoyad; hastaModel.Aciklama = hasta.Aciklama; hastaModel.Yas = hasta.Yas; hastaModel.TestTarihi = hasta.TestTarihi; hastaModel.Aciliyet = hasta.Aciliyet; GorevlendirEkipListViewModel gorevlendirEkipModel = new GorevlendirEkipListViewModel(); gorevlendirEkipModel.AppUser = userModel; gorevlendirEkipModel.Hasta = hastaModel; return(View(gorevlendirEkipModel)); }
public IActionResult EkipGorevlendir(GorevlendirEkipViewModel model) { var guncellenecekHasta = _hastaService.GetirIdile(model.HastaId); guncellenecekHasta.AppUserId = model.UserId; _hastaService.Guncelle(guncellenecekHasta); _bildirimService.Ekle(new Bildirim() { AppUserId = model.UserId, Mesaj = guncellenecekHasta.KimlikNo + " kimlik numaralı hasta için görevlendirildiniz." }); return(RedirectToAction("Index")); }