Ejemplo n.º 1
0
        public override SqlParameter[] GetParameters()
        {
            M_OrderBaseField model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.FieldName;
            sp[1].Value  = model.FieldAlias;
            sp[2].Value  = model.FieldTips;
            sp[3].Value  = model.Description;
            sp[4].Value  = model.IsNotNull;
            sp[5].Value  = model.FieldType;
            sp[6].Value  = model.Content;
            sp[7].Value  = model.OrderId;
            sp[8].Value  = model.ShowList;
            sp[9].Value  = model.ShowWidth;
            sp[10].Value = model.NoEdit;
            sp[11].Value = model.Type;
            return(sp);
        }
Ejemplo n.º 2
0
        public M_OrderBaseField GetModelFromReader(DbDataReader rdr)
        {
            M_OrderBaseField model = new M_OrderBaseField();

            model.FieldID     = Convert.ToInt32(rdr["FieldID"]);
            model.FieldName   = ConverToStr(rdr["FieldName"]);
            model.FieldAlias  = ConverToStr(rdr["FieldAlias"]);
            model.FieldTips   = ConverToStr(rdr["FieldTips"]);
            model.Description = ConverToStr(rdr["Description"]);
            model.IsNotNull   = ConverToBool(rdr["IsNotNull"]);
            model.FieldType   = ConverToStr(rdr["FieldType"]);
            model.Content     = ConverToStr(rdr["Content"]);
            model.OrderId     = ConvertToInt(rdr["OrderId"]);
            model.ShowList    = ConverToBool(rdr["ShowList"]);
            model.ShowWidth   = ConvertToInt(rdr["ShowWidth"]);
            model.NoEdit      = ConvertToInt(rdr["NoEdit"]);
            model.Type        = ConvertToInt(rdr["Type"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }