static void Main(string[] args) { System.Console.WriteLine("Enter contract data"); System.Console.Write("Number: "); int number = int.Parse(Console.ReadLine()); System.Console.Write("Date (dd/mm/yyyy): "); DateTime date = DateTime.Parse(Console.ReadLine()); System.Console.Write("Contract value: "); double amount = double.Parse(Console.ReadLine(), CultureInfo.InvariantCulture); // Instanciando Contrato Contract contrato = new Contract(number, date, amount); System.Console.Write("Enter number of installments: "); int quotes = int.Parse(Console.ReadLine()); // Instanciando ProcessContract ProcessContract processContract = new ProcessContract(quotes, new Paypal()); // Criando as Parcelas dos Contratos processContract.processInstallments(contrato); System.Console.WriteLine("Installments:"); Console.WriteLine(contrato); }
void Run() { var exporter = new Generator(); var context = exporter.Context; Process = context.ProcessInfo; exporter.Context.FileSystem.CheckinComment = App.Model.CheckinComment; exporter.Context.FileSystem.IntegrateWithTFSAndCheckInAutomatically = context.Config.IntegrateWithTFSAndCheckInAutomatically; if (Debugger.IsAttached) { exporter.Context.FileSystem.IntegrateWithTFSAndCheckInAutomatically = false; exporter.Context.FileSystem.IntegrateWithTFS = true; } exporter.Generate(); if (context.Errors.Any()) { context.ProcessInfo.Text = string.Join(Environment.NewLine, context.Errors); Thread.Sleep(TimeSpan.FromSeconds(2)); return; } OnProcessCompletedSuccessfully(); }
public ProfileGenerationProcess(string profileName) { refresher = new UIRefresher { Element = this }; ProfileName = profileName; Process = new ProcessContract(); InitializeComponent(); }
public SchemaGenerationProcess(string schemaName) { refresher = new UIRefresher { Element = this }; SchemaName = schemaName; Process = new ProcessContract(); InitializeComponent(); }
internal void StartProcess(ProcessTemplateContract procTemplate, string objectID, string[] userIds) { ProcessContract process = new ProcessContract(); //Create new emtpy ProcessContract process.ProcessTemplateId = procTemplate.Id; //Set processTemplateID process.DocumentIds = new string[1] { objectID }; process = processService.CreateProcess(ConnectionID, process); //Create Process //If there are custom userids, assign them to the current task. if (userIds.Count() > 0) { //Start the process with assignUsers = false. StartProcessResultContract startResult = processService.StartProcess(ConnectionID, process, false); process = startResult.Process; //Get CurrentTask if (process.CurrentTask != null) { //Assign new Users to task. process.CurrentTask.AssignedUserIds = userIds; //Update the process with assigned users, this will start the task automatically. processService.UpdateProcess(ConnectionID, process); } else { throw new Exception(string.Format("The process does not contain a task and could not be started!")); } } //If there are no special recipients just start the task with assignUsers = true //and the server will start the task with standard users defined in the ContractTemplate. else { processService.StartProcess(ConnectionID, process, true); } }
internal StartProcessResultContract StartProcess(string connectionId, ProcessContract process, bool assignUsers) { return(ProcessClient.StartProcess(connectionId, process, assignUsers)); }
internal ProcessContract ForwardTask(string connectionId, ProcessContract process, string[] userIds) { return(ProcessClient.ForwardTask(connectionId, process.Id, userIds)); }
internal ProcessContract UpdateProcess(string connectionId, ProcessContract process) { return(ProcessClient.UpdateProcess(connectionId, process)); }
public ProcessContract CreateProcess(string connectionId, ProcessContract process) { return(ProcessClient.CreateProcess(connectionId, process, false)); }
public GenerationProcess() { Process = new ProcessContract(); InitializeComponent(); }