/// <summary> /// Updates a root folder in the database /// </summary> /// <param name="conn">Open connection to the database</param> /// <param name="rootFolder">Root folder being updated</param> public static void UpdateRootFolder(SqlConnection conn, Business.RootFolder rootFolder) { try { SqlDbObject.ExecuteNonQuery("UpdateRootFolder", CommandType.StoredProcedure, rootFolder.GetParametersForStoredProcedure(true), conn); } catch (System.Exception e) { throw new UpdateSqlDbObjectException("Could not update root folder", e); } }
/// <summary> /// Adds a new root folder to the database /// </summary> /// <param name="conn">Open connection to the database</param> /// <param name="rootFolder">Root folder being added</param> /// <returns>Priority of the new root folder</returns> public static Int16 AddRootFolder(SqlConnection conn, Business.RootFolder rootFolder) { try { return((Int16)SqlDbObject.ExecuteScalar("AddRootFolder", CommandType.StoredProcedure, rootFolder.GetParametersForStoredProcedure(false), conn)); } catch (System.Exception e) { throw new AddSqlDbObjectException("Could not add root folder", e); } }