Esempio n. 1
0
        public override void WriteGetValueFromReader(StringBuilder sb)
        {
            ParamTypeMeta paramTypeMeta = SqlParamMetaData.Items[this.Type];
            object        obj           = string.IsNullOrWhiteSpace(this.ParamName) ? (object)this.ColumnOrdinal : (object)("\"" + this.ParamName + "\"");

            sb.Append(paramTypeMeta.CsType).Append(" ").Append(this.ParamName).Append(" = dr.").AppendFormat(paramTypeMeta.DrMethod, obj).Append(";");
        }
Esempio n. 2
0
        public override void WriteGetValueFromReader(StringBuilder sb)
        {
            ParamTypeMeta paramTypeMeta = ParamMetaData.Items[this.Type];
            string        str           = "\"" + this.OutputColumnName + "\"";

            sb.Append(paramTypeMeta.CsType).Append(" ").Append(this.ParamName).Append(" = dr.").AppendFormat(paramTypeMeta.DrMethod, (object)str).Append(";");
        }
Esempio n. 3
0
        public override void WriteCsParam(StringBuilder sb)
        {
            ParamTypeMeta paramTypeMeta = ParamMetaData.Items[this.Type];

            if (this.IsOutput)
            {
                sb.Append("SqlParameter ").Append(this.ParamName).Append("Param = ");
            }
            string str = this.IsOutput ? "" : ", request." + this.ParamName;

            sb.Append("cmd.").AppendFormat(paramTypeMeta.AddParamMethod, (object)("@" + this.ParamName), (object)str, (object)this.CharLength, (object)this.Precision, (object)this.Scale);
            if (this.IsOutput)
            {
                sb.Append(".Output()");
            }
            sb.Append(";");
        }
Esempio n. 4
0
        public override void WriteGetValueFromParam(StringBuilder sb)
        {
            ParamTypeMeta paramTypeMeta = SqlParamMetaData.Items[this.Type];

            sb.Append(paramTypeMeta.CsType).Append(" ").Append(this.ParamName).Append(" = ").AppendFormat(paramTypeMeta.GetParamValue, (object)(this.ParamName + "Param")).Append(";");
        }