Exemple #1
0
        public IActionResult ManageStaff()
        {
            var query = (from u in db.Staff
                         where u.Role != "admin" && u.OutletId.ToString() == (User.FindFirst(claim => claim.Type == System.Security.Claims.ClaimTypes.Actor).Value)
                         select u);

            CentralModelLocal obj = new CentralModelLocal
            {
                loopstaff = query.ToList()
            };

            return(View(obj));
        }
Exemple #2
0
 public IActionResult AddStaffFunction(CentralModelLocal model)
 {
     db.Staff.Add(model.staffdb);
     db.SaveChanges();
     return(RedirectToAction("ManageStaff"));
 }