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

            model.GeneralID        = ConvertToInt(rdr["GeneralID"]);
            model.OrderID          = ConvertToInt(rdr["OrderID"]);
            model.NodeID           = ConvertToInt(rdr["NodeID"]);
            model.ModelID          = ConvertToInt(rdr["ModelID"]);
            model.ItemID           = ConvertToInt(rdr["ItemID"]);
            model.TableName        = ConverToStr(rdr["TableName"]);
            model.Title            = ConverToStr(rdr["Title"]);
            model.Inputer          = ConverToStr(rdr["Inputer"]);
            model.Hits             = ConvertToInt(rdr["Hits"]);
            model.CreateTime       = ConvertToDate(rdr["CreateTime"]);
            model.Status           = ConvertToInt(rdr["Status"]);
            model.EliteLevel       = ConvertToInt(rdr["EliteLevel"]);
            model.InfoID           = ConvertToInt(rdr["InfoID"]);
            model.SpecialID        = ConverToStr(rdr["SpecialID"]);
            model.IsCreate         = ConvertToInt(rdr["IsCreate"]);
            model.HtmlLink         = ConverToStr(rdr["HtmlLink"]);
            model.Titlecolor       = ConverToStr(rdr["Titlecolor"]);
            model.Template         = ConverToStr(rdr["Template"]);
            model.TagKey           = ConverToStr(rdr["TagKey"]);
            model.UpDateTime       = ConvertToDate(rdr["UpDateTime"]);
            model.UpDateType       = ConvertToInt(rdr["UpDateType"]);
            model.because_back     = ConverToStr(rdr["because_back"]);
            model.PdfLink          = ConverToStr(rdr["PdfLink"]);
            model.Rtype            = ConverToStr(rdr["Rtype"]);
            model.SuccessfulUserID = ConvertToInt(rdr["SuccessfulUserID"]);
            model.Subtitle         = ConverToStr(rdr["Subtitle"]);
            model.PYtitle          = ConverToStr(rdr["PYtitle"]);
            model.DefaultSkins     = ConvertToInt(rdr["DefaultSkins"]);
            model.FirstNodeID      = ConvertToInt(rdr["FirstNodeID"]);
            model.TitleStyle       = ConverToStr(rdr["TitleStyle"]);
            model.ParentTree       = ConverToStr(rdr["ParentTree"]);
            model.TopImg           = ConverToStr(rdr["TopImg"]);
            model.IsCatch          = ConvertToInt(rdr["IsCatch"]);
            model.RelatedIDS       = ConverToStr(rdr["RelatedIDS"]);
            model.IsComm           = ConvertToInt(rdr["IsComm"]);
            model.AuditTime        = ConverToStr(rdr["AuditTime"]);
            model.UGroupAuth       = ConverToStr(rdr["UGroupAuth"]);
            model.IsTop            = ConvertToInt(rdr["IsTop"]);
            model.IsTopTime        = ConverToStr(rdr["IsTopTime"]);
            model.IP       = ConverToStr(rdr["IP"]);
            model.TaskInfo = ConverToStr(rdr["TaskInfo"]);
            rdr.Close();
            return(model);
        }
Exemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_CommonData model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.GeneralID;
            sp[1].Value  = model.OrderID;
            sp[2].Value  = model.NodeID;
            sp[3].Value  = model.ModelID;
            sp[4].Value  = model.ItemID;
            sp[5].Value  = model.TableName;
            sp[6].Value  = model.Title;
            sp[7].Value  = model.Inputer;
            sp[8].Value  = model.Hits;
            sp[9].Value  = model.CreateTime;
            sp[10].Value = model.Status;
            sp[11].Value = model.EliteLevel;
            sp[12].Value = model.InfoID;
            sp[13].Value = model.SpecialID;
            sp[14].Value = model.IsCreate;
            sp[15].Value = model.HtmlLink;
            sp[16].Value = model.Titlecolor;
            sp[17].Value = model.Template;
            sp[18].Value = model.TagKey;
            sp[19].Value = model.UpDateTime;
            sp[20].Value = model.UpDateType;
            sp[21].Value = model.because_back;
            sp[22].Value = model.PdfLink;
            sp[23].Value = model.Rtype;
            sp[24].Value = model.SuccessfulUserID;
            sp[25].Value = model.Subtitle;
            sp[26].Value = model.PYtitle;
            sp[27].Value = model.DefaultSkins;
            sp[28].Value = model.FirstNodeID;
            sp[29].Value = model.TitleStyle;
            sp[30].Value = model.ParentTree;
            sp[31].Value = model.TopImg;
            sp[32].Value = model.IsCatch;
            sp[33].Value = model.RelatedIDS;
            sp[34].Value = model.IsComm;
            sp[35].Value = model.AuditTime;
            sp[36].Value = model.UGroupAuth;
            sp[37].Value = model.IsTop;
            sp[38].Value = model.IsTopTime;
            sp[39].Value = model.IP;
            sp[40].Value = model.TaskInfo;
            return(sp);
        }