本文整理汇总了C#中System.Workflow.Activities.ConditionalEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ConditionalEventArgs类的具体用法?C# ConditionalEventArgs怎么用?C# ConditionalEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConditionalEventArgs类属于System.Workflow.Activities命名空间,在下文中一共展示了ConditionalEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HasDataReferences
private void HasDataReferences(object sender, ConditionalEventArgs e)
{
IPage page = GetPage();
Type folderType = GetFolderType();
IEnumerable<IData> dataToDelete = page.GetFolderData(folderType);
var brokenReferences = new List<IData>();
foreach (var data in dataToDelete)
{
var references = DataReferenceFacade.GetNotOptionalReferences(data);
foreach (var reference in references)
{
DataSourceId dataSourceId = reference.DataSourceId;
if (brokenReferences.Any(brokenRef => brokenRef.DataSourceId.Equals(dataSourceId))
|| dataToDelete.Any(elem => elem.DataSourceId.Equals(dataSourceId)))
{
continue;
}
brokenReferences.Add(reference);
}
}
e.Result = brokenReferences.Count > 0;
if (brokenReferences.Count == 0)
{
return;
}
Bindings.Add("ReferencedData", DataReferenceFacade.GetBrokenReferencesReport(brokenReferences));
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:33,代码来源:DeleteDataFolderWorkflow.cs
示例2: ValidateBindings
private void ValidateBindings(object sender, ConditionalEventArgs e)
{
IPageTypeMetaDataTypeLink pageTypeMetaDataTypeLink = this.GetDataItemFromEntityToken<IPageTypeMetaDataTypeLink>();
IPageMetaDataDefinition pageMetaDataDefinition = PageMetaDataFacade.GetMetaDataDefinition(pageTypeMetaDataTypeLink.PageTypeId, pageTypeMetaDataTypeLink.Name);
string metaDataDescriptionLabel = this.GetBinding<string>("CompositionDescriptionLabel");
Guid containerId = this.GetBinding<Guid>("CompositionContainerId");
e.Result = true;
if (pageMetaDataDefinition.Label != metaDataDescriptionLabel)
{
if (PageMetaDataFacade.IsDefinitionAllowed(pageTypeMetaDataTypeLink.PageTypeId, pageMetaDataDefinition.Name, metaDataDescriptionLabel, pageMetaDataDefinition.MetaDataTypeId) == false)
{
this.ShowFieldMessage("CompositionDescriptionLabel", GetText("PageType.EditPageTypeMetaDataFieldWorkflow.ValidationError.MetaDataFieldNameAlreadyUsed"));
SetSaveStatus(false);
e.Result = false;
}
}
if (pageMetaDataDefinition.MetaDataContainerId != containerId)
{
if (PageMetaDataFacade.IsNewContainerIdAllowed(pageTypeMetaDataTypeLink.PageTypeId, pageMetaDataDefinition.Name, containerId) == false)
{
this.ShowFieldMessage("CompositionContainerId", GetText("PageType.EditPageTypeMetaDataFieldWorkflow.ValidationError.MetaDataContainerChangeNotAllowed"));
SetSaveStatus(false);
e.Result = false;
}
}
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:31,代码来源:EditPageTypeMetaDataFieldWorkflow.cs
示例3: ValidateReferencingProperties
private void ValidateReferencingProperties(object sender, ConditionalEventArgs e)
{
var dataEntityToken = (DataEntityToken)this.EntityToken;
var data = dataEntityToken.Data as ILocalizedControlled;
IEnumerable<ReferenceFailingPropertyInfo> referenceFailingProperties = DataLocalizationFacade.GetReferencingLocalizeFailingProperties(data).Evaluate();
if (referenceFailingProperties.Any(f => f.OptionalReferenceWithValue == false))
{
List<string> row = new List<string>();
row.Add(StringResourceSystemFacade.GetString("Composite.C1Console.Trees", "LocalizeData.ShowError.Description"));
foreach (ReferenceFailingPropertyInfo referenceFailingPropertyInfo in referenceFailingProperties.Where(f => f.OptionalReferenceWithValue == false))
{
row.Add(string.Format(StringResourceSystemFacade.GetString("Composite.C1Console.Trees", "LocalizeData.ShowError.FieldErrorFormat"), referenceFailingPropertyInfo.DataFieldDescriptor.Name, referenceFailingPropertyInfo.ReferencedType.GetTypeTitle(), referenceFailingPropertyInfo.OriginLocaleDataValue.GetLabel()));
}
List<List<string>> rows = new List<List<string>> { row };
this.UpdateBinding("ErrorHeader", new List<string> { "Fields" });
this.UpdateBinding("Errors", rows);
e.Result = false;
}
else
{
e.Result = true;
}
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:30,代码来源:LocalizeDataWorkflow.cs
示例4: HasDataReferences
private void HasDataReferences(object sender, ConditionalEventArgs e)
{
IData data = ((DataEntityToken)this.EntityToken).Data;
this.Bindings.Add("Text", string.Format("{0}: {1}", Composite.Core.ResourceSystem.StringResourceSystemFacade.GetString("Composite.C1Console.Trees", "TreeGenericDeleteConfirm.Text"), data.GetLabel()));
var brokenReferences = new List<IData>();
List<IData> references = DataReferenceFacade.GetNotOptionalReferences(data);
foreach (IData reference in references)
{
DataSourceId dataSourceId = reference.DataSourceId;
if (brokenReferences.Any(brokenRef => brokenRef.DataSourceId == dataSourceId))
{
continue;
}
brokenReferences.Add(reference);
}
e.Result = brokenReferences.Count > 0;
if (brokenReferences.Count == 0)
{
return;
}
Bindings.Add("ReferencedData", DataReferenceFacade.GetBrokenReferencesReport(brokenReferences));
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:28,代码来源:GenericDeleteDataWorkflow.cs
示例5: ValidateInputs
private void ValidateInputs(object sender, ConditionalEventArgs e)
{
IMediaFileFolder folder = this.GetDataItemFromEntityToken<IMediaFileFolder>();
string oldFolderPath = this.GetBinding<string>("OldFolderPath");
string folderPath = CreateFolderPath();
if (oldFolderPath != folderPath)
{
Guid folderId = folder.Id;
if (DataFacade.GetData<IMediaFileFolder>()
.Any(f => string.Compare(f.Path, folderPath, StringComparison.OrdinalIgnoreCase) == 0
&& f.Id != folderId))
{
ShowFieldMessage("FolderName", StringResourceSystemFacade.GetString("Composite.Management", "Website.Forms.Administrative.AddNewMediaFolder.FolderNameAlreadyUsed"));
e.Result = false;
return;
}
IEnumerable<string> filenames = DataFacade.GetData<IMediaFile>().Where(f => f.FolderPath == oldFolderPath).Select(f => f.FileName);
foreach (string filename in filenames)
{
string compositePath = IMediaFileExtensions.GetCompositePath(folder.StoreId, folderPath, filename);
if (compositePath.Length > 2048)
{
this.ShowFieldMessage("FolderName", "${Composite.Management, Website.Forms.Administrative.EditMediaFolder.TotalFilenameToLong.Message}");
e.Result = false;
return;
}
}
}
e.Result = true;
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:35,代码来源:EditMediaFolderWorkflow.cs
示例6: CheckDeposit
private void CheckDeposit(object sender, ConditionalEventArgs e)
{
// Go into the deposit activity if user selects 1.
e.Result = (serviceValue == 1);
}
开发者ID:ssickles,项目名称:archive,代码行数:7,代码来源:BankMachineWorkflow.cs
示例7: ValidateLocalizeProcess
private void ValidateLocalizeProcess(object sender, ConditionalEventArgs e)
{
DataEntityToken dataEntityToken = (DataEntityToken)this.EntityToken;
ILocalizedControlled data = dataEntityToken.Data as ILocalizedControlled;
IEnumerable<ReferenceFailingPropertyInfo> referenceFailingPropertyInfos = DataLocalizationFacade.GetReferencingLocalizeFailingProperties(data).Evaluate();
if (referenceFailingPropertyInfos.Any(f => f.OptionalReferenceWithValue == false))
{
List<string> row = new List<string>();
row.Add(Texts.LocalizeDataWorkflow_ShowError_Description);
foreach (ReferenceFailingPropertyInfo referenceFailingPropertyInfo in referenceFailingPropertyInfos.Where(f => f.OptionalReferenceWithValue == false))
{
row.Add(Texts.LocalizeDataWorkflow_ShowError_FieldErrorFormat(
referenceFailingPropertyInfo.DataFieldDescriptor.Name,
referenceFailingPropertyInfo.ReferencedType.GetTypeTitle(),
referenceFailingPropertyInfo.OriginLocaleDataValue.GetLabel()));
}
List<List<string>> rows = new List<List<string>> { row };
this.UpdateBinding("ErrorHeader", new List<string> { "Fields" });
this.UpdateBinding("Errors", rows);
e.Result = false;
}
else
{
e.Result = true;
}
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:33,代码来源:LocalizeDataWorkflow.cs
示例8: isKlientExist
private void isKlientExist(object sender, ConditionalEventArgs e)
{
if (klientIndex < aKlienci.Length)
e.Result = true;
else
e.Result = false;
}
开发者ID:fraczo,项目名称:Biuromagda,代码行数:7,代码来源:GenerujRejestry_StratyZLatUbieglych.cs
示例9: Evaluate
public override bool Evaluate(Activity ownerActivity, IServiceProvider provider)
{
if (provider == null)
{
throw new ArgumentNullException("provider");
}
ConditionalEventArgs e = new ConditionalEventArgs();
EventHandler<ConditionalEventArgs>[] invocationList = base.GetInvocationList<EventHandler<ConditionalEventArgs>>(ConditionEvent);
IWorkflowDebuggerService service = provider.GetService(typeof(IWorkflowDebuggerService)) as IWorkflowDebuggerService;
if (invocationList != null)
{
foreach (EventHandler<ConditionalEventArgs> handler in invocationList)
{
if (service != null)
{
service.NotifyHandlerInvoking(handler);
}
handler(ownerActivity, e);
if (service != null)
{
service.NotifyHandlerInvoked();
}
}
}
return e.Result;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:CodeCondition.cs
示例10: HasDataReferences
private void HasDataReferences(object sender, ConditionalEventArgs e)
{
IData data = ((DataEntityToken)this.EntityToken).Data;
var brokenReferences = new List<IData>();
var references = DataReferenceFacade.GetNotOptionalReferences(data);
foreach (var reference in references)
{
DataSourceId referenceDataSourceId = reference.DataSourceId;
if (brokenReferences.Any(brokenRef => brokenRef.DataSourceId == referenceDataSourceId))
{
continue;
}
brokenReferences.Add(reference);
}
e.Result = brokenReferences.Count > 0;
if (brokenReferences.Count == 0)
{
return;
}
Bindings.Add("ReferencedData", DataReferenceFacade.GetBrokenReferencesReport(brokenReferences));
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:26,代码来源:DeleteDataWorkflow.cs
示例11: IsTE
//#region public properties
//public string UserName
//{
// get { return userName; }
// set { userName = value; }
//}
//public string UserTE
//{
// get { return userTE; }
// set { userTE = value; }
//}
//public string ReclaimType
//{
// get { return reclaimType; }
// set { reclaimType = value; }
//}
//public string ReclaimObservations
//{
// get { return reclaimObservations; }
// set { reclaimObservations = value; }
//}
//#endregion
private void IsTE(object sender, ConditionalEventArgs e)
{
if (reclaimType == "TE")
e.Result = true;
else
e.Result = false;
}
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:35,代码来源:wfIntegrationAndRouting.cs
示例12: CheckEmployeementHistory
private void CheckEmployeementHistory(object sender, ConditionalEventArgs e)
{
string sEmpHistory = "";
sEmpHistory = workflowProperties.Item["Employment History"].ToString();
if (sEmpHistory.Trim().ToLower() == "good")
e.Result = true;
}
开发者ID:rajabanda,项目名称:SharePointWorkflows,代码行数:7,代码来源:Workflow1.cs
示例13: Evaluate
public override bool Evaluate(Activity ownerActivity, IServiceProvider provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
ConditionalEventArgs eventArgs = new ConditionalEventArgs();
EventHandler<ConditionalEventArgs>[] eventHandlers = base.GetInvocationList<EventHandler<ConditionalEventArgs>>(CodeCondition.ConditionEvent);
IWorkflowDebuggerService workflowDebuggerService = provider.GetService(typeof(IWorkflowDebuggerService)) as IWorkflowDebuggerService;
if (eventHandlers != null)
{
foreach (EventHandler<ConditionalEventArgs> eventHandler in eventHandlers)
{
if (workflowDebuggerService != null)
workflowDebuggerService.NotifyHandlerInvoking(eventHandler);
eventHandler(ownerActivity, eventArgs);
if (workflowDebuggerService != null)
workflowDebuggerService.NotifyHandlerInvoked();
}
}
return eventArgs.Result;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:26,代码来源:CodeExpressionRuleDeclaration.cs
示例14: CultureHasChanged
private void CultureHasChanged(object sender, ConditionalEventArgs e)
{
string cultureName = this.GetBinding<string>("CultureName");
string c1ConsoleUiLanguageName = this.GetBinding<string>("C1ConsoleUiLanguageName");
e.Result = UserSettings.CultureInfo.Name != cultureName || UserSettings.C1ConsoleUiLanguage.Name != c1ConsoleUiLanguageName;
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:7,代码来源:ChangeOwnCultureWorkflow.cs
示例15: ValidateInputs
private void ValidateInputs(object sender, ConditionalEventArgs e)
{
IMediaFile file = this.GetDataItemFromEntityToken<IMediaFile>();
string filename = this.GetBinding<string>("FileDataFileName");
string compositePath = IMediaFileExtensions.GetCompositePath(file.StoreId, file.FolderPath, filename);
if (compositePath.Length > 2048)
{
this.ShowFieldMessage("FileDataFileName", "${Composite.Management, Website.Forms.Administrative.EditMediaFile.TotalFilenameToLong.Message}");
e.Result = false;
return;
}
Guid mediaFileId = file.Id;
if(DataFacade.GetData<IMediaFile>()
.Any(mediaFile => string.Compare(mediaFile.CompositePath, compositePath, StringComparison.InvariantCultureIgnoreCase) == 0
&& mediaFile.Id != mediaFileId))
{
this.ShowFieldMessage("FileDataFileName", "${Composite.Management, Website.Forms.Administrative.EditMediaFile.FileExists.Message}");
e.Result = false;
return;
}
e.Result = true;
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:26,代码来源:EditMediaFileWorkflow.cs
示例16: FolderExists
private void FolderExists(object sender, ConditionalEventArgs e)
{
string currentPath = GetCurrentPath();
string newFolderName = this.GetBinding<string>("NewFolderName");
e.Result = C1Directory.Exists(Path.Combine(currentPath, newFolderName));
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:7,代码来源:AddNewWebsiteFolderWorkflow.cs
示例17: isTypK
private void isTypK(object sender, ConditionalEventArgs e)
{
if (selTypyKlientow.Count > 0)
{
ot = opType.TK;
e.Result = true;
}
}
开发者ID:fraczo,项目名称:Biuromagda,代码行数:8,代码来源:wfGFR.cs
示例18: ValidateSpecifiedPasswords
private void ValidateSpecifiedPasswords(object sender, ConditionalEventArgs e)
{
string oldPassword = this.GetBinding<string>(Fields.OldPassword);
string newPassword = this.GetBinding<string>(Fields.NewPassword);
string newPasswordConfirmed = this.GetBinding<string>(Fields.NewPasswordConfirmed);
e.Result = ValidateSpecifiedPasswords(oldPassword, newPassword, newPasswordConfirmed);
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:8,代码来源:ChangeOwnPasswordWorkflow.cs
示例19: CheckOption
private void CheckOption(object sender, ConditionalEventArgs e)
{
e.Result = false;
if (serviceValue == 1 || serviceValue == 2 || serviceValue == 0)
{
e.Result = true;
}
}
开发者ID:ssickles,项目名称:archive,代码行数:8,代码来源:BankMachineWorkflow.cs
示例20: HasUsers
private void HasUsers(object sender, ConditionalEventArgs e)
{
DataEntityToken dataEntityToken = (DataEntityToken)this.EntityToken;
IUserGroup userGroup = (IUserGroup)dataEntityToken.Data;
e.Result = DataFacade.GetData<IUserUserGroupRelation>(f => f.UserGroupId == userGroup.Id).Any();
}
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:8,代码来源:DeleteUserGroupWorkflow.cs
注:本文中的System.Workflow.Activities.ConditionalEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论