コード例 #1
0
        internal TAbsentyModal.GetAbsentyRsp GetAbsenty(TAbsentyModal.GetAbsentyReq req)
        {
            TAbsentyModal.GetAbsentyRsp rsp = new TAbsentyModal.GetAbsentyRsp();
            rsp.apiError = new APIErrors();
            rsp.apiError = ApiError_defs.err_Invalid_Request;

            List <ITAbsenty> liAbsenty = _storage.GetAllAbsenty(req.day, req.month, req.year);
            List <TAbsentyModal.AbsentyInfo> liAbsentyInfo = new List <TAbsentyModal.AbsentyInfo>();

            if (liAbsenty != null)
            {
                foreach (ITAbsenty iAb in liAbsenty)
                {
                    TAbsentyModal.AbsentyInfo objAbsenty = new TAbsentyModal.AbsentyInfo();
                    objAbsenty.n         = iAb.n;
                    objAbsenty.nEntityFk = iAb.nEntityFK;
                    objAbsenty.nBusFk    = iAb.nBusFK;
                    objAbsenty.bStatus   = iAb.bStatus;

                    liAbsentyInfo.Add(objAbsenty);
                }

                rsp.liAbsenty = liAbsentyInfo;
                rsp.apiError  = ApiError_defs.ok;
            }
            return(rsp);
        }
コード例 #2
0
        public object GetAbsenty([FromUri] TAbsentyModal.GetAbsentyReq req)
        {
            BLL_Absenty bllAbsenty = new BLL_Absenty();

            TAbsentyModal.GetAbsentyRsp resp = bllAbsenty.GetAbsenty(req);
            return(resp);
        }