Пример #1
0
 /// <summary>
 /// Create a new DgProject object.
 /// </summary>
 /// <param name="projectId">Initial value of the ProjectId property.</param>
 /// <param name="projectName">Initial value of the ProjectName property.</param>
 /// <param name="flowState">Initial value of the FlowState property.</param>
 public static DgProject CreateDgProject(global::System.Int32 projectId, global::System.String projectName, global::System.Int32 flowState)
 {
     DgProject dgProject = new DgProject();
     dgProject.ProjectId = projectId;
     dgProject.ProjectName = projectName;
     dgProject.FlowState = flowState;
     return dgProject;
 }
Пример #2
0
 /// <summary>
 /// 处理流程流转发送逻辑
 /// </summary>
 /// <param name="dgProject">待发送得项目</param>
 /// <param name="_action">目标节点</param>
 /// <param name="_todoby">目标处理岗位人员</param>
 private void SetNextStep(DgProject dgProject, FlowAction _action, int _todoby)
 {
     var fromlog = dgProject.FlowLogs.SingleOrDefault(x => x.LogStep == _action.FromStep && x.ActiveFlag.Value);
     fromlog.Enddate = DateTime.Now;
     fromlog.ActiveFlag = false; // set the activeflag
     if (_action.DestStep.StepType.Value != 2)
         dgProject.FlowLogs.Add(new FlowLog()
         {
             Startdate = DateTime.Now,
             ToDoby = _todoby,
             ProjectId = dgProject.ProjectId,
             LogStep = _action.ToStep,
             ActiveFlag = true
         });
     dgProject.FlowState = _action.ToStep;
     _entities.SaveChanges();
 }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the DgProjects EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDgProjects(DgProject dgProject)
 {
     base.AddObject("DgProjects", dgProject);
 }