我在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时出错?