コード例 #1
0
 public static T GetValue <T>(this System.Data.DataRow row, string col, System.Data.DataRowVersion version = System.Data.DataRowVersion.Current)
 {
     if (typeof(T).BaseType == typeof(Enum))
     {
         if (row[col, version] != System.DBNull.Value)
         {
             return((T)Enum.ToObject(typeof(T), row[col, version]));
         }
         else
         {
             return((T)Enum.ToObject(typeof(T), default(T)));
         }
     }
     else
     {
         if (row[col, version] != System.DBNull.Value && row[col, version] != null)
         {
             return((T)Convert.ChangeType(row[col, version], typeof(T)));
         }
         else
         {
             return(default(T));
         }
     }
 }
コード例 #2
0
 public static System.Data.SqlClient.SqlParameter GetID_TCH_USR(System.Data.DataRowVersion version)
 {
     System.Data.SqlClient.SqlParameter pm;
     if ((version == System.Data.DataRowVersion.Original))
     {
         pm = new System.Data.SqlClient.SqlParameter("@Original_ID_TCH_USR", System.Data.SqlDbType.Char, 13, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID_TCH_USR", version, null);
     }
     else
     {
         pm = new System.Data.SqlClient.SqlParameter("@ID_TCH_USR", System.Data.SqlDbType.Char, 13, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID_TCH_USR", version, null);
     }
     return(pm);
 }
コード例 #3
0
 public static System.Data.SqlClient.SqlParameter GetNM(string parameterName, System.Data.DataRowVersion version)
 {
     System.Data.SqlClient.SqlParameter pm;
     if ((version == System.Data.DataRowVersion.Original))
     {
         pm = new System.Data.SqlClient.SqlParameter(string.Format("@Original_{0}", parameterName), System.Data.SqlDbType.Char, 32, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "NM", version, null);
     }
     else
     {
         pm = new System.Data.SqlClient.SqlParameter(string.Format("@{0}", parameterName), System.Data.SqlDbType.Char, 32, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "NM", version, null);
     }
     return(pm);
 }
コード例 #4
0
 public static System.Data.SqlClient.SqlParameter GetSCF(System.Data.DataRowVersion version)
 {
     System.Data.SqlClient.SqlParameter pm;
     if ((version == System.Data.DataRowVersion.Original))
     {
         pm = new System.Data.SqlClient.SqlParameter("@Original_SCF", System.Data.SqlDbType.NChar, 254, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "SCF", version, null);
     }
     else
     {
         pm = new System.Data.SqlClient.SqlParameter("@SCF", System.Data.SqlDbType.NChar, 254, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "SCF", version, null);
     }
     return(pm);
 }
コード例 #5
0
 public SqliteParameter(string parameterName, System.Data.DbType dbType, string sourceColumn, System.Data.DataRowVersion rowVersion)
 {
 }
コード例 #6
0
 public SqliteParameter(string parameterName, System.Data.DbType parameterType, int parameterSize, System.Data.ParameterDirection direction, byte precision, byte scale, string sourceColumn, System.Data.DataRowVersion rowVersion, bool sourceColumnNullMapping, object value)
 {
 }
コード例 #7
0
 public SqliteParameter(System.Data.DbType parameterType, int parameterSize, string sourceColumn, System.Data.DataRowVersion rowVersion)
 {
 }
コード例 #8
0
 public OleDbParameter(string parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, byte precision, byte scale, string sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object value)
 {
 }
コード例 #9
0
 public static T Field <T>(this System.Data.DataRow row, int columnIndex, System.Data.DataRowVersion version)
 {
     throw null;
 }
コード例 #10
0
 public OdbcParameter(string?parameterName, System.Data.Odbc.OdbcType odbcType, int size, System.Data.ParameterDirection parameterDirection, byte precision, byte scale, string?sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object?value)
 {
 }
コード例 #11
0
 public void AddInParameter(System.Data.Common.DbCommand command, string name, System.Data.DbType dbType, string sourceColumn, System.Data.DataRowVersion sourceVersion)
 {
     db.AddInParameter(command, name, dbType, sourceColumn, sourceVersion);
 }
コード例 #12
0
 public OracleParameter(string name, OracleType oracleType, int size, System.Data.ParameterDirection direction, string sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object value)
 {
 }
コード例 #13
0
 public OracleParameter(string name, OracleType oracleType, int size, System.Data.ParameterDirection direction, bool isNullable, byte precision, byte scale, string srcColumn, System.Data.DataRowVersion srcVersion, object value)
 {
 }
コード例 #14
0
 public static T GetValue <T>(this System.Data.DataRow row, IColumn col, System.Data.DataRowVersion version = System.Data.DataRowVersion.Current)
 {
     return(GetValue <T>(row, col.Name, version));
 }
コード例 #15
0
 public DB2Parameter(string parameterName, IBM.Data.DB2.DB2Type db2Type, int size, System.Data.ParameterDirection parameterDirection, bool isNullable, byte precision, byte scale, string srcColumn, System.Data.DataRowVersion srcVersion, object value)
 {
 }
コード例 #16
0
 public OdbcParameter(string?parameterName, System.Data.Odbc.OdbcType odbcType, int size, System.Data.ParameterDirection parameterDirection, bool isNullable, byte precision, byte scale, string?srcColumn, System.Data.DataRowVersion srcVersion, object?value)
 {
 }
コード例 #17
0
 public void AddParameter(System.Data.Common.DbCommand command, string name, System.Data.DbType dbType, System.Data.ParameterDirection direction, string sourceColumn, System.Data.DataRowVersion sourceVersion, object value)
 {
     db.AddParameter(command, name, dbType, direction, sourceColumn, sourceVersion, value);
 }
コード例 #18
0
 public static T Field <T>(this System.Data.DataRow row, System.Data.DataColumn column, System.Data.DataRowVersion version)
 {
     throw null;
 }
コード例 #19
0
 public void AddParameter(System.Data.Common.DbCommand command, string name, System.Data.DbType dbType, int size, System.Data.ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, System.Data.DataRowVersion sourceVersion, object value)
 {
     db.AddParameter(command, name, dbType, size, direction, nullable, precision, scale, sourceColumn, sourceVersion, value);
 }
コード例 #20
0
 public static T Field <T>(this System.Data.DataRow row, string columnName, System.Data.DataRowVersion version)
 {
     throw null;
 }
コード例 #21
0
 public OleDbParameter(string parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, bool isNullable, byte precision, byte scale, string srcColumn, System.Data.DataRowVersion srcVersion, object value)
 {
 }