SqlDataAdapter.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. // System.Data.SqlClient.SqlDataAdapter.cs
  3. //
  4. // Author:
  5. // Rodrigo Moya ([email protected])
  6. // Daniel Morgan ([email protected])
  7. // Tim Coleman ([email protected])
  8. //
  9. // (C) Ximian, Inc 2002
  10. // Copyright (C) 2002 Tim Coleman
  11. //
  12. using System;
  13. using System.ComponentModel;
  14. using System.Data;
  15. using System.Data.Common;
  16. namespace System.Data.SqlClient
  17. {
  18. /// <summary>
  19. /// Represents a set of command-related properties that are used
  20. /// to fill the DataSet and update a data source, all this
  21. /// from a SQL database.
  22. /// </summary>
  23. public sealed class SqlDataAdapter : DbDataAdapter
  24. {
  25. #region Constructors
  26. public SqlDataAdapter ()
  27. : this (new SqlCommand ())
  28. {
  29. }
  30. public SqlDataAdapter (SqlCommand selectCommand) : base ()
  31. {
  32. this.deleteCommand = new SqlCommand ();
  33. this.insertCommand = new SqlCommand ();
  34. this.selectCommand = selectCommand;
  35. this.updateCommand = new SqlCommand ();
  36. }
  37. public SqlDataAdapter (string selectCommandText, SqlConnection selectConnection)
  38. : this (new SqlCommand (selectCommandText, selectConnection))
  39. {
  40. }
  41. public SqlDataAdapter (string selectCommandText, string selectConnectionString)
  42. : this (selectCommandText, new SqlConnection (selectConnectionString))
  43. {
  44. }
  45. #endregion
  46. #region Properties
  47. public new SqlCommand DeleteCommand {
  48. get { return (SqlCommand)deleteCommand; }
  49. set { deleteCommand = value; }
  50. }
  51. public new SqlCommand InsertCommand {
  52. get { return (SqlCommand)insertCommand; }
  53. set { insertCommand = value; }
  54. }
  55. public new SqlCommand SelectCommand {
  56. get { return (SqlCommand)selectCommand; }
  57. set { selectCommand = value; }
  58. }
  59. public new SqlCommand UpdateCommand {
  60. get { return (SqlCommand)updateCommand; }
  61. set { updateCommand = value; }
  62. }
  63. #endregion // Properties
  64. #region Methods
  65. [MonoTODO]
  66. protected override RowUpdatedEventArgs CreateRowUpdatedEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
  67. {
  68. throw new NotImplementedException ();
  69. }
  70. [MonoTODO]
  71. protected override RowUpdatingEventArgs CreateRowUpdatingEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
  72. {
  73. throw new NotImplementedException ();
  74. }
  75. protected override void OnRowUpdated (RowUpdatedEventArgs value)
  76. {
  77. throw new NotImplementedException ();
  78. }
  79. protected override void OnRowUpdating (RowUpdatingEventArgs value)
  80. {
  81. throw new NotImplementedException ();
  82. }
  83. #endregion // Methods
  84. #region Events and Delegates
  85. public event SqlRowUpdatedEventHandler RowUpdated;
  86. public event SqlRowUpdatingEventHandler RowUpdating;
  87. #endregion // Events and Delegates
  88. }
  89. }