//Error Code /* List<ITRoute> IStorageService.GetAllRoute() * { * List<ITRoute> liRoutes = new List<ITRoute>(); * IEnumerable<TRoute> data = this._Sb.TRoutes.AsEnumerable().Where(obj => obj.bStatus == false);//added to avoid test iec no's * * if (data != null) * { * liRoutes = data.Select(obj => new OTRoute(obj) as ITRoute).ToList(); * } * * return liRoutes; * } */ // IStorageService Service for route ends here //Istorage Service for Absenty Starts here ITAbsenty IStorageService.GetAbsentyByID(long n) { ITAbsenty iAbsenty = null; TAbsentyMarking tAbsenty = _Sb.TAbsentyMarkings.FirstOrDefault(obj => obj.n == n); if (tAbsenty != null) { iAbsenty = new OTAbsenty(tAbsenty) as ITAbsenty; } return(iAbsenty); }
internal TAbsentyModal.AddAbsentyRsp AddAbsenty(TAbsentyModal.AddAbsentyReq req) { TAbsentyModal.AddAbsentyRsp rsp = new TAbsentyModal.AddAbsentyRsp(); rsp.apiError = new APIErrors(); rsp.apiError = ApiError_defs.err_Invalid_Request; ITAbsenty absenty = _storage.AddAbsenty(req.nEntityFk, req.nBusFk); if (absenty != null && absenty.n > 0) { rsp.nAbsenty = absenty.n; rsp.apiError = ApiError_defs.ok; } return(rsp); }