Exemplo n.º 1
0
 private void InsertOrders()
 {
     for (int i = 0; i < 100; i++)
     {
         insertIDAt++;
         using (QuickData Query = new QuickData())
         {
             QDInserter ins = new QDInserter("WFInstances");
             ins.insert("InstanceKey", "P" + insertIDAt.ToString(), Types.String);
             ins.insert("Status", "pending", Types.String);
             ins.insert("WFType", "P", Types.String);
             Query.insert(ins);
         }
     }
     Console.WriteLine("Orders Inserted");
 }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            //Initialize a new controller
            ValkyrieController.Initialize(new SQLServerDBHandler());
            using (QuickData Query = new QuickData())
            {
                Query.delete("delete from WFInstances");
                Query.insert("DBCC CHECKIDENT (WFInstances, RESEED, 1)");
                Query.delete("delete from StepStatus");
                Query.delete("delete from PendingStatusUpdates");
                Query.insert("DBCC CHECKIDENT (PendingStatusUpdates, RESEED, 1)");
            }
            //create a new step handler
            ValkProcessorStepHandler StepHandler = new ValkProcessorStepHandler();

            //register step handler with a static processor
            ValkProcessor.AddStepHandler(StepHandler);
            //kickoff processor
            Thread Processor = new Thread(new ThreadStart(ValkProcessor.RunProcessor));

            Processor.Start();
        }