1

我在一个 WF 项目中工作......这是我的 StatusDesigner.xaml.cs 文件的一部分:

 ............
 <sap:ActivityDesigner.Resources>
    <ResourceDictionary>
        <sapc:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter" />
    </ResourceDictionary>
  </sap:ActivityDesigner.Resources>
 .......... 
 <sapv:ExpressionTextBox
      HintText="Add Description"
      Expression="{Binding Path=ModelItem.description, Mode=TwoWay, Converter={StaticResource ArgumentToExpressionConverter}}"
      OwnerActivity="{Binding Path=ModelItem}"
      UseLocationExpression="True" Margin="107,157,7,17" MaxLines="1" FontWeight="Normal" />
 ................

这是我用来获取例如 issuer.DESCRIPTION 的 ExpressionTextBox...

这是我的 StatusActivity.cs:

 public String description { get; set; }
........
  SqlCommand proc = new SqlCommand("Add_Workflow_Status", conn);
                    conn.Open();
                    proc.CommandType = CommandType.StoredProcedure;
 .......
  proc.Parameters.AddWithValue("@RESULT_CHAR", description);

现在,当我执行 issuer.DESCRIPTION 时,会显示一条错误消息:

ArgumentException:“Microsoft.VisualBasic.Activities.VisualBasicReference”类型的对象1 [System.Double]无法转换为“System.Double”类型。

这很奇怪......将 System.Double 转换为 System.Double 时出错?

4

0 回答 0