日期:2014-05-20 浏览次数:20410 次
<asp:BoundField DataField="fkfs" HeaderText="结果反馈方式"> <HeaderStyle Width="180px" /> <ItemStyle Width="180px" /> </asp:BoundField>
public string FKFSWB(string str) { switch (str) { case "1": return "按规定时间窗口领取<br/>"; break; case "2": return "材料补充传真告知<br/>"; break; case "3": return "网上查询办理结果<br/>"; break; case "4": return "审批决定电话通知领取<br/>"; break; case "5": return "审批决定邮寄反馈<br/>"; break; } return str; }
public string FKFSWB(object s) { string str = (s??"").ToString(); string result = ""; for (int i = 0; i < str.Length; i++) { switch (str[i]) { case '1': result += "按规定时间窗口领取<br/>"; break; case '2': result += "材料补充传真告知<br/>"; break; case '3': result += "网上查询办理结果<br/>"; break; case '4': result += "审批决定电话通知领取<br/>"; break; case '5': result += "审批决定邮寄反馈<br/>"; break; } } return result ; }
------解决方案--------------------
按楼上的改,或者把楼上原来的代码改成
public string FKFSWB(object s)
{
string str = (s??"").ToString();
string result = "";
for (int i = 0; i < str.Length; i++)
{
string bb = str.Substring(i, 1);
switch (bb)
{
case "1":
result += "按规定时间窗口领取<br/>";
break;
case "2":
result += "材料补充传真告知<br/>";
break;
case "3":
result += "网上查询办理结果<br/>";
break;
case "4":
result += "审批决定电话通知领取<br/>";
break;
case "5":
result += "审批决定邮寄反馈<br/>";
break;
}
}
return result ;
}