public object AddAbsenty([FromUri] TAbsentyModal.AddAbsentyReq req)
        {
            BLL_Absenty bllAbsenty = new BLL_Absenty();

            TAbsentyModal.AddAbsentyRsp resp = bllAbsenty.AddAbsenty(req);
            return(resp);
        }
Example #2
0
        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);
        }