Example #1
0
        private async void Connect()
        {
            if (_connector == null)
            {
                _connector = new Connector();
            }

            if (!_connector.Connect())
            {
                MessageBox.Show("Please click Connect to try connecting to Dynamics CRM again. A valid connection is required.");
                return;
            }

            IsBusy = true;

            _service = _connector.OrganizationServiceProxy;

            ConnectText = "Reconnect";

            _messenger.Send(new UpdateHeaderMessage
            {
                Header = "Users by Role: " + _connector.OrganizationFriendlyName
            });

            var roles = await LoadRoles();

            Roles = new ObservableCollection<Role>(roles);

            IsBusy = false;
        }
Example #2
0
        private async void Connect()
        {
            if (_connector == null)
            {
                _connector = new Connector();
            }

            if (!_connector.Connect())
            {
                MessageBox.Show("Please click Connect to try connecting to Dynamics CRM again. A valid connection is required.");
                return;
            }

            IsBusy = true;
            IsConnected = false;

            if (_exportLogic == null)
            {
                _exportLogic = new ExportLogic(_connector.OrganizationServiceProxy);
            }
            else
            {
                _exportLogic.OrganizationService = _connector.OrganizationServiceProxy;
            }

            ConnectText = "Change from " + _connector.OrganizationFriendlyName;

            ProgressMessage = "Retrieving teams and security roles...";
            var teams = await RetrieveTeams();

            Teams = new ObservableCollection<Team>(teams);

            IsConnected = true;
            IsBusy = false;
        }
Example #3
0
        private async void Connect()
        {
            if (_connector == null)
            {
                _connector = new Connector();
            }

            if (!_connector.Connect())
            {
                MessageBox.Show("Please click Connect to try connecting to Dynamics CRM again. A valid connection is required.");
                return;
            }

            IsBusy = true;
            IsConnected = false;

            if (_importLogic == null)
            {
                _importLogic = new ImportLogic(_connector.OrganizationServiceProxy);
            }
            else
            {
                _importLogic.OrganizationService = _connector.OrganizationServiceProxy;
            }

            ConnectText = "Change from " + _connector.OrganizationFriendlyName;

            await LoadExportData();

            IsConnected = true;
            IsBusy = false;
        }
Example #4
0
        private async void Connect()
        {
            if (_connector == null)
            {
                _connector = new Connector();
            }

            if (!_connector.Connect())
            {
                MessageBox.Show("Please click Connect to try connecting to Dynamics CRM again. A valid connection is required.");
                return;
            }

            IsBusy = true;

            if (_logic == null)
            {
                _logic = new ExecuteBulkWorkflowLogic(_connector.OrganizationServiceProxy);
            }
            else
            {
                _logic.OrganizationService = _connector.OrganizationServiceProxy;
            }

            ConnectText = "Reconnect";

            _messenger.Send(new UpdateHeaderMessage
            {
                Header = "Bulk Workflow Executor: " + _connector.OrganizationFriendlyName
            });

            var workflows = await RetrieveWorkflows();

            Workflows = new ObservableCollection<Workflow>(workflows);

            IsBusy = false;
        }