public BTSStatusUpdateHandler(GlobalSolusindoDb db, tblM_User user, BTSStatusValidator btsStatusValidator, BTSStatusFactory btsStatusFactory, BTSStatusQuery btsStatusQuery, AccessControl accessControl) : base(db, user) { this.btsStatusValidator = btsStatusValidator; this.btsStatusFactory = btsStatusFactory; this.btsStatusQuery = btsStatusQuery; this.btsStatusEntryDataProvider = new BTSStatusEntryDataProvider(db, user, accessControl, btsStatusQuery); }
public IHttpActionResult GetForm(int id) { string accessType = "BTSStatus_ViewAll"; if (id > 0) { ThrowIfUserHasNoRole(accessType); } using (BTSStatusEntryDataProvider btsStatusEntryDataProvider = new BTSStatusEntryDataProvider(Db, ActiveUser, AccessControl, new BTSStatusQuery(Db))) { var data = btsStatusEntryDataProvider.Get(id); SaveLog("BTSStatus", "GetForm", JsonConvert.SerializeObject(new { primaryKey = id })); return(Ok(new SuccessResponse(data))); } }