- fix notification
- new menu system
- possibility to remove patients
This commit is contained in:
2019-01-30 18:01:50 +01:00
parent e4819da4c8
commit 1c0176c72b
8 changed files with 115 additions and 67 deletions

View File

@@ -205,7 +205,7 @@ namespace IdentityDemo.Controllers
Username = username
});
var a = _notification(doctor, InsertAsDoct + username);
var a = _notification(doctor, InsertAsDoct + username, "/user/" + username);
return Json(OkJson);
});
}

View File

@@ -44,6 +44,23 @@ namespace SeniorAssistant.Controllers
[Route("User/{User}")]
public IActionResult SingleUser(string user)
{
try
{
string rm = HttpContext.Request.Query["removePatient"];
string usr = HttpContext.Session.GetString(Username);
var pt = Db.Patients
.Where(p => p.Username.Equals(rm) && p.Doctor.Equals(usr))
.FirstOrDefault();
var mp = Db.MenuPatients
.Where(m => m.PatientUsername.Equals(rm) && m.Username.Equals(usr))
.FirstOrDefault();
Db.Delete(pt);
Db.Delete(mp);
}
catch { }
return CheckAuthorized("User", GetUser(user));
}