PageRenderTime 53ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/Songhay.Data.GenericWeb/Procedures/List/List.SegmentDocuments.cs

http://GenericWeb.codeplex.com
C# | 44 lines | 23 code | 6 blank | 15 comment | 2 complexity | 769491115beaec90eeff5d6c1f68d7e9 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.Common;
  4. namespace Songhay.Data.GenericWeb.Procedures
  5. {
  6. using Songhay.Data.GenericWeb.Properties;
  7. /// <summary>
  8. /// List procedures into the DBMS.
  9. /// </summary>
  10. public static partial class List
  11. {
  12. /// <summary>
  13. /// Lists all SegmentDocument data in the DBMS catalogue.
  14. /// </summary>
  15. /// <param name="commonConnection">The Common connection.</param>
  16. /// <returns>Returns an XML <see cref="System.String"/>.</returns>
  17. public static string SegmentDocuments(DbConnection commonConnection)
  18. {
  19. string s = Common.CommonScalar.GetString(commonConnection, Resources.ListSegmentDocuments, false);
  20. return s;
  21. }
  22. /// <summary>
  23. /// Lists all SegmentDocument data associated with the specified Document.
  24. /// </summary>
  25. /// <param name="commonConnection">The Common connection.</param>
  26. /// <param name="uniqueIdentifier">The unique identifier of the Document</param>
  27. /// <returns>Returns an XML <see cref="System.String"/>.</returns>
  28. public static string SegmentDocuments(DbConnection commonConnection, string uniqueIdentifier)
  29. {
  30. if(uniqueIdentifier == null) throw new ArgumentNullException("uniqueIdentifier", "The unique identifer is null.");
  31. Dictionary<string, object> paramSet = new Dictionary<string, object>(1);
  32. paramSet.Add("@DocumentId", uniqueIdentifier);
  33. string s = Common.CommonScalar.GetString(commonConnection, Resources.ListDocumentSegmentsByDocId, paramSet);
  34. //TODO: rename Resources.ListDocumentSegmentsByDocId consistently...
  35. return s;
  36. }
  37. }
  38. }