Ejemplo n.º 1
0
        public UserType_Data retrieve_usertype_data(string sUserTypeName)
        {
            var retrieve_response = client.Get(sUserTypeTable_Path + sUserTypeName);

            if (retrieve_response.Body != "null")
            {
                UserType_Data data = retrieve_response.ResultAs <UserType_Data>();
                return(data);
            }
            return(null);
        }
Ejemplo n.º 2
0
        public bool add_user_type(string sName, int nExp, int nMaxBorrow, int nBorrowTime, float fLostPercentage,
                                  float fDamagedPercentage, int nExtendTime, int nPrice)
        {
            var data = new UserType_Data
            {
                name               = "sName",
                expiration_time    = nExp,
                maximum_borrows    = nMaxBorrow,
                borrow_time        = nBorrowTime,
                lost_percentage    = fLostPercentage,
                damaged_percentage = fDamagedPercentage,
                extend_time        = nExtendTime,
                price              = nPrice
            };
            SetResponse   response = client.Set(sUserTypeTable_Path + data.name, data);
            UserType_Data result   = response.ResultAs <UserType_Data>();

            if (result != null)
            {
                return(true);
            }
            return(false);
        }