Example #1
0
        public override SqlParameter[] GetParameters()
        {
            M_Store_Info model = this;

            SqlParameter[] sp = GetSP();
            return(sp);
        }
Example #2
0
        public M_Store_Info GetModelFromReader(DataRow rdr)
        {
            M_Store_Info model = new M_Store_Info();

            model.ID         = Convert.ToInt32(rdr["GeneralID"]);
            model.ItemID     = Convert.ToInt32(rdr["ItemID"]);
            model.Title      = ConverToStr(rdr["Title"]);
            model.Status     = ConvertToInt(rdr["Status"]);
            model.CreateTime = ConvertToDate(rdr["CreateTime"]);
            //----附表信息
            model.UserID   = ConvertToInt(rdr["UserID"]);
            model.UserName = ConverToStr(rdr["UserName"]);
            if (rdr.Table.Columns.Contains("synopsis"))
            {
                model.Synopsis = ConverToStr(rdr["synopsis"]);
            }
            if (rdr.Table.Columns.Contains("Content"))
            {
                model.Content = ConverToStr(rdr["Content"]);
            }
            if (rdr.Table.Columns.Contains("pics"))
            {
                model.Pics = ConverToStr(rdr["pics"]);
            }
            if (rdr.Table.Columns.Contains("Logo"))
            {
                model.Logo = ConverToStr(rdr["Logo"]);
            }
            if (rdr.Table.Columns.Contains("StoreStyleID"))
            {
                model.StoreStyleID = ConvertToInt(rdr["StoreStyleID"]);
            }
            if (rdr.Table.Columns.Contains("StoreModelID"))
            {
                model.StoreModelID = ConvertToInt(rdr["StoreModelID"]);
            }
            InfoDR = rdr;
            return(model);
        }