public WorkflowCollection FetchAll()
 {
     WorkflowCollection coll = new WorkflowCollection();
     Query qry = new Query(Workflow.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Exemple #2
0
        public MainWindow()
        {
            InitializeComponent();

            var workflow = new WorkflowCollection();

            workflow.Add(new KanbanWorkflow()
            {
                Category = "Open", AllowedTransitions = { "InProgress", "Closed", "Closed NoChanges", "Won't Fix" }
            });
            workflow.Add(new KanbanWorkflow()
            {
                Category = "Postponed", AllowedTransitions = { "Open", "InProgress", "Closed", "Closed NoChanges", "Won't Fix" }
            });
            workflow.Add(new KanbanWorkflow()
            {
                Category = "Review", AllowedTransitions = { "InProgress", "Closed", "Postponed" }
            });

            workflow.Add(new KanbanWorkflow()
            {
                Category = "InProgress", AllowedTransitions = { "Review", "Postponed" }
            });

            Kanban.Workflows = workflow;
        }
Exemple #3
0
        // Guid AddWorkflow(string name, XContainer xDocument)
        Guid AddWorkflow(string name, XContainer xDocument, string pathToWorkflowFile)
        {
            var testLabName = xDocument.Descendants(LogicConstants.WorkflowLoader_TestWorkflow_TestLabNode).FirstOrDefault().Value;

            var testLab = string.IsNullOrEmpty(testLabName) ?
                          GetFirstTestLab() :
                          GetOrCreateTestLab(testLabName);

            // _workflow = new TestWorkflow(testLab) { Name = name };
            _workflow = new TestWorkflow(testLab)
            {
                Name = name, Path = pathToWorkflowFile
            };
            // 20150708
            // if there already is a workflow with the same name
            // merge the new one with the existing
            var replace = false || WorkflowCollection.Workflows.Any(wfl => wfl.Name == _workflow.Name && wfl.Path == _workflow.Path);

            if (replace)
            {
                WorkflowCollection.MergeWorkflow(_workflow);
            }
            else
            {
                WorkflowCollection.AddWorkflow(_workflow);
            }

            ServerObjectFactory.Resolve <TestWorkflowCollectionMethods>().SetDefaultWorkflow();
            return(_workflow.Id);
        }
Exemple #4
0
        IWorkflow GivenLoadedWorkflow(int id, string name)
        {
            var workflow = new TestWorkflow(TestLabCollection.TestLabs.First())
            {
                Name = name
            };

            WorkflowCollection.AddWorkflow(workflow);
            return(workflow);
        }
Exemple #5
0
        public Pizza_Hut()
        {
            this.InitializeComponent();
            var workflow = new WorkflowCollection();

            workflow.Add(new KanbanWorkflow()
            {
                Category = "Menu", AllowedTransitions = { "Dining", "Delivery" }
            });
            workflow.Add(new KanbanWorkflow()
            {
                Category = "Dining", AllowedTransitions = { "Ready to Serve" }
            });
            workflow.Add(new KanbanWorkflow()
            {
                Category = "Delivery", AllowedTransitions = { "Ready to Delivery" }
            });
            kanban.Workflows = workflow;
        }
 public WorkflowCollection FetchByQuery(Query qry)
 {
     WorkflowCollection coll = new WorkflowCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
 public WorkflowCollection FetchByID(object Id)
 {
     WorkflowCollection coll = new WorkflowCollection().Where("ID", Id).Load();
     return coll;
 }
Exemple #8
0
        public MainWindow()
        {
            InitializeComponent();
            var workflow = new WorkflowCollection();

            workflow.Add(new KanbanWorkflow()
            {
                Category = "Open", AllowedTransitions = { "InProgress", "Closed", "Closed NoChanges", "Won't Fix" }
            });
            workflow.Add(new KanbanWorkflow()
            {
                Category = "Postponed", AllowedTransitions = { "Open", "InProgress", "Closed", "Closed NoChanges", "Won't Fix" }
            });
            workflow.Add(new KanbanWorkflow()
            {
                Category = "Review", AllowedTransitions = { "InProgress", "Closed", "Postponed" }
            });
            workflow.Add(new KanbanWorkflow()
            {
                Category = "InProgress", AllowedTransitions = { "Review", "Postponed" }
            });

            Kanban.Workflows = workflow;

            SQLiteConnection Connection = new SQLiteConnection("Data Source=" + Environment.CurrentDirectory + Properties.Settings.Default.DBPath);

            Connection.Open();
            DataContext db = new DataContext(Connection);

            Table <TeamMember>      TeamMembers = db.GetTable <TeamMember>();
            IQueryable <TeamMember> tmmb        = (from tm in TeamMembers
                                                   where tm.TeamID == 1
                                                   select tm);


            foreach (TeamMember tm in tmmb)
            {
                try
                {
                    ComboBoxItem cbItm = new ComboBoxItem();
                    cbItm.Tag     = tm;
                    cbItm.Content = tm.Name;
                    TaskTeamMember.Items.Add(cbItm);
                }
                catch { }

                try
                {
                    ComboBoxItem cbItm = new ComboBoxItem();
                    cbItm.Tag     = tm;
                    cbItm.Content = tm.Name;
                    CardAuthorFilter.Items.Add(cbItm);
                }
                catch { }
            }

            Table <Sprint>      Sprints = db.GetTable <Sprint>();
            IQueryable <Sprint> sprts   = (from sp in Sprints
                                           select sp);

            foreach (Sprint sp in Sprints)
            {
                ComboBoxItem spItm = new ComboBoxItem();
                spItm.Tag     = sp;
                spItm.Content = "Sprint " + sp.ID.ToString() + " (" + sp.DateStart.ToString() + "-" + sp.DateEnd.ToString() + ")";
                SprintFilter.Items.Add(spItm);
            }
        }