C# as Java
Java
code posted
by
DannyK
created at 15 Mar 14:28
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using PAZ.ApplicationServer.Framework.Events; namespace PAZ.ApplicationServer.Framework.API { /// <summary> /// /// </summary> public enum SortSequence { Asc = 0, Desc = 1 } public interface IDataService : IDisposable { #region Public Properties IList<DataColumn> PrimaryKeyColumns{ get; } #endregion Public Properties #region Public EventHandler /// <summary> /// /// </summary> event CancelEventHandler<DataTableFillingEventArgs> DataTableFilling; /// <summary> /// /// </summary> event EventHandler<DataTableFilledEventArgs> DataTableFilled; /// <summary> /// /// </summary> event CancelEventHandler<DataRowDeletingEventArgs> DataRowDeleting; /// <summary> /// /// </summary> event EventHandler<DataRowDeletedEventArgs> DataRowDeleted; /// <summary> /// /// </summary> event CancelEventHandler<DataRowInsertingEventArgs> DataRowInserting; /// <summary> /// /// </summary> event EventHandler<DataRowInsertedEventArgs> DataRowInserted; /// <summary> /// /// </summary> event CancelEventHandler<DataRowUpdatingEventArgs> DataRowUpdating; /// <summary> /// /// </summary> event EventHandler<DataRowUpdatedEventArgs> DataRowUpdated; #endregion Public EventHandler #region Public Functions /// <summary> /// /// </summary> void Initialize(); /// <summary> /// /// </summary> void UnInitialize(); /// <summary> /// /// </summary> /// <returns></returns> DataTable PrepareDataTable(); /// <summary> /// /// </summary> /// <returns></returns> DataSet PrepareDataSet(); /// <summary> /// /// </summary> /// <param name="parameters"></param> /// <param name="index"></param> /// <param name="bulk"></param> /// <returns></returns> DataTable FillDataTable(IDictionary<String, Object> parameters, IDictionary<String, SortSequence> orders, Int32 index, Int32 bulk, ISessionDataContainer sessionData); /// <summary> /// /// </summary> /// <param name="table"></param> /// <returns></returns> void UpdateDataTable(DataTable table, ISessionDataContainer sessionData); /// <summary> /// /// </summary> /// <param name="dataSet"></param> /// <param name="sessionData"></param> /// <param name="parameters"></param> void UpdateDataSet(DataSet dataSet, ISessionDataContainer sessionData, DataSet parameters); /// <summary> /// /// </summary> /// <param name="?"></param> /// <param name="?"></param> /// <param name="?"></param> void ExecuteUpdateCommand(DataRow dataRow, DbTransaction transaction, ISessionDataContainer sessionData); /// <summary> /// /// </summary> /// <param name="dataTable"></param> /// <param name="transaction"></param> /// <param name="sessionData"></param> void ExecuteUpdateCommand(DataTable dataTable, DbTransaction transaction, ISessionDataContainer sessionData); /// <summary> /// /// </summary> /// <param name="dataRow"></param> /// <param name="transaction"></param> /// <param name="sessionData"></param> void ExecuteInsertCommand(DataRow dataRow, DbTransaction transaction, ISessionDataContainer sessionData); /// <summary> /// /// </summary> /// <param name="dataTable"></param> /// <param name="transaction"></param> /// <param name="sessionData"></param> void ExecuteInsertCommand(DataTable dataTable, DbTransaction transaction, ISessionDataContainer sessionData); /// <summary> /// /// </summary> /// <param name="dataRow"></param> /// <param name="transaction"></param> /// <param name="sessionData"></param> void ExecuteDeleteCommand(DataRow dataRow, DbTransaction transaction, ISessionDataContainer sessionData); #endregion Public Functions } } |
4.65 KB in 4 ms with coderay