Esempio n. 1
0
 /// <summary>
 /// 设置任务状态
 /// </summary>
 /// <param name="task"></param>
 /// <param name="logonUser"></param>
 /// <param name="taskState"></param>
 /// <param name="session"></param>
 private void SetTaskState(TaskEntity task,
     string userID,
     string userName,
     TaskStateEnum taskState,
     IDbSession session)
 {
     task.TaskState = (short)taskState;
     task.LastUpdatedByUserID = userID;
     task.LastUpdatedByUserName = userName;
     task.LastUpdatedDateTime = System.DateTime.Now;
     Update(task, session);
 }
Esempio n. 2
0
 /// <summary>
 /// 更新任务数据
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="wfLinqDataContext"></param>
 internal void Update(TaskEntity entity, IDbSession session)
 {
     Repository.Update(session.Connection, entity, session.Transaction);
 }
Esempio n. 3
0
 /// <summary>
 /// 插入任务数据(创建任务)
 /// </summary>
 /// <param name="activityInstance"></param>
 /// <param name="performerID"></param>
 /// <param name="performerName"></param>
 /// <param name="runnerID"></param>
 /// <param name="runnerName"></param>
 /// <param name="session"></param>
 private void Insert(ActivityInstanceEntity activityInstance,
     string performerID,
     string performerName,
     string runnerID,
     string runnerName,
     IDbSession session)
 {
     TaskEntity entity = new TaskEntity();
     entity.AppName = activityInstance.AppName;
     entity.AppInstanceID = activityInstance.AppInstanceID;
     entity.ActivityInstanceID = activityInstance.ID;
     entity.ProcessInstanceID = activityInstance.ProcessInstanceID;
     entity.ActivityGUID = activityInstance.ActivityGUID;
     entity.ActivityName = activityInstance.ActivityName;
     entity.ProcessGUID = activityInstance.ProcessGUID;
     entity.TaskType = (short)TaskTypeEnum.Manual;
     entity.AssignedToUserID = performerID;
     entity.AssignedToUserName = performerName;
     entity.TaskState = 1; //1-待办状态
     entity.CreatedByUserID = runnerID;
     entity.CreatedByUserName = runnerName;
     entity.CreatedDateTime = System.DateTime.Now;
     entity.RecordStatusInvalid = 0;
     //插入任务数据
     Insert(entity, session);
 }
Esempio n. 4
0
 /// <summary>
 /// 插入任务数据
 /// </summary>
 /// <param name="entity">任务实体</param>
 /// <param name="wfLinqDataContext">linq上下文</param>
 internal void Insert(TaskEntity entity, 
     IDbSession session)
 {
     int result = Repository.Insert(session.Connection, entity, session.Transaction);
     Debug.WriteLine(string.Format("task instance inserted, time:{0}", System.DateTime.Now.ToString()));
 }