public void Create(WfAbnormalType type) { this.abnormalAuditInst.Type = type; this.abnormalAuditInst.ReleaseType = WfReleaseType.NotReleased; this.SetContextData(); this.Store(); }
public void SetAbnormal(WfAbnormalType abnormal) { if ((this.Status == AssignStatusType.Accepted) || (this.Status == AssignStatusType.Not_Accepted)) { this.ChangeStatus(AssignStatusType.Abnormaled); this.ChangeStatus(abnormal); this.Store(); } }
public void ChangeStatus(WfAbnormalType abnormal) { this.wfAssigninst.AbnormalStatus = abnormal; if (abnormal == WfAbnormalType.SEND_BACKED) { WfMessageHelper.Send(this.wfAssigninst.StaffId, this.wfAssigninst.WfResinst.Actinst.Proinst.ProjectId, abnormal); } }
private void SetLowPriority(IDictionary<string, WorkItem> workItems, short priority, WfAbnormalType abnormalType) { foreach (WorkItem item in workItems.Values) { if (!StringHelper.IsNull(item.ProinstId)) { SmIdentity smIdentity = SecurityUtil.GetSmIdentity(); IList<WfAbnormalAuditInst> list = this.Dao.Query<WfAbnormalAuditInst>("GetProinstNotReleaseAblInst", new object[] { item.ProinstId, abnormalType, smIdentity.UserId }); if (list.Count == 1) { Proinst proinst = this.Dao.Load(typeof(Proinst), item.ProinstId) as Proinst; proinst.Priority = Convert.ToInt16((int) (proinst.Priority & priority)); this.Dao.Put(proinst, DAOType.UPDATE); WfAbnormalAuditInst inst = list[0]; inst.ReleaseStaffId = smIdentity.UserId; inst.ReleaseStaffName = smIdentity.UserName; inst.ReleaseTime = new DateTime?(DateTimeHelper.GetNow()); inst.ReleaseType = WfReleaseType.Resumed; this.Dao.Put(inst, DAOType.UPDATE); } } } }
private void SetHighPriority(IDictionary<string, WorkItem> workItems, short priority, WfAbnormalType abnormalType) { foreach (WorkItem item in workItems.Values) { if (!StringHelper.IsNull(item.ProinstId)) { Proinst proinst = this.Dao.Load(typeof(Proinst), item.ProinstId) as Proinst; if (proinst.Status == WfStatusType.WF_RUNNING) { if ((proinst.Priority & priority) == priority) { break; } proinst.Priority = Convert.ToInt16((int) (proinst.Priority | priority)); this.Dao.Put(proinst, DAOType.UPDATE); WfAbnormalAudit audit = new WfAbnormalAudit(); audit.CreateAbnormalAudit(proinst); audit.Create(abnormalType); } } } }
private void SetAssignAbnormaled(WfAbnormalType abnormal) { foreach (WfAssigninst assigninst in this.actinst.WfResinst.Assigns) { WfFactory.GetWfAssignment(assigninst).SetAbnormal(abnormal); } }