Exemple #1
0
        public M_Content_Video GetModelFromReader(DbDataReader rdr)
        {
            M_Content_Video model = new M_Content_Video();

            model.ID        = Convert.ToInt32(rdr["ID"]);
            model.VName     = ConverToStr(rdr["VName"]);
            model.VSize     = ConverToStr(rdr["VSize"]);
            model.VTime     = ConverToStr(rdr["VTime"]);
            model.UserID    = Convert.ToInt32(rdr["UserID"]);
            model.CDate     = ConvertToDate(rdr["CDate"]);
            model.Thumbnail = ConverToStr(rdr["Thumbnail"]);
            model.Desc      = ConverToStr(rdr["Desc"]);
            model.VPath     = ConverToStr(rdr["VPath"]);
            return(model);
        }
Exemple #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Content_Video model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.VName;
            sp[2].Value = model.VSize;
            sp[3].Value = model.VTime;
            sp[4].Value = model.UserID;
            sp[5].Value = model.CDate;
            sp[6].Value = model.Thumbnail;
            sp[7].Value = model.Desc;
            sp[8].Value = model.VPath;
            return(sp);
        }