示例#1
0
        public static CFBR_Validation_Response CancelClientClass(CFBR_User cf_user, int cf_class_id)
        {
            // Create Service
            ClassService classService = new ClassService();

            // Create request
            RemoveClientsFromClassesRequest request = new RemoveClientsFromClassesRequest();

            // Create and fill credentials
            request.SourceCredentials = new SourceCredentials();
            request.SourceCredentials.SourceName = SOURCE_NAME;
            request.SourceCredentials.Password = SOURCE_PASSWORD;
            request.SourceCredentials.SiteIDs = SITE_IDS;

            string[] client_ids = { cf_user.ClientId }; // Add User ID
            request.ClientIDs = client_ids;

            int[] class_ids = { cf_class_id }; // Add Class ID
            request.ClassIDs = class_ids;

            request.Test = false;

            // Run call with request and fill result
            RemoveClientsFromClassesResult api_result = classService.RemoveClientsFromClasses(request);

            CFBR_Validation_Response result = new CFBR_Validation_Response();

            result.DataObj = api_result;
            result.IsValid = (api_result.Status == StatusCode.Success);
            result.Message = api_result.Message;

            return result;
        }
示例#2
0
 /// <remarks/>
 public void RemoveClientsFromClassesAsync(RemoveClientsFromClassesRequest Request, object userState) {
     if ((this.RemoveClientsFromClassesOperationCompleted == null)) {
         this.RemoveClientsFromClassesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveClientsFromClassesOperationCompleted);
     }
     this.InvokeAsync("RemoveClientsFromClasses", new object[] {
                 Request}, this.RemoveClientsFromClassesOperationCompleted, userState);
 }
示例#3
0
 /// <remarks/>
 public void RemoveClientsFromClassesAsync(RemoveClientsFromClassesRequest Request) {
     this.RemoveClientsFromClassesAsync(Request, null);
 }
示例#4
0
 public RemoveClientsFromClassesResult RemoveClientsFromClasses(RemoveClientsFromClassesRequest Request) {
     object[] results = this.Invoke("RemoveClientsFromClasses", new object[] {
                 Request});
     return ((RemoveClientsFromClassesResult)(results[0]));
 }