public void Run()
        {
            var service = XrmCommand.GetService();

            var core      = WorkflowService ?? new WorkflowService(service);
            var workflows = core.RetrieveOthersWorkflows(UserId);

            core.AssignWorkflowsToUser(workflows, UserId);
        }
예제 #2
0
        public void Run()
        {
            var service = XrmCommand.GetService();

            DataTransferService = new DataTransferService(service);
            DataTransferService.SetDefaultProperties();

            var data       = DataTransferService.DataReader.GetDataFromCrm(FetchXml);
            var parsedData = DataTransferService.DataTransformer.TransformDataForFile(data);

            DataTransferService.DataWriter.WriteDataToFile(parsedData, WorkingDirectory);
        }
예제 #3
0
        public void Run()
        {
            var service = XrmCommand.GetService();

            DataTransferService = new DataTransferService(service);
            DataTransferService.SetDefaultProperties();

            // TODO, read guid map from user input.
            var guidMap    = new Dictionary <Guid, Guid>();
            var data       = DataTransferService.DataReader.ParseDataFromFile(WorkingDirectory);
            var parsedData = DataTransferService.DataTransformer.TransformDataForCrm(data);

            var version = DataTransferService.DataReader.GetCrmVersion();

            DataTransferService.DataWriter.ImportDataToCrm(parsedData, version, guidMap, false, false, false);
        }
        public void Run_Calls_Get_Service()
        {
            AssignWorkflows.Run();

            XrmCommand.Verify(x => x.GetService(false), Times.Once());
        }
예제 #5
0
 public ImportToCrm(string connectionString, string workingDirectory)
 {
     WorkingDirectory = workingDirectory;
     XrmCommand       = new XrmCommand(connectionString);
 }
예제 #6
0
 public ExportToFile(string connectionString, string workingDirectory, string fetchXml)
 {
     WorkingDirectory = workingDirectory;
     FetchXml         = fetchXml;
     XrmCommand       = new XrmCommand(connectionString);
 }
 public AssignWorkflowsToUser(string connectionString, string userId)
 {
     XrmCommand = new XrmCommand(connectionString);
     UserId     = GuidParser.TryParseIdOrThrow(userId);
 }