首页 新闻 会员 周边

ObjectDataSource如何传递enum类型的参数?

0
悬赏园豆:20 [已关闭问题] 关闭于 2008-11-05 23:09

我的场景是这样的:

下面是我的领域对象,有一个方法:LoadList,最后一个参数ReplyType是一个枚举值(public enum ReplyType : int):

public static IList<UserRefer> LoadList(int startRow, int maxRows, ReplyType replyType)
{
// }

下面是我的OjbectDataSource:
<asp:ObjectDataSource runat="server" ID="src"

StartRowIndexParameterName
="startRow"
MaximumRowsParameterName
="maxRows">
<SelectParameters>
<asp:Parameter Name="replyType" Type="???" DefaultValue="0" />
</SelectParameters>
</asp:ObjectDataSource>

我的问题在于:上面的代码段中的三个问号处要写什么?Int32?,如果用Int32会报错:ReplyType expected type Core.DomainModel.ReplyType, actual type System.Int32
问题补充: 如果用Int32会报错:ReplyType expected type Core.DomainModel.ReplyType, actual type System.Int32. 另外,我不想改变方法的签名,所以还请大家能给我个不改方法签名,并且还是用ObjectDataSource的办法,谢了!
水言木的主页 水言木 | 小虾三级 | 园豆:586
提问于:2008-11-05 18:22
< >
分享
所有回答(2)
0

你给ReplyType定义是用的什么类型,就可以用什么类型啊

uutome | 园豆:205 (菜鸟二级) | 2008-11-05 19:51
0

System.Int32 试试~

5yplan | 园豆:1330 (小虾三级) | 2008-11-05 20:27
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册