public dynamic Get(string code) { try { return(OccupancyMdl.get_occupancy(code)); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }
public object Check(string code) { try { var result = OccupancyMdl.get_occupancy(code); return(result != null ? (object)new { state = true, name = result.MSO_NAME } : new { state = false }); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }