本文整理汇总了C#中ActionData.GetDataValueAsInt方法的典型用法代码示例。如果您正苦于以下问题:C# ActionData.GetDataValueAsInt方法的具体用法?C# ActionData.GetDataValueAsInt怎么用?C# ActionData.GetDataValueAsInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionData
的用法示例。
在下文中一共展示了ActionData.GetDataValueAsInt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Process
public override void Process(ActionData actionData)
{
var entityId = actionData.GetDataValueAsInt("EntityId");
var entityTypeId = actionData.GetDataValueAsInt("EntityTypeId");
var stateName = actionData.GetAsString("EntityStateName");
var state = actionData.GetAsString("EntityState");
var quantityExp = actionData.GetAsString("QuantityExp");
if (state != null)
{
if (entityId > 0 && entityTypeId > 0)
{
_entityServiceClient.UpdateEntityState(entityId, entityTypeId, stateName, state, quantityExp);
}
else
{
var ticket = actionData.GetDataValue<Ticket>("Ticket");
if (ticket != null)
{
var entityTypeName = actionData.GetAsString("EntityTypeName");
foreach (var ticketEntity in ticket.TicketEntities)
{
var entityType = _cacheService.GetEntityTypeById(ticketEntity.EntityTypeId);
if (string.IsNullOrEmpty(entityTypeName.Trim()) || entityType.Name == entityTypeName)
_entityServiceClient.UpdateEntityState(ticketEntity.EntityId, ticketEntity.EntityTypeId, stateName, state, quantityExp);
}
}
}
}
}
示例2: Process
public override void Process(ActionData actionData)
{
var entityId = actionData.GetDataValueAsInt("EntityId");
var entityName = actionData.GetAsString("EntityName");
var fieldName = actionData.GetAsString("FieldName");
var value = actionData.GetAsString("FieldValue");
if (entityId > 0)
{
_entityServiceClient.UpdateEntityData(entityId, fieldName, value);
}
else if (!string.IsNullOrEmpty(entityName))
{
var entityTypeName = actionData.GetAsString("EntityTypeName");
var entityType = _cacheService.GetEntityTypeByName(entityTypeName);
if (entityType != null)
{
_entityServiceClient.UpdateEntityData(entityType, entityName, fieldName, value);
}
}
else
{
var ticket = actionData.GetDataValue<Ticket>("Ticket");
if (ticket != null)
{
var entityTypeName = actionData.GetAsString("EntityTypeName");
foreach (var ticketEntity in ticket.TicketEntities)
{
var entityType = _cacheService.GetEntityTypeById(ticketEntity.EntityTypeId);
if (string.IsNullOrEmpty(entityTypeName.Trim()) || entityType.Name == entityTypeName)
_entityServiceClient.UpdateEntityData(ticketEntity.EntityId, fieldName, value);
}
}
}
}
示例3: Process
public override void Process(ActionData actionData)
{
var ticketId = actionData.GetDataValueAsInt("TicketId");
if (ticketId > 0 && !_applicationState.IsLocked)
{
var ticket = _ticketService.OpenTicket(ticketId);
ticket.PublishEvent(EventTopicNames.SetSelectedTicket);
}
EventServiceFactory.EventService.PublishEvent(EventTopicNames.CreateTicket);
}