wApp.Selection.TypeText(BusinessLogic.PublicEnum.GetEnumDescription (System.Enum.Parse(typeof(BusinessEntity.DocumentType), sdr["HolderDocumentType"].ToString().Replace("HolderDocumentType", ""))));值是-1我把-1替换为空 为什么还是显示-1呢,我试过好多次.枚举替换怎么替换啊,也是一样吗?
wApp.Selection.TypeText(BusinessLogic.PublicEnum.GetEnumDescription (System.Enum.Parse(typeof(BusinessEntity.DocumentType), sdr["HolderDocumentType"].ToString().Replace("-1", ""))));
这样做也不行
wApp.Selection.TypeText(BusinessLogic.PublicEnum.GetEnumDescription (System.Enum.Parse(typeof(BusinessEntity.DocumentType), sdr["DocumentType"].ToString().Replace("DocumentType", ""))));
这样也不行
也不可能是空值啊,都是显示-1
wApp.Selection.TypeText(BusinessLogic.PublicEnum.GetEnumDescription (System.Enum.Parse(typeof(BusinessEntity.DocumentType), sdr["HolderDocumentType"].ToString().Replace("-1", ""))));
这样做也不行
wApp.Selection.TypeText(BusinessLogic.PublicEnum.GetEnumDescription (System.Enum.Parse(typeof(BusinessEntity.DocumentType), sdr["DocumentType"].ToString().Replace("DocumentType", ""))));
这样也不行
也不可能是空值啊,都是显示-1
解决方案 »
- 网站整体设计图用什么软件做好?
- 文本框未输入值前里面显示请输入...
- .net入门视频教程
- 在gridview 中,使用 commandfield, 如何验证字段的合法性?
- 在线等:VS2005中,在利用MasterPage生成的页面中(default.aspx)可否再放置框架(FrameSet)??
- 56kc.net域名及全部代码转让,只为求明主.
- 如何用代码来控制日历控件的前一个月,后一个月的现实
- 怎样在自己的网站中应用RSS?
- 在线等待,立马给分!!怎样获取登录的用户信息,如IP,并发信息给他
- 怎样在DataGrid中建立“链接”?求助!!
- 請問如何在ASPX文件中設計框架Frame?
- 求小于65535的正则表达式,急~
sdr 是SqlDataReader
请你输出 sdr["HolderDocumentType"].ToString() 是什么?写的SQL语句 HolderDocumentType是字段的别名sdr["HolderDocumentType"].ToString() 中包含 "HolderDocumentType" 吗?
比较好的方式是,数据库中存储枚举值,而不是名称,such asBusinessEntity.DocumentType docType = (BusinessEntity.DocumentType)((int)sdr["HolderDocumentType"]); // 这里假设 BusinessEntity.DocumentType 的基元类型是 int
wApp.Selection.TypeText(BusinessLogic.PublicEnum.GetEnumDescription(System.Enum.Parse(typeof(BusinessEntity.Marriage),((int)sdr["InsuredMarriage"]).ToString().Replace("InsuredMarriage", ""))));