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; }
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); }
/// <summary> /// Deprecated Method for adding a new object to the WorkFlows EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToWorkFlows(WorkFlow workFlow) { base.AddObject("WorkFlows", workFlow); }
public WorkFlowStep GetCurrentWorkFlowStep(WorkFlow workflow) { foreach (WorkFlowStep s in workflow.WorkFlowSteps) { if (!s.IsComplete) return s; } return null; }
/// <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; }