Ejemplo n.º 1
0
        public WorkFlow CreateWorkFlow(string name, List<WorkFlowStep> steps)
        {
            WorkFlow w = new WorkFlow();

            w.Name = name;
            foreach( WorkFlowStep s in steps)
            {
                w.WorkFlowSteps.Add(s);
            }

            return w;
        }
Ejemplo n.º 2
0
        public void SaveWorkFlow(WorkFlow workflow)
        {
            try
            {
                ((DatabaseContext)this.Database).WorkFlows.AddObject(workflow);
            }catch{}
            ((DatabaseContext)this.Database).SaveChanges();

            ((DatabaseContext)this.Database).Refresh(System.Data.Objects.RefreshMode.StoreWins, workflow);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the WorkFlows EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWorkFlows(WorkFlow workFlow)
 {
     base.AddObject("WorkFlows", workFlow);
 }
Ejemplo n.º 4
0
        public WorkFlowStep GetCurrentWorkFlowStep(WorkFlow workflow)
        {
            foreach (WorkFlowStep s in workflow.WorkFlowSteps)
            {
                if (!s.IsComplete) return s;
            }

            return null;
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Create a new WorkFlow object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="lenderId">Initial value of the LenderId property.</param>
 /// <param name="folderId">Initial value of the FolderId property.</param>
 public static WorkFlow CreateWorkFlow(global::System.Int32 id, global::System.String name, global::System.Int32 lenderId, global::System.Int32 folderId)
 {
     WorkFlow workFlow = new WorkFlow();
     workFlow.Id = id;
     workFlow.Name = name;
     workFlow.LenderId = lenderId;
     workFlow.FolderId = folderId;
     return workFlow;
 }