Beispiel #1
0
        internal Models.DutyModal.AddDutyResp AddDuty(Models.DutyModal.AddDutyReq req)
        {
            Models.DutyModal.AddDutyResp rsp = new Models.DutyModal.AddDutyResp();
            rsp.apiError = new APIErrors();
            rsp.apiError = ApiError_defs.err_Invalid_Request;
            ITAttendentDuty iDuty = _storage.AddDuty(req.nBusFK, req.nEntityId);

            if (iDuty != null && iDuty.n > 0)
            {
                rsp.n        = iDuty.n;
                rsp.apiError = ApiError_defs.ok;
            }
            else
            {
                rsp.apiError.sErrorMessage = "Unable to add Duty";
            }

            return(rsp);
        }
Beispiel #2
0
        internal Models.DutyModal.SetEndStampResp SetEndStamp(Models.DutyModal.SetEndStampResp req)
        {
            Models.DutyModal.SetEndStampResp rsp = new Models.DutyModal.SetEndStampResp();
            rsp.apiError = new APIErrors();
            rsp.apiError = ApiError_defs.err_Invalid_Request;
            ITAttendentDuty iDuty = _storage.SetEndStamp(req.n);

            if (iDuty != null && iDuty.n > 0)
            {
                rsp.n          = iDuty.n;
                rsp.dStampStop = iDuty.dStampStop;
                rsp.apiError   = ApiError_defs.ok;
            }
            else
            {
                rsp.apiError.sErrorMessage = "Unable to add Stamp";
            }
            return(rsp);
        }