当前位置: 首页>>代码示例>>C#>>正文


C# ActionData.GetDataValueAsInt方法代码示例

本文整理汇总了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);
                 }
             }
         }
     }
 }
开发者ID:khriza,项目名称:SambaPOS-3,代码行数:29,代码来源:UpdateEntityState.cs

示例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);
             }
         }
     }
 }
开发者ID:jgera,项目名称:SambaPOS-3,代码行数:34,代码来源:UdpateEntityData.cs

示例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);
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:10,代码来源:CreateTicket.cs


注:本文中的ActionData.GetDataValueAsInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。