public int Add(Book.Model.T_Base_Provider provider) { Book.DAL.T_Base_Provider dal = new DAL.T_Base_Provider(); //用DAL层提供的添加方法添加 dal.Add(provider); return(0); }
public int Add(Book.Model.T_Base_Provider book) { int result = 0; Book.DAL.T_Base_Provider dal = new DAL.T_Base_Provider(); result = dal.Add(book); return(result); }
public ActionResult Addsave(book.Model.T_Base_Provider book) { DAL.T_Base_Provider dal = new DAL.T_Base_Provider(); int result = dal.Add(book); string tmp; if (result > 0) { tmp = "{ \"statusCode\":\"200\", \"message\":\"插入成功\", \"navTabId\":\"booklist\", \"rel\":\"booklist\",\"callbackType\":\"closeCurrent\",\"forwardUrl\":\"\"}"; return(Content(tmp)); } else { tmp = "{ \"statusCode\":\"300\", \"message\":\"插入失败\", \"navTabId\":\"booklist\", \"rel\":\"booklist\",\"callbackType\":\"closeCurrent\",\"forwardUrl\":\"\"}"; } return(Content(tmp)); }