Beispiel #1
0
        //studentBus model
        internal Models.Stud_BusModel.MapStudBusResp MapStudent2Bus(Models.Stud_BusModel.MapStudBusReq req)
        {
            Models.Stud_BusModel.MapStudBusResp rsp = new Models.Stud_BusModel.MapStudBusResp();
            ITStud_Bus studBus; bool sall = true;
            APIErrors  apiError = new APIErrors();

            foreach (long entity in req.nEntityId)
            {
                studBus = _storage.MapStudent2Bus(req.nBusFKup, req.nBusFKdown, entity, req.nStopUp, req.nStopDown);
                if (studBus.n > 0)
                {
                }
                else
                {
                    sall = false;
                }
            }
            if (!sall)
            {
                apiError.sErrorMessage = "Not all Mappings successful"; apiError.jErrorVal = 1000;
            }
            else
            {
                apiError.jErrorVal = 0; apiError.sErrorMessage = "Mappings successful";
            }
            //Added Entity
            rsp.apiError = apiError;
            return(rsp);
        }
Beispiel #2
0
 public object MapStudent2Bus([FromBody] Models.Stud_BusModel.MapStudBusReq req)
 {
     Bllfiles.BLL_Mapping bllentity           = new Bllfiles.BLL_Mapping();
     Models.Stud_BusModel.MapStudBusResp resp = bllentity.MapStudent2Bus(req);
     return(resp);
 }