protected virtual void AddRemindToken(IUser user)
 {
     if (WebConfigAppSettings.UseSSOModel)
     {
         this.Model.AprovePageInnerURL    = this.creator.AprovePageInnerURL;
         this.Model.AprovePageOuterURL    = this.creator.AprovePageOuterURL;
         this.Model.ProcessDetailInnerURL = this.creator.ProcessDetailInnerURL;
         this.Model.ProcessDetailOuterURL = this.creator.ProcessDetailOuterURL;
     }
     else
     {
         SysProcessRemindToken token = new SysProcessRemindToken {
             TokenId = this._manager.GetNextIdentity(),
             Token   = string.Format("{0}-{1}", Guid.NewGuid(), Guid.NewGuid()),
             UserId  = new int?(user.User_ID)
         };
         if (this.creator.WorkItem != null)
         {
             token.WorkItemId = new int?(this.creator.WorkItem.WorkItemId);
         }
         token.ProcessId  = this.creator.PI.ProcessId;
         token.ActivityId = this.creator.AI.ActivityId;
         token.FailTime   = new DateTime?(DateTime.Now.Date.AddDays(7.0));
         this._piCacheFactory.AddProcessRemindToken(token);
         string str  = ConfigurationManager.AppSettings["token_id"] ?? "token_id";
         string str2 = ConfigurationManager.AppSettings["token_value"] ?? "token_value";
         string str3 = string.Format("&{0}={1}&{2}={3}", new object[] { str, token.TokenId, str2, token.Token });
         if (!string.IsNullOrWhiteSpace(this.creator.AprovePageInnerURL))
         {
             this.Model.AprovePageInnerURL = string.Format("{0}{1}", this.creator.AprovePageInnerURL, str3);
         }
         if (!string.IsNullOrWhiteSpace(this.creator.AprovePageOuterURL))
         {
             this.Model.AprovePageOuterURL = string.Format("{0}{1}", this.creator.AprovePageOuterURL, str3);
         }
         if (!string.IsNullOrWhiteSpace(this.creator.ProcessDetailInnerURL))
         {
             this.Model.ProcessDetailInnerURL = string.Format("{0}{1}", this.creator.ProcessDetailInnerURL, str3);
         }
         if (!string.IsNullOrWhiteSpace(this.creator.ProcessDetailOuterURL))
         {
             this.Model.ProcessDetailOuterURL = string.Format("{0}{1}", this.creator.ProcessDetailOuterURL, str3);
         }
     }
 }
 public void AddProcessRemindToken(SysProcessRemindToken token)
 {
     this._context.Insert(token);
 }