Ejemplo n.º 1
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="flowAuthRoleEntity"></param>
        /// <returns></returns>
        public bool AddFlowAuthRole(FlowAuthRoleEntity flowAuthRoleEntity)
        {
            bool          flag           = false;
            StringBuilder sqlCommandText = new StringBuilder();

            sqlCommandText.Append(" @JournalID");
            sqlCommandText.Append(", @ActionID");
            sqlCommandText.Append(", @RoleID");

            DbCommand cmd = db.GetSqlStringCommand(String.Format("INSERT INTO dbo.FlowAuthRole ({0}) VALUES ({1})", sqlCommandText.ToString().Replace("@", ""), sqlCommandText.ToString()));

            db.AddInParameter(cmd, "@JournalID", DbType.Int64, flowAuthRoleEntity.JournalID);
            db.AddInParameter(cmd, "@ActionID", DbType.Int64, flowAuthRoleEntity.ActionID);
            db.AddInParameter(cmd, "@RoleID", DbType.Int64, flowAuthRoleEntity.RoleID);

            try
            {
                db.ExecuteNonQuery(cmd);
                flag = true;
            }
            catch (SqlException sqlEx)
            {
                throw sqlEx;
            }
            return(flag);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 新增
 /// </summary>
 /// <param name="flowAuthRoleEntity"></param>
 /// <returns></returns>
 public bool AddFlowAuthRole(FlowAuthRoleEntity flowAuthRoleEntity)
 {
     return(FlowAuthRoleDataAccess.Instance.AddFlowAuthRole(flowAuthRoleEntity));
 }