Exemplo n.º 1
0
 public bool Insert(string artName,string artPath,DateTime addDate)
 {
     Article article = new Article();
     article.AddDate = addDate;
     article.ArticleName = artName;
     article.ArticlePath = artPath;
     DaoArticle dao = new DaoArticle();
     return dao.Insert(article);
 }
Exemplo n.º 2
0
 public List<Article> Select(string sql = "select * from Article order by AddDate desc")
 {
     DaoArticle dao = new DaoArticle();
     try
     {
         return dao.Select(sql);
     }
     catch
     {
     }
     return new List<Article>();
 }
Exemplo n.º 3
0
 public Article SelectOne(string id)
 {
     DaoArticle dao = new DaoArticle();
     return dao.SelectOneById(id);
 }