/// <summary>
 /// 下一页信息
 /// </summary>
 /// <param name="id">The id.</param>
 /// <param name="classname">The classname.</param>
 /// <returns>id,标题,时间</returns>
 public string PgDn(int id, string classname)
 {
     ROYcms.Sys.Model.ROYcms_product Model = dal.TopProduct(" bh>" + id + " and classname='" + classname + "' order by bh desc ");
     if (Model != null)
     {
         return(Model.bh.ToString() + "," + Model.title + "," + Model.time);
     }
     else
     {
         return("");
     }
 }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(ROYcms.Sys.Model.ROYcms_product model)
        {
            //
            //级联更新  删除以前的分类关联  新建一个分类关联
            //

            ROYcms.Sys.BLL.ROYcms_Class_News   ROYcms_Class_product_bll   = new ROYcms.Sys.BLL.ROYcms_Class_News();
            ROYcms.Sys.Model.ROYcms_Class_News ROYcms_Class_product_model = new ROYcms.Sys.Model.ROYcms_Class_News();
            ROYcms.Sys.BLL.ROYcms_class        ROYcms_Class_bll           = new ROYcms.Sys.BLL.ROYcms_class();
            ROYcms.Sys.Model.ROYcms_class      ROYcms_Class_model         = ROYcms_Class_bll._GetModel(model.classname.ToString());

            //删除
            ROYcms_Class_product_bll.Delete(" (news_id=" + model.bh + ") AND (Class=" + GetClassName(model.bh) + ") ");
            //添加
            ROYcms_Class_product_model.news_id    = model.bh;
            ROYcms_Class_product_model.Class      = Convert.ToInt32(model.classname);
            ROYcms_Class_product_model.class_id   = ROYcms_Class_model.ClassId;
            ROYcms_Class_product_model.class_list = ROYcms_Class_model.ClassList;
            ROYcms_Class_product_model.Time       = DateTime.Now;
            ROYcms_Class_product_model.GUID       = model.GUID;
            ROYcms_Class_product_bll.Add(ROYcms_Class_product_model);

            dal.Update(model);
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int  Add(ROYcms.Sys.Model.ROYcms_product model)
        {
            int news_id = dal.Add(model);

            //
            //级联添加
            //
            if (news_id != 1)
            {
                ROYcms.Sys.BLL.ROYcms_Class_News   ROYcms_Class_product_bll   = new ROYcms.Sys.BLL.ROYcms_Class_News();
                ROYcms.Sys.Model.ROYcms_Class_News ROYcms_Class_product_model = new ROYcms.Sys.Model.ROYcms_Class_News();
                ROYcms.Sys.BLL.ROYcms_class        ROYcms_Class_bll           = new ROYcms.Sys.BLL.ROYcms_class();
                ROYcms.Sys.Model.ROYcms_class      ROYcms_Class_model         = ROYcms_Class_bll._GetModel(model.classname.ToString());

                ROYcms_Class_product_model.news_id    = news_id;
                ROYcms_Class_product_model.Class      = Convert.ToInt32(model.classname);
                ROYcms_Class_product_model.class_id   = ROYcms_Class_model.ClassId;
                ROYcms_Class_product_model.class_list = ROYcms_Class_model.ClassList;
                ROYcms_Class_product_model.Time       = DateTime.Now;
                ROYcms_Class_product_model.GUID       = model.GUID;
                ROYcms_Class_product_bll.Add(ROYcms_Class_product_model);
            }
            return(news_id);
        }