1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Data;
- namespace Bowin.Common.Data
- {
- public static class DataRowEx
- {
-
-
-
-
-
-
- public static string GetValue(this DataRow dr, string colName)
- {
- if (dr != null && dr[colName] != null)
- {
- return dr[colName].ToString().Trim();
- }
- else
- {
- return string.Empty;
- }
- }
-
-
-
-
-
-
- public static string GetValue(this DataRow dr, int index)
- {
- if (dr != null && dr[index] != null)
- {
- return dr[index].ToString().Trim();
- }
- else
- {
- return string.Empty;
- }
- }
- }
- }
|