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

            model.ID       = Convert.ToInt32(rdr["ID"]);
            model.Gid      = Convert.ToInt32(rdr["Gid"]);
            model.Ranstr   = ConverToStr(rdr["Ranstr"]);
            model.FName    = ConverToStr(rdr["FName"]);
            model.Url      = ConverToStr(rdr["Url"]);
            model.UserID   = ConvertToInt(rdr["UserID"]);
            model.UserName = ConverToStr(rdr["UserName"]);
            model.BuyPrice = ConverToStr(rdr["BuyPrice"]);
            model.IsMain   = ConvertToInt(rdr["IsMain"]);
            model.Field    = ConverToStr(rdr["Field"]);
            model.CDate    = ConvertToDate(rdr["CDate"]);
            model.EndDate  = ConvertToDate(rdr["EndDate"]);
            rdr.Close();
            return(model);
        }
Exemple #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Content_FileBuy model = this;

            EmptyDeal();
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Gid;
            sp[2].Value  = model.Ranstr;
            sp[3].Value  = model.FName;
            sp[4].Value  = model.Url;
            sp[5].Value  = model.UserID;
            sp[6].Value  = model.UserName;
            sp[7].Value  = model.BuyPrice;
            sp[8].Value  = model.IsMain;
            sp[9].Value  = model.Field;
            sp[10].Value = model.CDate;
            sp[11].Value = model.EndDate;
            return(sp);
        }