/// <summary> /// 新增 /// </summary> /// <param name="flowAuthAuthorEntity"></param> /// <returns></returns> public bool AddFlowAuthAuthor(FlowAuthAuthorEntity flowAuthAuthorEntity) { bool flag = false; StringBuilder sqlCommandText = new StringBuilder(); sqlCommandText.Append(" @JournalID"); sqlCommandText.Append(", @ActionID"); sqlCommandText.Append(", @AuthorID"); DbCommand cmd = db.GetSqlStringCommand(String.Format("INSERT INTO dbo.FlowAuthAuthor ({0}) VALUES ({1})", sqlCommandText.ToString().Replace("@", ""), sqlCommandText.ToString())); db.AddInParameter(cmd, "@JournalID", DbType.Int64, flowAuthAuthorEntity.JournalID); db.AddInParameter(cmd, "@ActionID", DbType.Int64, flowAuthAuthorEntity.ActionID); db.AddInParameter(cmd, "@AuthorID", DbType.Int64, flowAuthAuthorEntity.AuthorID); try { db.ExecuteNonQuery(cmd); flag = true; } catch (SqlException sqlEx) { throw sqlEx; } return(flag); }
/// <summary> /// 新增 /// </summary> /// <param name="flowAuthAuthorEntity"></param> /// <returns></returns> public bool AddFlowAuthAuthor(FlowAuthAuthorEntity flowAuthAuthorEntity) { return(FlowAuthAuthorDataAccess.Instance.AddFlowAuthAuthor(flowAuthAuthorEntity)); }