コード例 #1
0
 public DataParam(string name, CustomSqlTypes type, ParamDirection direction, string defval)
 {
     Name      = name;
     Type      = type;
     Default   = defval;
     Direction = direction;
 }
コード例 #2
0
        public static SqlDbType DetermineSqlDbTYpe(CustomSqlTypes type)
        {
            switch (type)
            {
            case CustomSqlTypes.Int:
                return(SqlDbType.Int);

            case CustomSqlTypes.Long:
                return(SqlDbType.BigInt);

            case CustomSqlTypes.String:
                return(SqlDbType.NVarChar);

            case CustomSqlTypes.Datetime:
                return(SqlDbType.DateTime);

            case CustomSqlTypes.Double:
                return(SqlDbType.Decimal);

            case CustomSqlTypes.Money:
                return(SqlDbType.Money);

            case CustomSqlTypes.SmallInt:
                return(SqlDbType.SmallInt);

            case CustomSqlTypes.Char:
                return(SqlDbType.NChar);

            case CustomSqlTypes.Real:
                return(SqlDbType.Real);

            default:
                return(SqlDbType.NVarChar);
            }
        }
コード例 #3
0
 public void AddReturnParam(CustomSqlTypes returntype)
 {
     AddParam(new DataParam("@return", returntype, ParamDirection.Return, "-1"));
 }
コード例 #4
0
 public DataParam(string name, CustomSqlTypes type) : this(name, type, ParamDirection.Input)
 {
 }
コード例 #5
0
 public DataParam(string name, CustomSqlTypes type, ParamDirection direction)
     : this(name, type, direction, string.Empty)
 {
 }