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
解决方案 »
- 谈谈asp.net的三层构架
- 求救 关于在购物网站中 对图片下的文字解说进行超级链接的问题
- 100分,再次询问!各位大侠请进。webconfig怎样配置子目录下的form授权验证。
- 当三层结构中 数据访问层 返回结果为DataSet时怎么得到错误信息?
- 想找一种asp.net模板引擎编程技术
- 我动态的向网页上添加一些web控件遇到了个问题,进来看看,
- 请问一个table控件的帮定数据问题??
- 请问Property 过程有什么用啊 ????
- 请教如何给checkbox添加点击事件,求正解!
- 最后10分了,不问不行了,关于dataview检索的问题
- 請問如何在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", ""))));