kamagra how much to take

AspnetWebeventEventsCommands Partial Class

This command factory creates static partial classes that generate parameterized database commands to the ASP.NET database, in this case the “WebeventEvents” table. This partial class could be extended to include your own queries if you desired.

  1.  
  2. //*****************************************************************************
  3. // This file is part of the data access layer example to the ASP.NET 2.0 provider database
  4. // This file was written by Adam Buenz [WSS MVP] of ARB Security Solutions, LLC
  5. // http://www.sharepointsecurity.com
  6. //
  7. // This file and its parts is free for re-distribution, for use in both free
  8. // and commercial applications, however this header must remain intact for legal
  9. // use. The data access layer example is distributed in the hope that it will
  10. // be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. //*****************************************************************************
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Text;
  16. using System.Data;
  17. using System.Data.SqlClient;
  18.  
  19. namespace Aspnet.Provider.Datalayer.Commands
  20. {
  21. ///
  22. /// A command factory class for AspnetWebeventEvents objects.
  23. ///
  24. internal static partial class AspnetWebeventEventsCommands
  25. {
  26. ///
  27. /// Finds all AspnetWebeventEvents objects with a certain Eventtimeutc value.
  28. ///
  29. ///
  30. The Eventtimeutc value. /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Eventtimeutc value.
  31. public static IDbCommand FindByEventtimeutc(DateTime eventtimeutc)
  32. {
  33. SqlCommand cmd;
  34. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventTimeUtc] = @eventtimeutc");
  35. cmd.Parameters.AddWithValue("@eventtimeutc", eventtimeutc);
  36. return cmd;
  37. }
  38.  
  39. ///
  40. /// Finds all AspnetWebeventEvents objects with a certain Eventtime value.
  41. ///
  42. ///
  43. The Eventtime value. /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Eventtime value.
  44. public static IDbCommand FindByEventtime(DateTime eventtime)
  45. {
  46. SqlCommand cmd;
  47. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventTime] = @eventtime");
  48. cmd.Parameters.AddWithValue("@eventtime", eventtime);
  49. return cmd;
  50. }
  51.  
  52. ///
  53. /// Finds all AspnetWebeventEvents objects with a certain Eventtype value.
  54. ///
  55. ///
  56. The Eventtype value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Eventtype value.
  57. public static IDbCommand FindByEventtype(string eventtype)
  58. {
  59. SqlCommand cmd;
  60. if (eventtype == null)
  61. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventType] is null");
  62. else
  63. {
  64. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventType] like @eventtype");
  65. cmd.Parameters.AddWithValue("@eventtype", eventtype.Replace("*", "%"));
  66. }
  67. return cmd;
  68. }
  69.  
  70. ///
  71. /// Finds all AspnetWebeventEvents objects with a certain Eventsequence value.
  72. ///
  73. ///
  74. The Eventsequence value. /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Eventsequence value.
  75. public static IDbCommand FindByEventsequence(decimal eventsequence)
  76. {
  77. SqlCommand cmd;
  78. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventSequence] = @eventsequence");
  79. cmd.Parameters.AddWithValue("@eventsequence", eventsequence);
  80. return cmd;
  81. }
  82.  
  83. ///
  84. /// Finds all AspnetWebeventEvents objects with a certain Eventoccurrence value.
  85. ///
  86. ///
  87. The Eventoccurrence value. /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Eventoccurrence value.
  88. public static IDbCommand FindByEventoccurrence(decimal eventoccurrence)
  89. {
  90. SqlCommand cmd;
  91. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventOccurrence] = @eventoccurrence");
  92. cmd.Parameters.AddWithValue("@eventoccurrence", eventoccurrence);
  93. return cmd;
  94. }
  95.  
  96. ///
  97. /// Finds all AspnetWebeventEvents objects with a certain Eventcode value.
  98. ///
  99. ///
  100. The Eventcode value. /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Eventcode value.
  101. public static IDbCommand FindByEventcode(int eventcode)
  102. {
  103. SqlCommand cmd;
  104. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventCode] = @eventcode");
  105. cmd.Parameters.AddWithValue("@eventcode", eventcode);
  106. return cmd;
  107. }
  108.  
  109. ///
  110. /// Finds all AspnetWebeventEvents objects with a certain Eventdetailcode value.
  111. ///
  112. ///
  113. The Eventdetailcode value. /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Eventdetailcode value.
  114. public static IDbCommand FindByEventdetailcode(int eventdetailcode)
  115. {
  116. SqlCommand cmd;
  117. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [EventDetailCode] = @eventdetailcode");
  118. cmd.Parameters.AddWithValue("@eventdetailcode", eventdetailcode);
  119. return cmd;
  120. }
  121.  
  122. ///
  123. /// Finds all AspnetWebeventEvents objects with a certain Message value.
  124. ///
  125. ///
  126. The Message value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Message value.
  127. public static IDbCommand FindByMessage(string message)
  128. {
  129. SqlCommand cmd;
  130. if (message == null)
  131. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [Message] is null");
  132. else
  133. {
  134. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [Message] like @message");
  135. cmd.Parameters.AddWithValue("@message", message.Replace("*", "%"));
  136. }
  137. return cmd;
  138. }
  139.  
  140. ///
  141. /// Finds all AspnetWebeventEvents objects with a certain Applicationpath value.
  142. ///
  143. ///
  144. The Applicationpath value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Applicationpath value.
  145. public static IDbCommand FindByApplicationpath(string applicationpath)
  146. {
  147. SqlCommand cmd;
  148. if (applicationpath == null)
  149. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [ApplicationPath] is null");
  150. else
  151. {
  152. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [ApplicationPath] like @applicationpath");
  153. cmd.Parameters.AddWithValue("@applicationpath", applicationpath.Replace("*", "%"));
  154. }
  155. return cmd;
  156. }
  157.  
  158. ///
  159. /// Finds all AspnetWebeventEvents objects with a certain Applicationvirtualpath value.
  160. ///
  161. ///
  162. The Applicationvirtualpath value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Applicationvirtualpath value.
  163. public static IDbCommand FindByApplicationvirtualpath(string applicationvirtualpath)
  164. {
  165. SqlCommand cmd;
  166. if (applicationvirtualpath == null)
  167. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [ApplicationVirtualPath] is null");
  168. else
  169. {
  170. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [ApplicationVirtualPath] like @applicationvirtualpath");
  171. cmd.Parameters.AddWithValue("@applicationvirtualpath", applicationvirtualpath.Replace("*", "%"));
  172. }
  173. return cmd;
  174. }
  175.  
  176. ///
  177. /// Finds all AspnetWebeventEvents objects with a certain Machinename value.
  178. ///
  179. ///
  180. The Machinename value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Machinename value.
  181. public static IDbCommand FindByMachinename(string machinename)
  182. {
  183. SqlCommand cmd;
  184. if (machinename == null)
  185. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [MachineName] is null");
  186. else
  187. {
  188. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [MachineName] like @machinename");
  189. cmd.Parameters.AddWithValue("@machinename", machinename.Replace("*", "%"));
  190. }
  191. return cmd;
  192. }
  193.  
  194. ///
  195. /// Finds all AspnetWebeventEvents objects with a certain Requesturl value.
  196. ///
  197. ///
  198. The Requesturl value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Requesturl value.
  199. public static IDbCommand FindByRequesturl(string requesturl)
  200. {
  201. SqlCommand cmd;
  202. if (requesturl == null)
  203. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [RequestUrl] is null");
  204. else
  205. {
  206. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [RequestUrl] like @requesturl");
  207. cmd.Parameters.AddWithValue("@requesturl", requesturl.Replace("*", "%"));
  208. }
  209. return cmd;
  210. }
  211.  
  212. ///
  213. /// Finds all AspnetWebeventEvents objects with a certain Exceptiontype value.
  214. ///
  215. ///
  216. The Exceptiontype value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Exceptiontype value.
  217. public static IDbCommand FindByExceptiontype(string exceptiontype)
  218. {
  219. SqlCommand cmd;
  220. if (exceptiontype == null)
  221. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [ExceptionType] is null");
  222. else
  223. {
  224. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [ExceptionType] like @exceptiontype");
  225. cmd.Parameters.AddWithValue("@exceptiontype", exceptiontype.Replace("*", "%"));
  226. }
  227. return cmd;
  228. }
  229.  
  230. ///
  231. /// Finds all AspnetWebeventEvents objects with a certain Details value.
  232. ///
  233. ///
  234. The Details value ('*' can be used as a wildcard). /// An IDbCommand that finds all AspnetWebeventEvents objects with a certain Details value.
  235. public static IDbCommand FindByDetails(string details)
  236. {
  237. SqlCommand cmd;
  238. if (details == null)
  239. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [Details] is null");
  240. else
  241. {
  242. cmd = new SqlCommand("select * from [dbo].[aspnet_WebEvent_Events] where [Details] like @details");
  243. cmd.Parameters.AddWithValue("@details", details.Replace("*", "%"));
  244. }
  245. return cmd;
  246. }
  247.  
  248. }
  249. }
  250.  
  251.  
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>