357 lines
5.9 KiB
C#
357 lines
5.9 KiB
C#
using Microsoft.SharePoint;
|
|
using System;
|
|
namespace SPSolutions.SharePoint.Workflow
|
|
{
|
|
public class SPWorkflowAssociationParameters
|
|
{
|
|
private string _addToStatusMenu;
|
|
private bool _allowManual;
|
|
private bool _autoStartCreate;
|
|
private bool _autoStartChange;
|
|
private string _contentType;
|
|
private SPContentTypeId _contentTypeId;
|
|
private string _guidAssoc;
|
|
private string _historyList;
|
|
private Guid _historyListId;
|
|
private string _historyListName;
|
|
private bool _isNewHistoryList;
|
|
private bool _isNewTaskList;
|
|
private bool _isNewWorkflowAssociation;
|
|
private string _list;
|
|
private Guid _listId;
|
|
private string _id;
|
|
private int _listItemId;
|
|
private string _roleSelect;
|
|
private bool _setDefault;
|
|
private string _taskList;
|
|
private Guid _taskListId;
|
|
private string _taskListName;
|
|
private string _templateId;
|
|
private bool _updateLists;
|
|
private Guid _workflowAssociationId;
|
|
private string _workflowDefinition;
|
|
private string _workflowName;
|
|
private Guid _workflowTemplateId;
|
|
public string AddToStatusMenu
|
|
{
|
|
get
|
|
{
|
|
return this._addToStatusMenu;
|
|
}
|
|
set
|
|
{
|
|
this._addToStatusMenu = value;
|
|
}
|
|
}
|
|
public bool AllowManual
|
|
{
|
|
get
|
|
{
|
|
return this._allowManual;
|
|
}
|
|
set
|
|
{
|
|
this._allowManual = value;
|
|
}
|
|
}
|
|
public bool AutoStartChange
|
|
{
|
|
get
|
|
{
|
|
return this._autoStartChange;
|
|
}
|
|
set
|
|
{
|
|
this._autoStartChange = value;
|
|
}
|
|
}
|
|
public bool AutoStartCreate
|
|
{
|
|
get
|
|
{
|
|
return this._autoStartCreate;
|
|
}
|
|
set
|
|
{
|
|
this._autoStartCreate = value;
|
|
}
|
|
}
|
|
public string ContentType
|
|
{
|
|
get
|
|
{
|
|
return this._contentType;
|
|
}
|
|
set
|
|
{
|
|
this._contentType = value;
|
|
this._contentTypeId = ((!string.IsNullOrEmpty(this._contentType)) ? new SPContentTypeId(this._contentType) : SPContentTypeId.Empty);
|
|
}
|
|
}
|
|
public SPContentTypeId ContentTypeId
|
|
{
|
|
get
|
|
{
|
|
return this._contentTypeId;
|
|
}
|
|
set
|
|
{
|
|
this._contentTypeId = value;
|
|
}
|
|
}
|
|
public string GuidAssociation
|
|
{
|
|
get
|
|
{
|
|
return this._guidAssoc;
|
|
}
|
|
set
|
|
{
|
|
this._guidAssoc = value;
|
|
this._workflowAssociationId = ((!string.IsNullOrEmpty(this._guidAssoc)) ? new Guid(this._guidAssoc) : Guid.Empty);
|
|
if (this._workflowAssociationId == Guid.Empty)
|
|
{
|
|
this._isNewWorkflowAssociation = true;
|
|
return;
|
|
}
|
|
this._isNewWorkflowAssociation = false;
|
|
}
|
|
}
|
|
public string HistoryList
|
|
{
|
|
get
|
|
{
|
|
return this._historyList;
|
|
}
|
|
set
|
|
{
|
|
this._historyList = value;
|
|
this._historyListId = Guid.Empty;
|
|
this._historyListName = null;
|
|
if (string.IsNullOrEmpty(this._historyList))
|
|
{
|
|
return;
|
|
}
|
|
if (this._historyList[0] == 'z')
|
|
{
|
|
this._historyListName = this._historyList.Substring(1);
|
|
this._isNewHistoryList = true;
|
|
return;
|
|
}
|
|
this._historyListId = new Guid(this._historyList);
|
|
this._isNewHistoryList = false;
|
|
}
|
|
}
|
|
public Guid HistoryListId
|
|
{
|
|
get
|
|
{
|
|
return this._historyListId;
|
|
}
|
|
}
|
|
public string HistoryListName
|
|
{
|
|
get
|
|
{
|
|
return this._historyListName;
|
|
}
|
|
}
|
|
public bool IsNewHistoryList
|
|
{
|
|
get
|
|
{
|
|
return this._isNewHistoryList;
|
|
}
|
|
}
|
|
public bool IsNewTaskList
|
|
{
|
|
get
|
|
{
|
|
return this._isNewTaskList;
|
|
}
|
|
}
|
|
public bool IsNewWorkflowAssociation
|
|
{
|
|
get
|
|
{
|
|
return this._isNewWorkflowAssociation;
|
|
}
|
|
}
|
|
public string List
|
|
{
|
|
get
|
|
{
|
|
return this._list;
|
|
}
|
|
set
|
|
{
|
|
this._list = value;
|
|
this._listId = ((!string.IsNullOrEmpty(this._list)) ? new Guid(this._list) : Guid.Empty);
|
|
}
|
|
}
|
|
public Guid ListId
|
|
{
|
|
get
|
|
{
|
|
return this._listId;
|
|
}
|
|
set
|
|
{
|
|
this._listId = value;
|
|
}
|
|
}
|
|
public string ID
|
|
{
|
|
get
|
|
{
|
|
return this._id;
|
|
}
|
|
set
|
|
{
|
|
this._id = value;
|
|
this._listItemId = ((!string.IsNullOrEmpty(this._id)) ? Convert.ToInt32(this._id) : 0);
|
|
}
|
|
}
|
|
public int ListItemId
|
|
{
|
|
get
|
|
{
|
|
return this._listItemId;
|
|
}
|
|
set
|
|
{
|
|
this._listItemId = value;
|
|
}
|
|
}
|
|
public string RoleSelect
|
|
{
|
|
get
|
|
{
|
|
return this._roleSelect;
|
|
}
|
|
set
|
|
{
|
|
this._roleSelect = value;
|
|
}
|
|
}
|
|
public bool SetDefault
|
|
{
|
|
get
|
|
{
|
|
return this._setDefault;
|
|
}
|
|
set
|
|
{
|
|
this._setDefault = value;
|
|
}
|
|
}
|
|
public string TaskList
|
|
{
|
|
get
|
|
{
|
|
return this._taskList;
|
|
}
|
|
set
|
|
{
|
|
this._taskList = value;
|
|
this._taskListId = Guid.Empty;
|
|
this._taskListName = null;
|
|
if (string.IsNullOrEmpty(this._taskList))
|
|
{
|
|
return;
|
|
}
|
|
if (this._taskList[0] == 'z')
|
|
{
|
|
this._taskListName = this._taskList.Substring(1);
|
|
this._isNewTaskList = true;
|
|
return;
|
|
}
|
|
this._taskListId = new Guid(this._taskList);
|
|
this._isNewTaskList = false;
|
|
}
|
|
}
|
|
public Guid TaskListId
|
|
{
|
|
get
|
|
{
|
|
return this._taskListId;
|
|
}
|
|
}
|
|
public string TaskListName
|
|
{
|
|
get
|
|
{
|
|
return this._taskListName;
|
|
}
|
|
}
|
|
public string TemplateId
|
|
{
|
|
get
|
|
{
|
|
return this._templateId;
|
|
}
|
|
set
|
|
{
|
|
this._templateId = value;
|
|
this._workflowAssociationId = ((!string.IsNullOrEmpty(this._templateId)) ? new Guid(this._templateId) : Guid.Empty);
|
|
}
|
|
}
|
|
public bool UpdateLists
|
|
{
|
|
get
|
|
{
|
|
return this._updateLists;
|
|
}
|
|
set
|
|
{
|
|
this._updateLists = value;
|
|
}
|
|
}
|
|
public Guid WorkflowAssociationId
|
|
{
|
|
get
|
|
{
|
|
return this._workflowAssociationId;
|
|
}
|
|
set
|
|
{
|
|
this._workflowAssociationId = value;
|
|
}
|
|
}
|
|
public string WorkflowDefinition
|
|
{
|
|
get
|
|
{
|
|
return this._workflowDefinition;
|
|
}
|
|
set
|
|
{
|
|
this._workflowDefinition = value;
|
|
this._workflowTemplateId = ((!string.IsNullOrEmpty(this._workflowDefinition)) ? new Guid(this._workflowDefinition) : Guid.Empty);
|
|
}
|
|
}
|
|
public string WorkflowName
|
|
{
|
|
get
|
|
{
|
|
return this._workflowName;
|
|
}
|
|
set
|
|
{
|
|
this._workflowName = value;
|
|
}
|
|
}
|
|
public Guid WorkflowTemplateId
|
|
{
|
|
get
|
|
{
|
|
return this._workflowTemplateId;
|
|
}
|
|
set
|
|
{
|
|
this._workflowTemplateId = value;
|
|
}
|
|
}
|
|
}
|
|
}
|