/// <summary>
/// 辅助类
/// </summary>
public static class Tool
{
#region 0否 1是转换
/// <summary>
/// 0否 1是转换
/// </summary>
/// <param name="obj">object</param>
/// <returns></returns>
public static string ConvertZeroOne(object obj)
{
string val = string.Empty;
if (!MSCL.Until.IsNullOrDBNull(obj))
{
val = (obj.ToString() == "0") ? "<font color='#E30000'><b>否</b></font>" : "<font color='#00EA00'><b>是</b></font>";
}
return val;
}
#endregion
#region 0否 1是转换成图片
/// <summary>
/// 0否 1是转换成图片
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public static string ConvertToImage(object obj)
{
string val = string.Empty;
if (!MSCL.Until.IsNullOrDBNull(obj))
{
val = (obj.ToString() == "0") ? "<img src='images/error.png' />" : "<img src='images/right.png' />";
}
return val;
}
#endregion
}
//调用其方法
string UpdateID = Request["ORDERID"]; //根据OrderID绑定数值 this.txtTICKETTYPE.Text = (oD_ORDER.TICKETTYPE == null) ? "" : Tool.GetDictNameByParentName("发票类型", oD_ORDER.TICKETTYPE);
this.txtISPAY.Text = (oD_ORDER.ISPAY == null) ? "" : Tool.ConvertZeroOne(oD_ORDER.ISPAY);