Beispiel #1
0
        public async Task <RO <AccessPointStatusList> > AccessPointStatus([FromBody] ClientData clientData)
        {
            var ro = new RO <AccessPointStatusList>();

            if (ModelState.IsValid)
            {
                                #if SESAM
                VendorInterface vendor = new VendorInterface();
                ro = await vendor.AccessPointStatus(clientData);
                                #else
                var accesspoints = await VendorDL.AccessPointStatus(clientData.InstallationID);

                ro.ReturnCode  = 0;
                ro.ReturnValue = accesspoints;
                                #endif
            }
            else
            {
                var message = string.Join(" | ", ModelState.Values.SelectMany(v => v.Errors).Select(e => e.ErrorMessage));

                ro.ReturnCode = 100;
                ro.Message    = $"Bad request - AccessPointStatus - Incorrect parameters: {message}";
            }

            return(ro);
        }