public IHttpActionResult Get(int id) { //string accessType = "SOWTrackResult_ViewAll"; //ThrowIfUserHasNoRole(accessType); using (SOWTrackResultQuery sowTrackResultQuery = new SOWTrackResultQuery(Db)) { var data = sowTrackResultQuery.GetByPrimaryKey(id); SaveLog("SOWTrackResult", "Get", JsonConvert.SerializeObject(new { primaryKey = id })); return(Ok(new SuccessResponse(data))); } }
public IHttpActionResult Search([FromUri] SOWTrackResultSearchFilter filter) { //string accessType = "SOWTrackResult_ViewAll"; //ThrowIfUserHasNoRole(accessType); if (filter == null) { throw new KairosException("Missing search filter parameter"); } using (var sowTrackResultQuery = new SOWTrackResultQuery(Db)) { var data = sowTrackResultQuery.GetDataByFilter(filter); return(Ok(new SuccessResponse(data))); } }
public CheckInDTO GetByPrimaryKey(int checkInPrimaryKey) { CheckInDTO record = GetQuery().FirstOrDefault(checkIn => checkIn.CheckIn_PK == checkInPrimaryKey); if (record != null) { var sowResult = new SOWResultQuery(Db).GetByCheckinFK(checkInPrimaryKey); if (sowResult != null) { record.SOWResult = sowResult; } var sowTrackResults = new SOWTrackResultQuery(Db).GetByCheckinFK(checkInPrimaryKey); if (sowTrackResults != null) { record.SOWTrackResults = sowTrackResults; } } return(record); }
public SOWTrackResultListDataProvider(GlobalSolusindoDb db, tblM_User user, SOWTrackResultQuery sowTrackResultQuery) : base(db, user) { this.sowTrackResultQuery = sowTrackResultQuery; }
public SOWTrackResultEntryDataProvider(GlobalSolusindoDb db, tblM_User user, AccessControl accessControl, SOWTrackResultQuery sowTrackResultQuery) : base(db, user) { this.accessControl = accessControl; this.sowTrackResultQuery = sowTrackResultQuery; }