Exemplo n.º 1
0
        // GET api/installusers?UserSN=1&UserSN_Object=2
        public ReturnValue Get(int id, int usersn_object)
        {
            IMFREEEntities entity = new IMFREEEntities();

            ReturnValue returnValue = new ReturnValue();
            returnValue.code = 0;
            returnValue.msg = "succes";

            try
            {
                InstallUserGetList_Result value = new InstallUserGetList_Result();
                int result = entity.InstallUserGetInfo(id, usersn_object);

                if (result == 0)
                {
                    value.UserSN = id;
                    value.UserSN_Object = usersn_object;
                }

                returnValue.value = value;
            }
            catch
            {
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return returnValue;
        }
Exemplo n.º 2
0
        // GET api/installusers?UserSN=1&UserSN_Object=2
        public ReturnValue Get(int id, int usersn_object)
        {
            IMFREEEntities entity = new IMFREEEntities();

            ReturnValue returnValue = new ReturnValue();

            returnValue.code = 0;
            returnValue.msg  = "succes";

            try
            {
                InstallUserGetList_Result value = new InstallUserGetList_Result();
                int result = entity.InstallUserGetInfo(id, usersn_object);

                if (result == 0)
                {
                    value.UserSN        = id;
                    value.UserSN_Object = usersn_object;
                }

                returnValue.value = value;
            }
            catch
            {
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return(returnValue);
        }