public async Task <JsonResult> SLGetByOwner(string id, string aid) { try { var data = SystemLogsService.GetByOIDAPI(Guid.Parse(id), Guid.Parse(aid)); return(Success(SystemLogsVM.MsToVMs(data))); } catch { return(Failed(MessageUtilityService.ServerError())); } }
public async Task <JsonResult> SLRemove() { try { var id = Guid.Parse(Request.Form["id"]); var oid = Guid.Parse(Request.Form["oid"]); var aid = Guid.Parse(Request.Form["aid"]); if (SystemLogsService.Remove(id, oid, aid)) { return(Success(id.ToString())); } return(Failed(MessageUtilityService.FailedRemove("Logs"))); } catch { return(Failed(MessageUtilityService.ServerError())); } }
public async Task <JsonResult> SLUpdate() { try { var id = Guid.Parse(Request.Form["id"]); var oid = Guid.Parse(Request.Form["oid"]); var aid = Guid.Parse(Request.Form["aid"]); var desc = Request.Form["desc"]; var dtid = Guid.Parse(Request.Form["dtid"]); var ia = Boolean.Parse(Request.Form["ia"]); if (SystemLogsService.Update(id, oid, aid, desc, dtid, ia)) { return(Success(id.ToString())); } return(Failed(MessageUtilityService.FailedUpdate("Logs"))); } catch { return(Failed(MessageUtilityService.ServerError())); } }