示例#1
0
        public Models.MethodResponse Get(string id)
        {
            try
            {
                if (id.Length == 6)
                {
                    response.Content = service.getLocWorkrooms(id);
                    response.Result  = true;

                    return(response);
                }
                else
                {
                    response.ErrorMessage = "CID variable has incorrect length.";
                    response.Content      = new Models.WorkroomsUserObject[] { };
                    response.Result       = false;
                }
            } catch (Exception ex)
            {
                response.ErrorMessage = ex.Message;
                response.Content      = new Models.WorkroomsUserObject[] { };
                response.Result       = false;
            }

            return(response);
        }