/// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Garfield.Model.public_news> DataTableToList(DataTable dt)
        {
            List <Garfield.Model.public_news> modelList = new List <Garfield.Model.public_news>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Garfield.Model.public_news model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Garfield.Model.public_news();
                    if (dt.Rows[n]["id"] != null && dt.Rows[n]["id"].ToString() != "")
                    {
                        model.id = int.Parse(dt.Rows[n]["id"].ToString());
                    }
                    if (dt.Rows[n]["news_title"] != null && dt.Rows[n]["news_title"].ToString() != "")
                    {
                        model.news_title = dt.Rows[n]["news_title"].ToString();
                    }
                    if (dt.Rows[n]["news_content"] != null && dt.Rows[n]["news_content"].ToString() != "")
                    {
                        model.news_content = dt.Rows[n]["news_content"].ToString();
                    }
                    if (dt.Rows[n]["create_id"] != null && dt.Rows[n]["create_id"].ToString() != "")
                    {
                        model.create_id = int.Parse(dt.Rows[n]["create_id"].ToString());
                    }
                    if (dt.Rows[n]["create_name"] != null && dt.Rows[n]["create_name"].ToString() != "")
                    {
                        model.create_name = dt.Rows[n]["create_name"].ToString();
                    }
                    if (dt.Rows[n]["dep_id"] != null && dt.Rows[n]["dep_id"].ToString() != "")
                    {
                        model.dep_id = int.Parse(dt.Rows[n]["dep_id"].ToString());
                    }
                    if (dt.Rows[n]["dep_name"] != null && dt.Rows[n]["dep_name"].ToString() != "")
                    {
                        model.dep_name = dt.Rows[n]["dep_name"].ToString();
                    }
                    if (dt.Rows[n]["news_time"] != null && dt.Rows[n]["news_time"].ToString() != "")
                    {
                        model.news_time = DateTime.Parse(dt.Rows[n]["news_time"].ToString());
                    }
                    if (dt.Rows[n]["isDelete"] != null && dt.Rows[n]["isDelete"].ToString() != "")
                    {
                        model.isDelete = int.Parse(dt.Rows[n]["isDelete"].ToString());
                    }
                    if (dt.Rows[n]["Delete_time"] != null && dt.Rows[n]["Delete_time"].ToString() != "")
                    {
                        model.Delete_time = DateTime.Parse(dt.Rows[n]["Delete_time"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Garfield.Model.public_news model)
 {
     return(dal.Update(model));
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Garfield.Model.public_news model)
 {
     return(dal.Add(model));
 }