public WfAbnormalAudit(WfAssigninst assign) { this.dao = DaoUtil.GetDaoInstance("SkyMap.Net.Workflow"); this.abnormalAuditInst = new WfAbnormalAuditInst(); this.abnormalAuditInst.AssignId = assign.Id; this.abnormalAuditInst.ProinstId = assign.WfResinst.Actinst.Proinst.Id; this.abnormalAuditInst.ProinstName = assign.WfResinst.Actinst.Proinst.Name; this.abnormalAuditInst.ActinstId = assign.WfResinst.Id; this.abnormalAuditInst.ActinstName = assign.WfResinst.Actinst.Name; this.abnormalAuditInst.TimeStamp = new DateTime?(DateTimeHelper.GetNow()); this.abnormalAuditInst.NeedDecision = false; this.abnormalAuditInst.OpStaffId = assign.StaffId; this.abnormalAuditInst.OpStaffName = assign.StaffName; }
public WfAbnormalAudit(WorkItem workItem) { this.dao = DaoUtil.GetDaoInstance("SkyMap.Net.Workflow"); string abnormalAuditId = workItem.AbnormalAuditId; if (StringHelper.IsNull(abnormalAuditId)) { this.CreateAbnormalAudit(workItem); } else { this.abnormalAuditInst = this.dao.Load(typeof(WfAbnormalAuditInst), abnormalAuditId) as WfAbnormalAuditInst; if (this.abnormalAuditInst == null) { throw new WfException("Cannot load the AbnormalAudit:" + workItem.AbnormalAuditId); } } }
private void OnDelete(IDA0 dao) { string fromActinstId = this.wfResinst.FromActinstId; if (fromActinstId.IndexOf(',') > 0) { throw new CannotCallBackException("不能撤回多个分支到发送任务"); } Actinst from = dao.Load(typeof(Actinst), fromActinstId) as Actinst; if (from == null) { throw new CannotCallBackException("不能找到前一步环节任务"); } this.RefreshFrom(from); this.DeleteToInstance(from, this.wfResinst.Actinst, dao); }
private void DeleteToInstance(Actinst from, Actinst to, IDA0 dao) { Actinst actinst = to; do { IEnumerator<WfRouteInst> enumerator = actinst.RouteToMe.GetEnumerator(); enumerator.MoveNext(); WfRouteInst current = enumerator.Current; dao.Put(actinst, DAOType.DELETE); actinst = current.From; if ((actinst.FromCount > 1) || (actinst.ToCount > 1)) { throw new CannotCallBackException("Cannot call a 'multi branch or multi branch' instance:" + actinst.Id); } } while (actinst.Id != from.Id); }
public WfAbnormalAudit(WfAbnormalAuditInst instance) { this.dao = DaoUtil.GetDaoInstance("SkyMap.Net.Workflow"); this.abnormalAuditInst = instance; }
public WfAbnormalAudit() { this.dao = DaoUtil.GetDaoInstance("SkyMap.Net.Workflow"); this.abnormalAuditInst = new WfAbnormalAuditInst(); this.abnormalAuditInst.TimeStamp = new DateTime?(DateTimeHelper.GetNow()); }