温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:狂龙通讯录管理系统2.0源码
当前文件:
KuangLongCommunicationV2/App_Code/GetValue.cs[1K,2009-6-12 11:46:37],打开代码结构图
KuangLongCommunicationV2/App_Code/GetValue.cs[1K,2009-6-12 11:46:37],打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Web; 5
using System.Web.Security; 6
using System.Web.UI; 7
using System.Web.UI.WebControls; 8
using System.Web.UI.WebControls.WebParts; 9
using System.Web.UI.HtmlControls; 10
11
/// <summary> 12
/// GetValue 的摘要说明 13
/// </summary> 14
public class GetValue 15
{ 16
public GetValue() 17
{ 18
// 19
// TODO: 在此处添加构造函数逻辑 20
// 21
} 22
public static string ValidateDataRow_S(DataRow row, string colname) 23
{ 24
if (row[colname] != DBNull.Value) 25
return row[colname].ToString(); 26
else 27
return System.String.Empty; 28
29
} 30
public static int ValidataDataRow_I(DataRow row, string colname) 31
{ 32
if (row[colname] != DBNull.Value) 33
return Convert.ToInt32(row[colname]); 34
else 35
return System.Int32.MinValue; 36
37
38
} 39
public static DateTime ValidateDataRow_T(DataRow row, string colname) 40
{ 41
if (row[colname] != DBNull.Value) 42
return Convert.ToDateTime(row[colname]); 43
else 44
return System.DateTime.MinValue; 45
46
} 47
} 48









