public WfAssignment(IWfResource wfresource, string staffid, string staffname)
 {
     this.wfResource = wfresource;
     this.wfAssigninst = new WfAssigninst();
     this.wfAssigninst.WfResinst = wfresource.GetWfResinst();
     this.wfAssigninst.WfResinst.Assigns.Add(this.wfAssigninst);
     this.wfAssigninst.AbnormalStatus = WfAbnormalType.NO_ABNORMAL;
     this.wfAssigninst.FromDate = new DateTime?(DateTimeHelper.GetNow());
     this.wfAssigninst.StaffId = staffid;
     this.wfAssigninst.StaffName = staffname;
     this.ChangeStatus(AssignStatusType.Not_Accepted);
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="acDomain"></param>
 /// <param name="acts"></param>
 /// <param name="actor"></param>
 /// <param name="name"></param>
 public WfAct(IAcDomain acDomain, IStackTrace acts, IWfResource actor, string name)
 {
     if (actor == null)
     {
         throw new ArgumentNullException("actor");
     }
     if (acDomain == null)
     {
         throw new ArgumentNullException("acDomain");
     }
     this._acDomain = acDomain;
     if (acDomain.Config.TraceIsEnabled)
     {
         this.ActorId   = actor.Id;
         this.ActorName = actor.Name;
         this.ActorType = actor.BuiltInResourceKind.ToName();
         this.ActingOn  = DateTime.Now;
         this.Name      = name;
         acts.Trace(this);
     }
 }
Exemple #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="acDomain"></param>
 /// <param name="acts"></param>
 /// <param name="actor"></param>
 /// <param name="name"></param>
 public WfAct(IAcDomain acDomain, IStackTrace acts, IWfResource actor, string name)
 {
     if (actor == null)
     {
         throw new ArgumentNullException("actor");
     }
     if (acDomain == null)
     {
         throw new ArgumentNullException("acDomain");
     }
     this._acDomain = acDomain;
     if (acDomain.Config.TraceIsEnabled)
     {
         this.ActorId = actor.Id;
         this.ActorName = actor.Name;
         this.ActorType = actor.BuiltInResourceKind.ToName();
         this.ActingOn = DateTime.Now;
         this.Name = name;
         acts.Trace(this);
     }
 }
Exemple #4
0
 public static IWfAssignment GetWfAssignment(IWfResource wfresource)
 {
     if (wfresource == null)
     {
         throw new WfException("WfResource cannot be null");
     }
     return new WfAssignment(wfresource);
 }
Exemple #5
0
 public static IWfAssignment GetWfAssignment(IWfResource wfresource, string staffid, string staffname)
 {
     if (wfresource == null)
     {
         throw new WfException("WfResource cannot be null");
     }
     if (StringHelper.IsNull(staffid) || StringHelper.IsNull(staffname))
     {
         throw new WfException("Staff cannot be null");
     }
     return new WfAssignment(wfresource, staffid, staffname);
 }
 public WfAssignment(WfAssigninst wfassigninst)
 {
     this.wfAssigninst = wfassigninst;
     this.wfResource = WfFactory.GetWfResource(this.wfAssigninst.WfResinst);
 }
 public WfAssignment(IWfResource wfresource)
     : this(wfresource, null, null)
 {
 }