public string UpdateNews(News news) { try { Business business = new Business(); return business.UpdateNews(news); } catch (Exception ex) { return ex.Message; } }
public void UpdateNews(News news) { int maxId = GetMaxId("tblNews", "Id") + 1; string query = "INSERT INTO [tblNews]([Id],[NewsHeader],[NewsContent])VALUES(" + maxId + ",'" + news.NewsHeader + "','" + news.NewsDetails + "');"; ExecuteNonQuery(query); }
public string UpdateNews(News news) { dataAccess.UpdateNews(news); return "OK"; }