Ejemplo n.º 1
0
        public M_CollectionItem GetModelFromReader(DbDataReader rdr)
        {
            M_CollectionItem model = new M_CollectionItem();

            model.CItem_ID         = Convert.ToInt32(rdr["CItem_ID"]);
            model.ItemName         = ConverToStr(rdr["ItemName"]);
            model.ModeID           = ConvertToInt(rdr["ModeID"]);
            model.NodeID           = ConverToStr(rdr["NodeID"]);
            model.SpecialID        = ConverToStr(rdr["SpecialID"]);
            model.SiteName         = ConverToStr(rdr["SiteName"]);
            model.CollUrl          = ConverToStr(rdr["CollUrl"]);
            model.CodinChoice      = ConvertToInt(rdr["CodinChoice"]);
            model.CollNum          = ConvertToInt(rdr["CollNum"]);
            model.CollOrder        = ConvertToInt(rdr["CollOrder"]);
            model.CollContext      = ConverToStr(rdr["CollContext"]);
            model.ListSettings     = ConverToStr(rdr["ListSettings"]);
            model.PageSettings     = ConverToStr(rdr["PageSettings"]);
            model.InfoPageSettings = ConverToStr(rdr["InfoPageSettings"]);
            model.AddTime          = ConvertToDate(rdr["AddTime"]);
            model.LastTime         = ConverToStr(rdr["LastTime"]);
            model.Switch           = ConvertToInt(rdr["Switch"]);
            model.State            = ConvertToInt(rdr["State"]);
            model.LinkList         = ConverToStr(rdr["LinkList"]);
            rdr.Close();
            return(model);
        }
Ejemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_CollectionItem model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.CItem_ID;
            sp[1].Value  = model.ItemName;
            sp[2].Value  = model.ModeID;
            sp[3].Value  = model.NodeID;
            sp[4].Value  = model.SpecialID;
            sp[5].Value  = model.SiteName;
            sp[6].Value  = model.CollUrl;
            sp[7].Value  = model.CodinChoice;
            sp[8].Value  = model.CollNum;
            sp[9].Value  = model.CollOrder;
            sp[10].Value = model.CollContext;
            sp[11].Value = model.ListSettings;
            sp[12].Value = model.PageSettings;
            sp[13].Value = model.InfoPageSettings;
            sp[14].Value = model.AddTime;
            sp[15].Value = model.LastTime;
            sp[16].Value = model.Switch;
            sp[17].Value = model.State;
            sp[18].Value = model.LinkList;
            return(sp);
        }