コード例 #1
0
 /// <summary>
 /// Handles the Edit event of the gWorkflows control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param>
 protected void gWorkflows_Edit( object sender, RowEventArgs e )
 {
     var workflow = new WorkflowService( new RockContext() ).Get( e.RowKeyId );
     if ( workflow != null )
     {
         if ( workflow.HasActiveEntryForm( CurrentPerson ) )
         {
             var qryParam = new Dictionary<string, string>();
             qryParam.Add( "WorkflowTypeId", workflow.WorkflowTypeId.ToString() );
             qryParam.Add( "WorkflowId", workflow.Id.ToString() );
             NavigateToLinkedPage( "EntryPage", qryParam );
         }
         else
         {
             NavigateToLinkedPage( "DetailPage", "workflowId", e.RowKeyId );
         }
     }
 }