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

            model.ID       = Convert.ToInt32(rdr["ID"]);
            model.SiteName = ConverToStr(rdr["SiteName"]);
            model.UserID   = ConverToStr(rdr["UserID"]);
            model.UserName = ConverToStr(rdr["UserName"]);
            model.Remind   = ConverToStr(rdr["Remind"]);
            model.ZStatus  = ConvertToInt(rdr["ZStatus"]);
            model.CDate    = ConvertToDate(rdr["CDate"]);
            model.SiteFlag = ConverToStr(rdr["SiteFlag"]);
            model.DomainID = ConvertToInt(rdr["DomainID"]);
            model.Logo     = ConverToStr(rdr["Logo"]);
            model.Score    = ConverToDouble(rdr["Score"]);
            return(model);
        }
Exemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_Design_SiteInfo model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.SiteName;
            sp[2].Value  = model.UserID;
            sp[3].Value  = model.UserName;
            sp[4].Value  = model.Remind;
            sp[5].Value  = model.ZStatus;
            sp[6].Value  = model.CDate;
            sp[7].Value  = model.SiteFlag;
            sp[8].Value  = model.DomainID;
            sp[9].Value  = model.Logo;
            sp[10].Value = model.Score;
            return(sp);
        }