コード例 #1
0
        public M_Content_VerBak GetModelFromReader(DbDataReader rdr)
        {
            M_Content_VerBak model = new M_Content_VerBak();

            model.ID         = ConvertToInt(rdr["ID"]);
            model.GeneralID  = ConvertToInt(rdr["GeneralID"]);
            model.Title      = ConverToStr(rdr["Title"]);
            model.Flow       = ConverToStr(rdr["Flow"]);
            model.ContentBak = ConverToStr(rdr["ContentBak"]);
            model.TableBak   = ConverToStr(rdr["TableBak"]);
            model.CDate      = ConvertToDate(rdr["CDate"]);
            model.Inputer    = ConverToStr(rdr["Inputer"]);
            model.ExtendBak  = ConverToStr(rdr["ExtendBak"]);
            model.ZType      = ConverToStr(rdr["ZType"]);
            rdr.Close();
            return(model);
        }
コード例 #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Content_VerBak model = this;

            if (model.CDate <= DateTime.Now)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.GeneralID;
            sp[2].Value = model.Title;
            sp[3].Value = model.Flow;
            sp[4].Value = model.ContentBak;
            sp[5].Value = model.TableBak;
            sp[6].Value = model.CDate;
            sp[7].Value = model.Inputer;
            sp[8].Value = model.ExtendBak;
            sp[9].Value = model.ZType;
            return(sp);
        }