Exemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <ROYcms.Sys.Model.ROYcms_CustomTag> GetModelList(string strWhere)
        {
            DataSet ds = dal.GetList(strWhere);
            List <ROYcms.Sys.Model.ROYcms_CustomTag> modelList = new List <ROYcms.Sys.Model.ROYcms_CustomTag>();
            int rowsCount = ds.Tables[0].Rows.Count;

            if (rowsCount > 0)
            {
                ROYcms.Sys.Model.ROYcms_CustomTag model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new ROYcms.Sys.Model.ROYcms_CustomTag();
                    if (ds.Tables[0].Rows[n]["id"].ToString() != "")
                    {
                        model.id = int.Parse(ds.Tables[0].Rows[n]["id"].ToString());
                    }
                    model.TAG         = ds.Tables[0].Rows[n]["TAG"].ToString();
                    model.TAG_name    = ds.Tables[0].Rows[n]["TAG_name"].ToString();
                    model.TAG_content = ds.Tables[0].Rows[n]["TAG_content"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(ROYcms.Sys.Model.ROYcms_CustomTag model)
 {
     dal.Update(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(ROYcms.Sys.Model.ROYcms_CustomTag model)
 {
     return(dal.Add(model));
 }