public JsonResult Delete(int id, string userName) { var record = _serv.Get(id); if (record.WorkAssignmentID != null) { return(Json(new { jobSuccess = false, rtnMessage = "You cannot delete a signin that has been associated with an Assignment. Disassociate the sigin with the assignment first." }, JsonRequestBehavior.AllowGet)); } else { _serv.Delete(id, userName); return(Json(new { jobSuccess = true, status = "OK", deletedID = id }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Assign(int waid, int wsiid, string userName) { Domain.WorkerSignin signin = wsiServ.Get(wsiid); Domain.WorkAssignment assignment = waServ.Get(waid); waServ.Assign(assignment, signin, userName); return(Json(new { jobSuccess = true }, JsonRequestBehavior.AllowGet)); }
public ActionResult Assign(int waid, int wsiid, string userName) { WorkerSignin signin = wsiServ.Get(wsiid); WorkAssignment assignment = waServ.Get(waid); waServ.Assign(assignment, signin, userName); return(Json(new { jobSuccess = true })); }