Пример #1
0
        /// <summary>
        /// Change your ServerQuery clients settings using given properties.
        /// </summary>
        /// <param name="modificationInstance">the modifications as class</param>
        public SimpleResponse UpdateCurrentQueryClient(ClientModification modificationInstance)
        {
            if (modificationInstance == null)
                throw new ArgumentNullException("modificationInstance");

            Command command = SharedCommandName.ClientUpdate.CreateCommand();
            modificationInstance.AddToCommand(command);

            return ResponseBase<SimpleResponse>.Parse(SendCommand(command));
        }
Пример #2
0
        /// <summary>
        /// Changes a clients settings using given properties.
        /// </summary>
        /// <param name="clientDatabaseId">the id of the database client to edit</param>
        /// <param name="modificationInstance">the modifications as class</param>
        public SimpleResponse EditDatbaseClient(int clientDatabaseId, ClientModification modificationInstance)
        {
            if (modificationInstance == null)
                throw new ArgumentNullException("modificationInstance");

            Command command = CommandName.ClientDbEdit.CreateCommand();
            command.AddParameter("cldbid", clientDatabaseId);
            modificationInstance.AddToCommand(command);

            return ResponseBase<SimpleResponse>.Parse(SendCommand(command));
        }