public JsonResult AddNews_type(int txt_parent_id, string txt_title, int?txt_sort_id, string txt_seo_title, string txt_seo_keywords, string txt_seo_description) { Common.Json json = new Common.Json(); DAO.BLL.B_News_type b_nt = new DAO.BLL.B_News_type(); Domain.News_type m_nt = new Domain.News_type(); m_nt.parent_id = txt_parent_id; m_nt.title = txt_title; m_nt.sort_id = txt_sort_id; m_nt.seo_title = txt_seo_title; m_nt.seo_keywords = txt_seo_keywords; m_nt.seo_description = txt_seo_description; var res = b_nt.Save(m_nt); if (res > 0) { json.msg = "添加成功!"; } else { json.msg = "添加失败!"; json.status = -1; } return(Json(json)); }
public void Update(Domain.News_type model) { dal.Update(model); }
public int Save(Domain.News_type model) { return(Convert.ToInt32(dal.Save(model))); }