public void add(SendTemplateMessageModel sendtemplatemessage) { SqlConnection cn = null; SqlTransaction tc = null; try { cn = DbHelperSQL.getConnection(); tc = DbHelperSQL.startTransaction(cn); //执行新增写进数据库 sendtemplatemessageDal.add(cn, tc, sendtemplatemessage); DbHelperSQL.commitTransaction(tc); } catch (Exception dalEx) { DbHelperSQL.rollBackTransaction(tc); throw new MakeException(ExpSort.数据库, dalEx.Message); } finally { DbHelperSQL.closeConnection(cn); } }
public bool update(SqlConnection cn, SqlTransaction tc, SendTemplateMessageModel model) { throw new NotSupportedException(); // return DbHelperSQL.updateModel<SendTemplateMessageModel>(model, "SendTemplateMessage", "UserID", model.AppId, "'", cn, tc); }
public bool add(SqlConnection cn, SqlTransaction tc, SendTemplateMessageModel model) { return DbHelperSQL.insertModel<SendTemplateMessageModel>(model, "SendTemplateMessage", cn, tc); }