PageRenderTime 61ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/ScheduleView/Database/SL_CS/WithDB/Generated_Code/ScheduleViewDB.Web.g.cs

https://github.com/Kathy-Wu/xaml-sdk
C# | 3156 lines | 2281 code | 299 blank | 576 comment | 250 complexity | 4532f30604062f02f7e2f3bb634e0bd3 MD5 | raw file
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Runtime Version:4.0.30319.18052
  5. //
  6. // Changes to this file may cause incorrect behavior and will be lost if
  7. // the code is regenerated.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. namespace ScheduleViewDB
  11. {
  12. using System;
  13. using System.Collections.Generic;
  14. using System.ComponentModel;
  15. using System.ComponentModel.DataAnnotations;
  16. using System.Linq;
  17. using System.ServiceModel.DomainServices;
  18. using System.ServiceModel.DomainServices.Client;
  19. using System.ServiceModel.DomainServices.Client.ApplicationServices;
  20. /// <summary>
  21. /// Context for the RIA application.
  22. /// </summary>
  23. /// <remarks>
  24. /// This context extends the base to make application services and types available
  25. /// for consumption from code and xaml.
  26. /// </remarks>
  27. public sealed partial class WebContext : WebContextBase
  28. {
  29. #region Extensibility Method Definitions
  30. /// <summary>
  31. /// This method is invoked from the constructor once initialization is complete and
  32. /// can be used for further object setup.
  33. /// </summary>
  34. partial void OnCreated();
  35. #endregion
  36. /// <summary>
  37. /// Initializes a new instance of the WebContext class.
  38. /// </summary>
  39. public WebContext()
  40. {
  41. this.OnCreated();
  42. }
  43. /// <summary>
  44. /// Gets the context that is registered as a lifetime object with the current application.
  45. /// </summary>
  46. /// <exception cref="InvalidOperationException"> is thrown if there is no current application,
  47. /// no contexts have been added, or more than one context has been added.
  48. /// </exception>
  49. /// <seealso cref="System.Windows.Application.ApplicationLifetimeObjects"/>
  50. public new static WebContext Current
  51. {
  52. get
  53. {
  54. return ((WebContext)(WebContextBase.Current));
  55. }
  56. }
  57. }
  58. }
  59. namespace ScheduleViewDB.Web
  60. {
  61. using System;
  62. using System.Collections.Generic;
  63. using System.ComponentModel;
  64. using System.ComponentModel.DataAnnotations;
  65. using System.ComponentModel.DataAnnotations.Schema;
  66. using System.Linq;
  67. using System.Runtime.Serialization;
  68. using System.ServiceModel;
  69. using System.ServiceModel.DomainServices;
  70. using System.ServiceModel.DomainServices.Client;
  71. using System.ServiceModel.DomainServices.Client.ApplicationServices;
  72. using System.ServiceModel.Web;
  73. using System.Xml.Serialization;
  74. /// <summary>
  75. /// The 'Category' entity class.
  76. /// </summary>
  77. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  78. public sealed partial class Category : Entity
  79. {
  80. private string _categoryBrushName;
  81. private int _categoryID;
  82. private string _categoryName;
  83. private string _displayName;
  84. private EntityCollection<SqlAppointment> _sqlAppointments;
  85. private EntityCollection<SqlExceptionAppointment> _sqlExceptionAppointments;
  86. #region Extensibility Method Definitions
  87. /// <summary>
  88. /// This method is invoked from the constructor once initialization is complete and
  89. /// can be used for further object setup.
  90. /// </summary>
  91. partial void OnCreated();
  92. partial void OnCategoryBrushNameChanging(string value);
  93. partial void OnCategoryBrushNameChanged();
  94. partial void OnCategoryIDChanging(int value);
  95. partial void OnCategoryIDChanged();
  96. partial void OnCategoryNameChanging(string value);
  97. partial void OnCategoryNameChanged();
  98. partial void OnDisplayNameChanging(string value);
  99. partial void OnDisplayNameChanged();
  100. #endregion
  101. /// <summary>
  102. /// Initializes a new instance of the <see cref="Category"/> class.
  103. /// </summary>
  104. public Category()
  105. {
  106. this.OnCreated();
  107. }
  108. /// <summary>
  109. /// Gets or sets the 'CategoryBrushName' value.
  110. /// </summary>
  111. [DataMember()]
  112. [StringLength(100)]
  113. public string CategoryBrushName
  114. {
  115. get
  116. {
  117. return this._categoryBrushName;
  118. }
  119. set
  120. {
  121. if ((this._categoryBrushName != value))
  122. {
  123. this.OnCategoryBrushNameChanging(value);
  124. this.RaiseDataMemberChanging("CategoryBrushName");
  125. this.ValidateProperty("CategoryBrushName", value);
  126. this._categoryBrushName = value;
  127. this.RaiseDataMemberChanged("CategoryBrushName");
  128. this.OnCategoryBrushNameChanged();
  129. }
  130. }
  131. }
  132. /// <summary>
  133. /// Gets or sets the 'CategoryID' value.
  134. /// </summary>
  135. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  136. [DataMember()]
  137. [Editable(false, AllowInitialValue=true)]
  138. [Key()]
  139. [RoundtripOriginal()]
  140. public int CategoryID
  141. {
  142. get
  143. {
  144. return this._categoryID;
  145. }
  146. set
  147. {
  148. if ((this._categoryID != value))
  149. {
  150. this.OnCategoryIDChanging(value);
  151. this.ValidateProperty("CategoryID", value);
  152. this._categoryID = value;
  153. this.RaisePropertyChanged("CategoryID");
  154. this.OnCategoryIDChanged();
  155. }
  156. }
  157. }
  158. /// <summary>
  159. /// Gets or sets the 'CategoryName' value.
  160. /// </summary>
  161. [DataMember()]
  162. [StringLength(100)]
  163. public string CategoryName
  164. {
  165. get
  166. {
  167. return this._categoryName;
  168. }
  169. set
  170. {
  171. if ((this._categoryName != value))
  172. {
  173. this.OnCategoryNameChanging(value);
  174. this.RaiseDataMemberChanging("CategoryName");
  175. this.ValidateProperty("CategoryName", value);
  176. this._categoryName = value;
  177. this.RaiseDataMemberChanged("CategoryName");
  178. this.OnCategoryNameChanged();
  179. }
  180. }
  181. }
  182. /// <summary>
  183. /// Gets or sets the 'DisplayName' value.
  184. /// </summary>
  185. [DataMember()]
  186. [StringLength(100)]
  187. public string DisplayName
  188. {
  189. get
  190. {
  191. return this._displayName;
  192. }
  193. set
  194. {
  195. if ((this._displayName != value))
  196. {
  197. this.OnDisplayNameChanging(value);
  198. this.RaiseDataMemberChanging("DisplayName");
  199. this.ValidateProperty("DisplayName", value);
  200. this._displayName = value;
  201. this.RaiseDataMemberChanged("DisplayName");
  202. this.OnDisplayNameChanged();
  203. }
  204. }
  205. }
  206. /// <summary>
  207. /// Gets the collection of associated <see cref="SqlAppointment"/> entity instances.
  208. /// </summary>
  209. [Association("Category_SqlAppointment", "CategoryID", "CategoryID")]
  210. [XmlIgnore()]
  211. public EntityCollection<SqlAppointment> SqlAppointments
  212. {
  213. get
  214. {
  215. if ((this._sqlAppointments == null))
  216. {
  217. this._sqlAppointments = new EntityCollection<SqlAppointment>(this, "SqlAppointments", this.FilterSqlAppointments, this.AttachSqlAppointments, this.DetachSqlAppointments);
  218. }
  219. return this._sqlAppointments;
  220. }
  221. }
  222. /// <summary>
  223. /// Gets the collection of associated <see cref="SqlExceptionAppointment"/> entity instances.
  224. /// </summary>
  225. [Association("Category_SqlExceptionAppointment", "CategoryID", "CategoryID")]
  226. [XmlIgnore()]
  227. public EntityCollection<SqlExceptionAppointment> SqlExceptionAppointments
  228. {
  229. get
  230. {
  231. if ((this._sqlExceptionAppointments == null))
  232. {
  233. this._sqlExceptionAppointments = new EntityCollection<SqlExceptionAppointment>(this, "SqlExceptionAppointments", this.FilterSqlExceptionAppointments, this.AttachSqlExceptionAppointments, this.DetachSqlExceptionAppointments);
  234. }
  235. return this._sqlExceptionAppointments;
  236. }
  237. }
  238. private void AttachSqlAppointments(SqlAppointment entity)
  239. {
  240. entity.Category = this;
  241. }
  242. private void DetachSqlAppointments(SqlAppointment entity)
  243. {
  244. entity.Category = null;
  245. }
  246. private bool FilterSqlAppointments(SqlAppointment entity)
  247. {
  248. return (entity.CategoryID == this.CategoryID);
  249. }
  250. private void AttachSqlExceptionAppointments(SqlExceptionAppointment entity)
  251. {
  252. entity.Category = this;
  253. }
  254. private void DetachSqlExceptionAppointments(SqlExceptionAppointment entity)
  255. {
  256. entity.Category = null;
  257. }
  258. private bool FilterSqlExceptionAppointments(SqlExceptionAppointment entity)
  259. {
  260. return (entity.CategoryID == this.CategoryID);
  261. }
  262. /// <summary>
  263. /// Computes a value from the key fields that uniquely identifies this entity instance.
  264. /// </summary>
  265. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  266. public override object GetIdentity()
  267. {
  268. return this._categoryID;
  269. }
  270. }
  271. /// <summary>
  272. /// The DomainContext corresponding to the 'ScheduleViewDomainService' DomainService.
  273. /// </summary>
  274. public sealed partial class ScheduleViewDomainContext : DomainContext
  275. {
  276. #region Extensibility Method Definitions
  277. /// <summary>
  278. /// This method is invoked from the constructor once initialization is complete and
  279. /// can be used for further object setup.
  280. /// </summary>
  281. partial void OnCreated();
  282. #endregion
  283. /// <summary>
  284. /// Initializes a new instance of the <see cref="ScheduleViewDomainContext"/> class.
  285. /// </summary>
  286. public ScheduleViewDomainContext() :
  287. this(new WebDomainClient<IScheduleViewDomainServiceContract>(new Uri("ScheduleViewDB-Web-ScheduleViewDomainService.svc", UriKind.Relative)))
  288. {
  289. }
  290. /// <summary>
  291. /// Initializes a new instance of the <see cref="ScheduleViewDomainContext"/> class with the specified service URI.
  292. /// </summary>
  293. /// <param name="serviceUri">The ScheduleViewDomainService service URI.</param>
  294. public ScheduleViewDomainContext(Uri serviceUri) :
  295. this(new WebDomainClient<IScheduleViewDomainServiceContract>(serviceUri))
  296. {
  297. }
  298. /// <summary>
  299. /// Initializes a new instance of the <see cref="ScheduleViewDomainContext"/> class with the specified <paramref name="domainClient"/>.
  300. /// </summary>
  301. /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
  302. public ScheduleViewDomainContext(DomainClient domainClient) :
  303. base(domainClient)
  304. {
  305. this.OnCreated();
  306. }
  307. /// <summary>
  308. /// Gets the set of <see cref="Category"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  309. /// </summary>
  310. public EntitySet<Category> Categories
  311. {
  312. get
  313. {
  314. return base.EntityContainer.GetEntitySet<Category>();
  315. }
  316. }
  317. /// <summary>
  318. /// Gets the set of <see cref="SqlAppointmentResource"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  319. /// </summary>
  320. public EntitySet<SqlAppointmentResource> SqlAppointmentResources
  321. {
  322. get
  323. {
  324. return base.EntityContainer.GetEntitySet<SqlAppointmentResource>();
  325. }
  326. }
  327. /// <summary>
  328. /// Gets the set of <see cref="SqlAppointment"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  329. /// </summary>
  330. public EntitySet<SqlAppointment> SqlAppointments
  331. {
  332. get
  333. {
  334. return base.EntityContainer.GetEntitySet<SqlAppointment>();
  335. }
  336. }
  337. /// <summary>
  338. /// Gets the set of <see cref="SqlExceptionAppointment"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  339. /// </summary>
  340. public EntitySet<SqlExceptionAppointment> SqlExceptionAppointments
  341. {
  342. get
  343. {
  344. return base.EntityContainer.GetEntitySet<SqlExceptionAppointment>();
  345. }
  346. }
  347. /// <summary>
  348. /// Gets the set of <see cref="SqlExceptionOccurrence"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  349. /// </summary>
  350. public EntitySet<SqlExceptionOccurrence> SqlExceptionOccurrences
  351. {
  352. get
  353. {
  354. return base.EntityContainer.GetEntitySet<SqlExceptionOccurrence>();
  355. }
  356. }
  357. /// <summary>
  358. /// Gets the set of <see cref="SqlExceptionResource"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  359. /// </summary>
  360. public EntitySet<SqlExceptionResource> SqlExceptionResources
  361. {
  362. get
  363. {
  364. return base.EntityContainer.GetEntitySet<SqlExceptionResource>();
  365. }
  366. }
  367. /// <summary>
  368. /// Gets the set of <see cref="SqlResource"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  369. /// </summary>
  370. public EntitySet<SqlResource> SqlResources
  371. {
  372. get
  373. {
  374. return base.EntityContainer.GetEntitySet<SqlResource>();
  375. }
  376. }
  377. /// <summary>
  378. /// Gets the set of <see cref="SqlResourceType"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  379. /// </summary>
  380. public EntitySet<SqlResourceType> SqlResourceTypes
  381. {
  382. get
  383. {
  384. return base.EntityContainer.GetEntitySet<SqlResourceType>();
  385. }
  386. }
  387. /// <summary>
  388. /// Gets the set of <see cref="TimeMarker"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  389. /// </summary>
  390. public EntitySet<TimeMarker> TimeMarkers
  391. {
  392. get
  393. {
  394. return base.EntityContainer.GetEntitySet<TimeMarker>();
  395. }
  396. }
  397. /// <summary>
  398. /// Gets an EntityQuery instance that can be used to load <see cref="Category"/> entity instances using the 'GetCategories' query.
  399. /// </summary>
  400. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Category"/> entity instances.</returns>
  401. public EntityQuery<Category> GetCategoriesQuery()
  402. {
  403. this.ValidateMethod("GetCategoriesQuery", null);
  404. return base.CreateQuery<Category>("GetCategories", null, false, true);
  405. }
  406. /// <summary>
  407. /// Gets an EntityQuery instance that can be used to load <see cref="SqlAppointmentResource"/> entity instances using the 'GetSqlAppointmentResourcesByRange' query.
  408. /// </summary>
  409. /// <param name="start">The value for the 'start' parameter of the query.</param>
  410. /// <param name="end">The value for the 'end' parameter of the query.</param>
  411. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlAppointmentResource"/> entity instances.</returns>
  412. public EntityQuery<SqlAppointmentResource> GetSqlAppointmentResourcesByRangeQuery(DateTime start, DateTime end)
  413. {
  414. Dictionary<string, object> parameters = new Dictionary<string, object>();
  415. parameters.Add("start", start);
  416. parameters.Add("end", end);
  417. this.ValidateMethod("GetSqlAppointmentResourcesByRangeQuery", parameters);
  418. return base.CreateQuery<SqlAppointmentResource>("GetSqlAppointmentResourcesByRange", parameters, false, true);
  419. }
  420. /// <summary>
  421. /// Gets an EntityQuery instance that can be used to load <see cref="SqlAppointment"/> entity instances using the 'GetSqlAppointmentsByRange' query.
  422. /// </summary>
  423. /// <param name="start">The value for the 'start' parameter of the query.</param>
  424. /// <param name="end">The value for the 'end' parameter of the query.</param>
  425. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlAppointment"/> entity instances.</returns>
  426. public EntityQuery<SqlAppointment> GetSqlAppointmentsByRangeQuery(DateTime start, DateTime end)
  427. {
  428. Dictionary<string, object> parameters = new Dictionary<string, object>();
  429. parameters.Add("start", start);
  430. parameters.Add("end", end);
  431. this.ValidateMethod("GetSqlAppointmentsByRangeQuery", parameters);
  432. return base.CreateQuery<SqlAppointment>("GetSqlAppointmentsByRange", parameters, false, true);
  433. }
  434. /// <summary>
  435. /// Gets an EntityQuery instance that can be used to load <see cref="SqlExceptionAppointment"/> entity instances using the 'GetSqlExceptionAppointmentsByRange' query.
  436. /// </summary>
  437. /// <param name="start">The value for the 'start' parameter of the query.</param>
  438. /// <param name="end">The value for the 'end' parameter of the query.</param>
  439. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlExceptionAppointment"/> entity instances.</returns>
  440. public EntityQuery<SqlExceptionAppointment> GetSqlExceptionAppointmentsByRangeQuery(DateTime start, DateTime end)
  441. {
  442. Dictionary<string, object> parameters = new Dictionary<string, object>();
  443. parameters.Add("start", start);
  444. parameters.Add("end", end);
  445. this.ValidateMethod("GetSqlExceptionAppointmentsByRangeQuery", parameters);
  446. return base.CreateQuery<SqlExceptionAppointment>("GetSqlExceptionAppointmentsByRange", parameters, false, true);
  447. }
  448. /// <summary>
  449. /// Gets an EntityQuery instance that can be used to load <see cref="SqlExceptionOccurrence"/> entity instances using the 'GetSqlExceptionOccurrencesByRange' query.
  450. /// </summary>
  451. /// <param name="start">The value for the 'start' parameter of the query.</param>
  452. /// <param name="end">The value for the 'end' parameter of the query.</param>
  453. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlExceptionOccurrence"/> entity instances.</returns>
  454. public EntityQuery<SqlExceptionOccurrence> GetSqlExceptionOccurrencesByRangeQuery(DateTime start, DateTime end)
  455. {
  456. Dictionary<string, object> parameters = new Dictionary<string, object>();
  457. parameters.Add("start", start);
  458. parameters.Add("end", end);
  459. this.ValidateMethod("GetSqlExceptionOccurrencesByRangeQuery", parameters);
  460. return base.CreateQuery<SqlExceptionOccurrence>("GetSqlExceptionOccurrencesByRange", parameters, false, true);
  461. }
  462. /// <summary>
  463. /// Gets an EntityQuery instance that can be used to load <see cref="SqlExceptionResource"/> entity instances using the 'GetSqlExceptionResourcesByRange' query.
  464. /// </summary>
  465. /// <param name="start">The value for the 'start' parameter of the query.</param>
  466. /// <param name="end">The value for the 'end' parameter of the query.</param>
  467. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlExceptionResource"/> entity instances.</returns>
  468. public EntityQuery<SqlExceptionResource> GetSqlExceptionResourcesByRangeQuery(DateTime start, DateTime end)
  469. {
  470. Dictionary<string, object> parameters = new Dictionary<string, object>();
  471. parameters.Add("start", start);
  472. parameters.Add("end", end);
  473. this.ValidateMethod("GetSqlExceptionResourcesByRangeQuery", parameters);
  474. return base.CreateQuery<SqlExceptionResource>("GetSqlExceptionResourcesByRange", parameters, false, true);
  475. }
  476. /// <summary>
  477. /// Gets an EntityQuery instance that can be used to load <see cref="SqlResource"/> entity instances using the 'GetSqlResources' query.
  478. /// </summary>
  479. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlResource"/> entity instances.</returns>
  480. public EntityQuery<SqlResource> GetSqlResourcesQuery()
  481. {
  482. this.ValidateMethod("GetSqlResourcesQuery", null);
  483. return base.CreateQuery<SqlResource>("GetSqlResources", null, false, true);
  484. }
  485. /// <summary>
  486. /// Gets an EntityQuery instance that can be used to load <see cref="SqlResourceType"/> entity instances using the 'GetSqlResourceTypes' query.
  487. /// </summary>
  488. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlResourceType"/> entity instances.</returns>
  489. public EntityQuery<SqlResourceType> GetSqlResourceTypesQuery()
  490. {
  491. this.ValidateMethod("GetSqlResourceTypesQuery", null);
  492. return base.CreateQuery<SqlResourceType>("GetSqlResourceTypes", null, false, true);
  493. }
  494. /// <summary>
  495. /// Gets an EntityQuery instance that can be used to load <see cref="TimeMarker"/> entity instances using the 'GetTimeMarkers' query.
  496. /// </summary>
  497. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="TimeMarker"/> entity instances.</returns>
  498. public EntityQuery<TimeMarker> GetTimeMarkersQuery()
  499. {
  500. this.ValidateMethod("GetTimeMarkersQuery", null);
  501. return base.CreateQuery<TimeMarker>("GetTimeMarkers", null, false, true);
  502. }
  503. /// <summary>
  504. /// Creates a new EntityContainer for this DomainContext's EntitySets.
  505. /// </summary>
  506. /// <returns>A new container instance.</returns>
  507. protected override EntityContainer CreateEntityContainer()
  508. {
  509. return new ScheduleViewDomainContextEntityContainer();
  510. }
  511. /// <summary>
  512. /// Service contract for the 'ScheduleViewDomainService' DomainService.
  513. /// </summary>
  514. [ServiceContract()]
  515. public interface IScheduleViewDomainServiceContract
  516. {
  517. /// <summary>
  518. /// Asynchronously invokes the 'GetCategories' operation.
  519. /// </summary>
  520. /// <param name="callback">Callback to invoke on completion.</param>
  521. /// <param name="asyncState">Optional state object.</param>
  522. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  523. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetCategoriesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  524. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetCategories", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetCategoriesResponse")]
  525. [WebGet()]
  526. IAsyncResult BeginGetCategories(AsyncCallback callback, object asyncState);
  527. /// <summary>
  528. /// Completes the asynchronous operation begun by 'BeginGetCategories'.
  529. /// </summary>
  530. /// <param name="result">The IAsyncResult returned from 'BeginGetCategories'.</param>
  531. /// <returns>The 'QueryResult' returned from the 'GetCategories' operation.</returns>
  532. QueryResult<Category> EndGetCategories(IAsyncResult result);
  533. /// <summary>
  534. /// Asynchronously invokes the 'GetSqlAppointmentResourcesByRange' operation.
  535. /// </summary>
  536. /// <param name="start">The value for the 'start' parameter of this action.</param>
  537. /// <param name="end">The value for the 'end' parameter of this action.</param>
  538. /// <param name="callback">Callback to invoke on completion.</param>
  539. /// <param name="asyncState">Optional state object.</param>
  540. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  541. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentResourcesByRangeDom" +
  542. "ainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  543. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentResourcesByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentResourcesByRangeRes" +
  544. "ponse")]
  545. [WebGet()]
  546. IAsyncResult BeginGetSqlAppointmentResourcesByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  547. /// <summary>
  548. /// Completes the asynchronous operation begun by 'BeginGetSqlAppointmentResourcesByRange'.
  549. /// </summary>
  550. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlAppointmentResourcesByRange'.</param>
  551. /// <returns>The 'QueryResult' returned from the 'GetSqlAppointmentResourcesByRange' operation.</returns>
  552. QueryResult<SqlAppointmentResource> EndGetSqlAppointmentResourcesByRange(IAsyncResult result);
  553. /// <summary>
  554. /// Asynchronously invokes the 'GetSqlAppointmentsByRange' operation.
  555. /// </summary>
  556. /// <param name="start">The value for the 'start' parameter of this action.</param>
  557. /// <param name="end">The value for the 'end' parameter of this action.</param>
  558. /// <param name="callback">Callback to invoke on completion.</param>
  559. /// <param name="asyncState">Optional state object.</param>
  560. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  561. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentsByRangeDomainServi" +
  562. "ceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  563. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentsByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentsByRangeResponse")]
  564. [WebGet()]
  565. IAsyncResult BeginGetSqlAppointmentsByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  566. /// <summary>
  567. /// Completes the asynchronous operation begun by 'BeginGetSqlAppointmentsByRange'.
  568. /// </summary>
  569. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlAppointmentsByRange'.</param>
  570. /// <returns>The 'QueryResult' returned from the 'GetSqlAppointmentsByRange' operation.</returns>
  571. QueryResult<SqlAppointment> EndGetSqlAppointmentsByRange(IAsyncResult result);
  572. /// <summary>
  573. /// Asynchronously invokes the 'GetSqlExceptionAppointmentsByRange' operation.
  574. /// </summary>
  575. /// <param name="start">The value for the 'start' parameter of this action.</param>
  576. /// <param name="end">The value for the 'end' parameter of this action.</param>
  577. /// <param name="callback">Callback to invoke on completion.</param>
  578. /// <param name="asyncState">Optional state object.</param>
  579. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  580. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionAppointmentsByRangeDo" +
  581. "mainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  582. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionAppointmentsByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionAppointmentsByRangeRe" +
  583. "sponse")]
  584. [WebGet()]
  585. IAsyncResult BeginGetSqlExceptionAppointmentsByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  586. /// <summary>
  587. /// Completes the asynchronous operation begun by 'BeginGetSqlExceptionAppointmentsByRange'.
  588. /// </summary>
  589. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlExceptionAppointmentsByRange'.</param>
  590. /// <returns>The 'QueryResult' returned from the 'GetSqlExceptionAppointmentsByRange' operation.</returns>
  591. QueryResult<SqlExceptionAppointment> EndGetSqlExceptionAppointmentsByRange(IAsyncResult result);
  592. /// <summary>
  593. /// Asynchronously invokes the 'GetSqlExceptionOccurrencesByRange' operation.
  594. /// </summary>
  595. /// <param name="start">The value for the 'start' parameter of this action.</param>
  596. /// <param name="end">The value for the 'end' parameter of this action.</param>
  597. /// <param name="callback">Callback to invoke on completion.</param>
  598. /// <param name="asyncState">Optional state object.</param>
  599. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  600. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionOccurrencesByRangeDom" +
  601. "ainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  602. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionOccurrencesByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionOccurrencesByRangeRes" +
  603. "ponse")]
  604. [WebGet()]
  605. IAsyncResult BeginGetSqlExceptionOccurrencesByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  606. /// <summary>
  607. /// Completes the asynchronous operation begun by 'BeginGetSqlExceptionOccurrencesByRange'.
  608. /// </summary>
  609. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlExceptionOccurrencesByRange'.</param>
  610. /// <returns>The 'QueryResult' returned from the 'GetSqlExceptionOccurrencesByRange' operation.</returns>
  611. QueryResult<SqlExceptionOccurrence> EndGetSqlExceptionOccurrencesByRange(IAsyncResult result);
  612. /// <summary>
  613. /// Asynchronously invokes the 'GetSqlExceptionResourcesByRange' operation.
  614. /// </summary>
  615. /// <param name="start">The value for the 'start' parameter of this action.</param>
  616. /// <param name="end">The value for the 'end' parameter of this action.</param>
  617. /// <param name="callback">Callback to invoke on completion.</param>
  618. /// <param name="asyncState">Optional state object.</param>
  619. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  620. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionResourcesByRangeDomai" +
  621. "nServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  622. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionResourcesByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionResourcesByRangeRespo" +
  623. "nse")]
  624. [WebGet()]
  625. IAsyncResult BeginGetSqlExceptionResourcesByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  626. /// <summary>
  627. /// Completes the asynchronous operation begun by 'BeginGetSqlExceptionResourcesByRange'.
  628. /// </summary>
  629. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlExceptionResourcesByRange'.</param>
  630. /// <returns>The 'QueryResult' returned from the 'GetSqlExceptionResourcesByRange' operation.</returns>
  631. QueryResult<SqlExceptionResource> EndGetSqlExceptionResourcesByRange(IAsyncResult result);
  632. /// <summary>
  633. /// Asynchronously invokes the 'GetSqlResources' operation.
  634. /// </summary>
  635. /// <param name="callback">Callback to invoke on completion.</param>
  636. /// <param name="asyncState">Optional state object.</param>
  637. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  638. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResourcesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  639. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResources", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlResourcesResponse")]
  640. [WebGet()]
  641. IAsyncResult BeginGetSqlResources(AsyncCallback callback, object asyncState);
  642. /// <summary>
  643. /// Completes the asynchronous operation begun by 'BeginGetSqlResources'.
  644. /// </summary>
  645. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlResources'.</param>
  646. /// <returns>The 'QueryResult' returned from the 'GetSqlResources' operation.</returns>
  647. QueryResult<SqlResource> EndGetSqlResources(IAsyncResult result);
  648. /// <summary>
  649. /// Asynchronously invokes the 'GetSqlResourceTypes' operation.
  650. /// </summary>
  651. /// <param name="callback">Callback to invoke on completion.</param>
  652. /// <param name="asyncState">Optional state object.</param>
  653. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  654. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResourceTypesDomainServiceFaul" +
  655. "t", Name="DomainServiceFault", Namespace="DomainServices")]
  656. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResourceTypes", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlResourceTypesResponse")]
  657. [WebGet()]
  658. IAsyncResult BeginGetSqlResourceTypes(AsyncCallback callback, object asyncState);
  659. /// <summary>
  660. /// Completes the asynchronous operation begun by 'BeginGetSqlResourceTypes'.
  661. /// </summary>
  662. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlResourceTypes'.</param>
  663. /// <returns>The 'QueryResult' returned from the 'GetSqlResourceTypes' operation.</returns>
  664. QueryResult<SqlResourceType> EndGetSqlResourceTypes(IAsyncResult result);
  665. /// <summary>
  666. /// Asynchronously invokes the 'GetTimeMarkers' operation.
  667. /// </summary>
  668. /// <param name="callback">Callback to invoke on completion.</param>
  669. /// <param name="asyncState">Optional state object.</param>
  670. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  671. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetTimeMarkersDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  672. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetTimeMarkers", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetTimeMarkersResponse")]
  673. [WebGet()]
  674. IAsyncResult BeginGetTimeMarkers(AsyncCallback callback, object asyncState);
  675. /// <summary>
  676. /// Completes the asynchronous operation begun by 'BeginGetTimeMarkers'.
  677. /// </summary>
  678. /// <param name="result">The IAsyncResult returned from 'BeginGetTimeMarkers'.</param>
  679. /// <returns>The 'QueryResult' returned from the 'GetTimeMarkers' operation.</returns>
  680. QueryResult<TimeMarker> EndGetTimeMarkers(IAsyncResult result);
  681. /// <summary>
  682. /// Asynchronously invokes the 'SubmitChanges' operation.
  683. /// </summary>
  684. /// <param name="changeSet">The change-set to submit.</param>
  685. /// <param name="callback">Callback to invoke on completion.</param>
  686. /// <param name="asyncState">Optional state object.</param>
  687. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  688. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  689. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/SubmitChanges", ReplyAction="http://tempuri.org/ScheduleViewDomainService/SubmitChangesResponse")]
  690. IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
  691. /// <summary>
  692. /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
  693. /// </summary>
  694. /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
  695. /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
  696. IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
  697. }
  698. internal sealed class ScheduleViewDomainContextEntityContainer : EntityContainer
  699. {
  700. public ScheduleViewDomainContextEntityContainer()
  701. {
  702. this.CreateEntitySet<Category>(EntitySetOperations.All);
  703. this.CreateEntitySet<SqlAppointment>(EntitySetOperations.All);
  704. this.CreateEntitySet<SqlAppointmentResource>(EntitySetOperations.All);
  705. this.CreateEntitySet<SqlExceptionAppointment>(EntitySetOperations.All);
  706. this.CreateEntitySet<SqlExceptionOccurrence>(EntitySetOperations.All);
  707. this.CreateEntitySet<SqlExceptionResource>(EntitySetOperations.All);
  708. this.CreateEntitySet<SqlResource>(EntitySetOperations.All);
  709. this.CreateEntitySet<SqlResourceType>(EntitySetOperations.All);
  710. this.CreateEntitySet<TimeMarker>(EntitySetOperations.All);
  711. }
  712. }
  713. }
  714. /// <summary>
  715. /// The 'SqlAppointment' entity class.
  716. /// </summary>
  717. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  718. public sealed partial class SqlAppointment : Entity
  719. {
  720. private string _body;
  721. private EntityRef<Category> _category;
  722. private Nullable<int> _categoryID;
  723. private DateTime _end;
  724. private int _importance;
  725. private bool _isAllDayEvent;
  726. private string _recurrencePattern;
  727. private int _sqlAppointmentId;
  728. private EntityCollection<SqlAppointmentResource> _sqlAppointmentResources;
  729. private EntityCollection<SqlExceptionOccurrence> _sqlExceptionOccurrences;
  730. private DateTime _start;
  731. private string _subject;
  732. private EntityRef<TimeMarker> _timeMarker;
  733. private Nullable<int> _timeMarkerID;
  734. private string _timeZoneString;
  735. #region Extensibility Method Definitions
  736. /// <summary>
  737. /// This method is invoked from the constructor once initialization is complete and
  738. /// can be used for further object setup.
  739. /// </summary>
  740. partial void OnCreated();
  741. partial void OnBodyChanging(string value);
  742. partial void OnBodyChanged();
  743. partial void OnCategoryIDChanging(Nullable<int> value);
  744. partial void OnCategoryIDChanged();
  745. partial void OnEndChanging(DateTime value);
  746. partial void OnEndChanged();
  747. partial void OnImportanceChanging(int value);
  748. partial void OnImportanceChanged();
  749. partial void OnIsAllDayEventChanging(bool value);
  750. partial void OnIsAllDayEventChanged();
  751. partial void OnRecurrencePatternChanging(string value);
  752. partial void OnRecurrencePatternChanged();
  753. partial void OnSqlAppointmentIdChanging(int value);
  754. partial void OnSqlAppointmentIdChanged();
  755. partial void OnStartChanging(DateTime value);
  756. partial void OnStartChanged();
  757. partial void OnSubjectChanging(string value);
  758. partial void OnSubjectChanged();
  759. partial void OnTimeMarkerIDChanging(Nullable<int> value);
  760. partial void OnTimeMarkerIDChanged();
  761. partial void OnTimeZoneStringChanging(string value);
  762. partial void OnTimeZoneStringChanged();
  763. #endregion
  764. /// <summary>
  765. /// Initializes a new instance of the <see cref="SqlAppointment"/> class.
  766. /// </summary>
  767. public SqlAppointment()
  768. {
  769. this.OnCreated();
  770. }
  771. /// <summary>
  772. /// Gets or sets the 'Body' value.
  773. /// </summary>
  774. [DataMember()]
  775. [StringLength(500)]
  776. public string Body
  777. {
  778. get
  779. {
  780. return this._body;
  781. }
  782. set
  783. {
  784. if ((this._body != value))
  785. {
  786. this.OnBodyChanging(value);
  787. this.RaiseDataMemberChanging("Body");
  788. this.ValidateProperty("Body", value);
  789. this._body = value;
  790. this.RaiseDataMemberChanged("Body");
  791. this.OnBodyChanged();
  792. }
  793. }
  794. }
  795. /// <summary>
  796. /// Gets or sets the associated <see cref="Category"/> entity.
  797. /// </summary>
  798. [Association("Category_SqlAppointment", "CategoryID", "CategoryID", IsForeignKey=true)]
  799. [XmlIgnore()]
  800. public Category Category
  801. {
  802. get
  803. {
  804. if ((this._category == null))
  805. {
  806. this._category = new EntityRef<Category>(this, "Category", this.FilterCategory);
  807. }
  808. return this._category.Entity;
  809. }
  810. set
  811. {
  812. Category previous = this.Category;
  813. if ((previous != value))
  814. {
  815. this.ValidateProperty("Category", value);
  816. if ((previous != null))
  817. {
  818. this._category.Entity = null;
  819. previous.SqlAppointments.Remove(this);
  820. }
  821. if ((value != null))
  822. {
  823. this.CategoryID = value.CategoryID;
  824. }
  825. else
  826. {
  827. this.CategoryID = default(Nullable<int>);
  828. }
  829. this._category.Entity = value;
  830. if ((value != null))
  831. {
  832. value.SqlAppointments.Add(this);
  833. }
  834. this.RaisePropertyChanged("Category");
  835. }
  836. }
  837. }
  838. /// <summary>
  839. /// Gets or sets the 'CategoryID' value.
  840. /// </summary>
  841. [DataMember()]
  842. [RoundtripOriginal()]
  843. public Nullable<int> CategoryID
  844. {
  845. get
  846. {
  847. return this._categoryID;
  848. }
  849. set
  850. {
  851. if ((this._categoryID != value))
  852. {
  853. this.OnCategoryIDChanging(value);
  854. this.RaiseDataMemberChanging("CategoryID");
  855. this.ValidateProperty("CategoryID", value);
  856. this._categoryID = value;
  857. this.RaiseDataMemberChanged("CategoryID");
  858. this.OnCategoryIDChanged();
  859. }
  860. }
  861. }
  862. /// <summary>
  863. /// Gets or sets the 'End' value.
  864. /// </summary>
  865. [DataMember()]
  866. public DateTime End
  867. {
  868. get
  869. {
  870. return this._end;
  871. }
  872. set
  873. {
  874. if ((this._end != value))
  875. {
  876. this.OnEndChanging(value);
  877. this.RaiseDataMemberChanging("End");
  878. this.ValidateProperty("End", value);
  879. this._end = value;
  880. this.RaiseDataMemberChanged("End");
  881. this.OnEndChanged();
  882. }
  883. }
  884. }
  885. /// <summary>
  886. /// Gets or sets the 'Importance' value.
  887. /// </summary>
  888. [DataMember()]
  889. public int Importance
  890. {
  891. get
  892. {
  893. return this._importance;
  894. }
  895. set
  896. {
  897. if ((this._importance != value))
  898. {
  899. this.OnImportanceChanging(value);
  900. this.RaiseDataMemberChanging("Importance");
  901. this.ValidateProperty("Importance", value);
  902. this._importance = value;
  903. this.RaiseDataMemberChanged("Importance");
  904. this.OnImportanceChanged();
  905. }
  906. }
  907. }
  908. /// <summary>
  909. /// Gets or sets the 'IsAllDayEvent' value.
  910. /// </summary>
  911. [DataMember()]
  912. public bool IsAllDayEvent
  913. {
  914. get
  915. {
  916. return this._isAllDayEvent;
  917. }
  918. set
  919. {
  920. if ((this._isAllDayEvent != value))
  921. {
  922. this.OnIsAllDayEventChanging(value);
  923. this.RaiseDataMemberChanging("IsAllDayEvent");
  924. this.ValidateProperty("IsAllDayEvent", value);
  925. this._isAllDayEvent = value;
  926. this.RaiseDataMemberChanged("IsAllDayEvent");
  927. this.OnIsAllDayEventChanged();
  928. }
  929. }
  930. }
  931. /// <summary>
  932. /// Gets or sets the 'RecurrencePattern' value.
  933. /// </summary>
  934. [DataMember()]
  935. [StringLength(100)]
  936. public string RecurrencePattern
  937. {
  938. get
  939. {
  940. return this._recurrencePattern;
  941. }
  942. set
  943. {
  944. if ((this._recurrencePattern != value))
  945. {
  946. this.OnRecurrencePatternChanging(value);
  947. this.RaiseDataMemberChanging("RecurrencePattern");
  948. this.ValidateProperty("RecurrencePattern", value);
  949. this._recurrencePattern = value;
  950. this.RaiseDataMemberChanged("RecurrencePattern");
  951. this.OnRecurrencePatternChanged();
  952. }
  953. }
  954. }
  955. /// <summary>
  956. /// Gets or sets the 'SqlAppointmentId' value.
  957. /// </summary>
  958. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  959. [DataMember()]
  960. [Editable(false, AllowInitialValue=true)]
  961. [Key()]
  962. [RoundtripOriginal()]
  963. public int SqlAppointmentId
  964. {
  965. get
  966. {
  967. return this._sqlAppointmentId;
  968. }
  969. set
  970. {
  971. if ((this._sqlAppointmentId != value))
  972. {
  973. this.OnSqlAppointmentIdChanging(value);
  974. this.ValidateProperty("SqlAppointmentId", value);
  975. this._sqlAppointmentId = value;
  976. this.RaisePropertyChanged("SqlAppointmentId");
  977. this.OnSqlAppointmentIdChanged();
  978. }
  979. }
  980. }
  981. /// <summary>
  982. /// Gets the collection of associated <see cref="SqlAppointmentResource"/> entity instances.
  983. /// </summary>
  984. [Association("SqlAppointment_SqlAppointmentResource", "SqlAppointmentId", "SqlAppointments_SqlAppointmentId")]
  985. [XmlIgnore()]
  986. public EntityCollection<SqlAppointmentResource> SqlAppointmentResources
  987. {
  988. get
  989. {
  990. if ((this._sqlAppointmentResources == null))
  991. {
  992. this._sqlAppointmentResources = new EntityCollection<SqlAppointmentResource>(this, "SqlAppointmentResources", this.FilterSqlAppointmentResources, this.AttachSqlAppointmentResources, this.DetachSqlAppointmentResources);
  993. }
  994. return this._sqlAppointmentResources;
  995. }
  996. }
  997. /// <summary>
  998. /// Gets the collection of associated <see cref="SqlExceptionOccurrence"/> entity instances.
  999. /// </summary>
  1000. [Association("SqlAppointment_SqlExceptionOccurrence", "SqlAppointmentId", "MasterSqlAppointmentId")]
  1001. [XmlIgnore()]
  1002. public EntityCollection<SqlExceptionOccurrence> SqlExceptionOccurrences
  1003. {
  1004. get
  1005. {
  1006. if ((this._sqlExceptionOccurrences == null))
  1007. {
  1008. this._sqlExceptionOccurrences = new EntityCollection<SqlExceptionOccurrence>(this, "SqlExceptionOccurrences", this.FilterSqlExceptionOccurrences, this.AttachSqlExceptionOccurrences, this.DetachSqlExceptionOccurrences);
  1009. }
  1010. return this._sqlExceptionOccurrences;
  1011. }
  1012. }
  1013. /// <summary>
  1014. /// Gets or sets the 'Start' value.
  1015. /// </summary>
  1016. [DataMember()]
  1017. public DateTime Start
  1018. {
  1019. get
  1020. {
  1021. return this._start;
  1022. }
  1023. set
  1024. {
  1025. if ((this._start != value))
  1026. {
  1027. this.OnStartChanging(value);
  1028. this.RaiseDataMemberChanging("Start");
  1029. this.ValidateProperty("Start", value);
  1030. this._start = value;
  1031. this.RaiseDataMemberChanged("Start");
  1032. this.OnStartChanged();
  1033. }
  1034. }
  1035. }
  1036. /// <summary>
  1037. /// Gets or sets the 'Subject' value.
  1038. /// </summary>
  1039. [DataMember()]
  1040. [StringLength(100)]
  1041. public string Subject
  1042. {
  1043. get
  1044. {
  1045. return this._subject;
  1046. }
  1047. set
  1048. {
  1049. if ((this._subject != value))
  1050. {
  1051. this.OnSubjectChanging(value);
  1052. this.RaiseDataMemberChanging("Subject");
  1053. this.ValidateProperty("Subject", value);
  1054. this._subject = value;
  1055. this.RaiseDataMemberChanged("Subject");
  1056. this.OnSubjectChanged();
  1057. }
  1058. }
  1059. }
  1060. /// <summary>
  1061. /// Gets or sets the associated <see cref="TimeMarker"/> entity.
  1062. /// </summary>
  1063. [Association("TimeMarker_SqlAppointment", "TimeMarkerID", "TimeMarkersId", IsForeignKey=true)]
  1064. [XmlIgnore()]
  1065. public TimeMarker TimeMarker
  1066. {
  1067. get
  1068. {
  1069. if ((this._timeMarker == null))
  1070. {
  1071. this._timeMarker = new EntityRef<TimeMarker>(this, "TimeMarker", this.FilterTimeMarker);
  1072. }
  1073. return this._timeMarker.Entity;
  1074. }
  1075. set
  1076. {
  1077. TimeMarker previous = this.TimeMarker;
  1078. if ((previous != value))
  1079. {
  1080. this.ValidateProperty("TimeMarker", value);
  1081. if ((previous != null))
  1082. {
  1083. this._timeMarker.Entity = null;
  1084. previous.SqlAppointments.Remove(this);
  1085. }
  1086. if ((value != null))
  1087. {
  1088. this.TimeMarkerID = value.TimeMarkersId;
  1089. }
  1090. else
  1091. {
  1092. this.TimeMarkerID = default(Nullable<int>);
  1093. }
  1094. this._timeMarker.Entity = value;
  1095. if ((value != null))
  1096. {
  1097. value.SqlAppointments.Add(this);
  1098. }
  1099. this.RaisePropertyChanged("TimeMarker");
  1100. }
  1101. }
  1102. }
  1103. /// <summary>
  1104. /// Gets or sets the 'TimeMarkerID' value.
  1105. /// </summary>
  1106. [DataMember()]
  1107. [RoundtripOriginal()]
  1108. public Nullable<int> TimeMarkerID
  1109. {
  1110. get
  1111. {
  1112. return this._timeMarkerID;
  1113. }
  1114. set
  1115. {
  1116. if ((this._timeMarkerID != value))
  1117. {
  1118. this.OnTimeMarkerIDChanging(value);
  1119. this.RaiseDataMemberChanging("TimeMarkerID");
  1120. this.ValidateProperty("TimeMarkerID", value);
  1121. this._timeMarkerID = value;
  1122. this.RaiseDataMemberChanged("TimeMarkerID");
  1123. this.OnTimeMarkerIDChanged();
  1124. }
  1125. }
  1126. }
  1127. /// <summary>
  1128. /// Gets or sets the 'TimeZoneString' value.
  1129. /// </summary>
  1130. [DataMember()]
  1131. [StringLength(100)]
  1132. public string TimeZoneString
  1133. {
  1134. get
  1135. {
  1136. return this._timeZoneString;
  1137. }
  1138. set
  1139. {
  1140. if ((this._timeZoneString != value))
  1141. {
  1142. this.OnTimeZoneStringChanging(value);
  1143. this.RaiseDataMemberChanging("TimeZoneString");
  1144. this.ValidateProperty("TimeZoneString", value);
  1145. this._timeZoneString = value;
  1146. this.RaiseDataMemberChanged("TimeZoneString");
  1147. this.OnTimeZoneStringChanged();
  1148. }
  1149. }
  1150. }
  1151. private bool FilterCategory(Category entity)
  1152. {
  1153. return (entity.CategoryID == this.CategoryID);
  1154. }
  1155. private void AttachSqlAppointmentResources(SqlAppointmentResource entity)
  1156. {
  1157. entity.SqlAppointment = this;
  1158. }
  1159. private void DetachSqlAppointmentResources(SqlAppointmentResource entity)
  1160. {
  1161. entity.SqlAppointment = null;
  1162. }
  1163. private bool FilterSqlAppointmentResources(SqlAppointmentResource entity)
  1164. {
  1165. return (entity.SqlAppointments_SqlAppointmentId == this.SqlAppointmentId);
  1166. }
  1167. private void AttachSqlExceptionOccurrences(SqlExceptionOccurrence entity)
  1168. {
  1169. entity.SqlAppointment = this;
  1170. }
  1171. private void DetachSqlExceptionOccurrences(SqlExceptionOccurrence entity)
  1172. {
  1173. entity.SqlAppointment = null;
  1174. }
  1175. private bool FilterSqlExceptionOccurrences(SqlExceptionOccurrence entity)
  1176. {
  1177. return (entity.MasterSqlAppointmentId == this.SqlAppointmentId);
  1178. }
  1179. private bool FilterTimeMarker(TimeMarker entity)
  1180. {
  1181. return (entity.TimeMarkersId == this.TimeMarkerID);
  1182. }
  1183. /// <summary>
  1184. /// Computes a value from the key fields that uniquely identifies this entity instance.
  1185. /// </summary>
  1186. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  1187. public override object GetIdentity()
  1188. {
  1189. return this._sqlAppointmentId;
  1190. }
  1191. }
  1192. /// <summary>
  1193. /// The 'SqlAppointmentResource' entity class.
  1194. /// </summary>
  1195. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  1196. public sealed partial class SqlAppointmentResource : Entity
  1197. {
  1198. private Nullable<bool> _manyToManyWorkaround;
  1199. private EntityRef<SqlAppointment> _sqlAppointment;
  1200. private int _sqlAppointments_SqlAppointmentId;
  1201. private EntityRef<SqlResource> _sqlResource;
  1202. private int _sqlResources_SqlResourceId;
  1203. #region Extensibility Method Definitions
  1204. /// <summary>
  1205. /// This method is invoked from the constructor once initialization is complete and
  1206. /// can be used for further object setup.
  1207. /// </summary>
  1208. partial void OnCreated();
  1209. partial void OnManyToManyWorkaroundChanging(Nullable<bool> value);
  1210. partial void OnManyToManyWorkaroundChanged();
  1211. partial void OnSqlAppointments_SqlAppointmentIdChanging(int value);
  1212. partial void OnSqlAppointments_SqlAppointmentIdChanged();
  1213. partial void OnSqlResources_SqlResourceIdChanging(int value);
  1214. partial void OnSqlResources_SqlResourceIdChanged();
  1215. #endregion
  1216. /// <summary>
  1217. /// Initializes a new instance of the <see cref="SqlAppointmentResource"/> class.
  1218. /// </summary>
  1219. public SqlAppointmentResource()
  1220. {
  1221. this.OnCreated();
  1222. }
  1223. /// <summary>
  1224. /// Gets or sets the 'ManyToManyWorkaround' value.
  1225. /// </summary>
  1226. [DataMember()]
  1227. public Nullable<bool> ManyToManyWorkaround
  1228. {
  1229. get
  1230. {
  1231. return this._manyToManyWorkaround;
  1232. }
  1233. set
  1234. {
  1235. if ((this._manyToManyWorkaround != value))
  1236. {
  1237. this.OnManyToManyWorkaroundChanging(value);
  1238. this.RaiseDataMemberChanging("ManyToManyWorkaround");
  1239. this.ValidateProperty("ManyToManyWorkaround", value);
  1240. this._manyToManyWorkaround = value;
  1241. this.RaiseDataMemberChanged("ManyToManyWorkaround");
  1242. this.OnManyToManyWorkaroundChanged();
  1243. }
  1244. }
  1245. }
  1246. /// <summary>
  1247. /// Gets or sets the associated <see cref="SqlAppointment"/> entity.
  1248. /// </summary>
  1249. [Association("SqlAppointment_SqlAppointmentResource", "SqlAppointments_SqlAppointmentId", "SqlAppointmentId", IsForeignKey=true)]
  1250. [XmlIgnore()]
  1251. public SqlAppointment SqlAppointment
  1252. {
  1253. get
  1254. {
  1255. if ((this._sqlAppointment == null))
  1256. {
  1257. this._sqlAppointment = new EntityRef<SqlAppointment>(this, "SqlAppointment", this.FilterSqlAppointment);
  1258. }
  1259. return this._sqlAppointment.Entity;
  1260. }
  1261. set
  1262. {
  1263. SqlAppointment previous = this.SqlAppointment;
  1264. if ((previous != value))
  1265. {
  1266. this.ValidateProperty("SqlAppointment", value);
  1267. if ((previous != null))
  1268. {
  1269. this._sqlAppointment.Entity = null;
  1270. previous.SqlAppointmentResources.Remove(this);
  1271. }
  1272. if ((value != null))
  1273. {
  1274. this.SqlAppointments_SqlAppointmentId = value.SqlAppointmentId;
  1275. }
  1276. else
  1277. {
  1278. this.SqlAppointments_SqlAppointmentId = default(int);
  1279. }
  1280. this._sqlAppointment.Entity = value;
  1281. if ((value != null))
  1282. {
  1283. value.SqlAppointmentResources.Add(this);
  1284. }
  1285. this.RaisePropertyChanged("SqlAppointment");
  1286. }
  1287. }
  1288. }
  1289. /// <summary>
  1290. /// Gets or sets the 'SqlAppointments_SqlAppointmentId' value.
  1291. /// </summary>
  1292. [DataMember()]
  1293. [Key()]
  1294. [RoundtripOriginal()]
  1295. public int SqlAppointments_SqlAppointmentId
  1296. {
  1297. get
  1298. {
  1299. return this._sqlAppointments_SqlAppointmentId;
  1300. }
  1301. set
  1302. {
  1303. if ((this._sqlAppointments_SqlAppointmentId != value))
  1304. {
  1305. this.OnSqlAppointments_SqlAppointmentIdChanging(value);
  1306. this.RaiseDataMemberChanging("SqlAppointments_SqlAppointmentId");
  1307. this.ValidateProperty("SqlAppointments_SqlAppointmentId", value);
  1308. this._sqlAppointments_SqlAppointmentId = value;
  1309. this.RaiseDataMemberChanged("SqlAppointments_SqlAppointmentId");
  1310. this.OnSqlAppointments_SqlAppointmentIdChanged();
  1311. }
  1312. }
  1313. }
  1314. /// <summary>
  1315. /// Gets or sets the associated <see cref="SqlResource"/> entity.
  1316. /// </summary>
  1317. [Association("SqlResource_SqlAppointmentResource", "SqlResources_SqlResourceId", "SqlResourceId", IsForeignKey=true)]
  1318. [XmlIgnore()]
  1319. public SqlResource SqlResource
  1320. {
  1321. get
  1322. {
  1323. if ((this._sqlResource == null))
  1324. {
  1325. this._sqlResource = new EntityRef<SqlResource>(this, "SqlResource", this.FilterSqlResource);
  1326. }
  1327. return this._sqlResource.Entity;
  1328. }
  1329. set
  1330. {
  1331. SqlResource previous = this.SqlResource;
  1332. if ((previous != value))
  1333. {
  1334. this.ValidateProperty("SqlResource", value);
  1335. if ((previous != null))
  1336. {
  1337. this._sqlResource.Entity = null;
  1338. previous.SqlAppointmentResources.Remove(this);
  1339. }
  1340. if ((value != null))
  1341. {
  1342. this.SqlResources_SqlResourceId = value.SqlResourceId;
  1343. }
  1344. else
  1345. {
  1346. this.SqlResources_SqlResourceId = default(int);
  1347. }
  1348. this._sqlResource.Entity = value;
  1349. if ((value != null))
  1350. {
  1351. value.SqlAppointmentResources.Add(this);
  1352. }
  1353. this.RaisePropertyChanged("SqlResource");
  1354. }
  1355. }
  1356. }
  1357. /// <summary>
  1358. /// Gets or sets the 'SqlResources_SqlResourceId' value.
  1359. /// </summary>
  1360. [DataMember()]
  1361. [Key()]
  1362. [RoundtripOriginal()]
  1363. public int SqlResources_SqlResourceId
  1364. {
  1365. get
  1366. {
  1367. return this._sqlResources_SqlResourceId;
  1368. }
  1369. set
  1370. {
  1371. if ((this._sqlResources_SqlResourceId != value))
  1372. {
  1373. this.OnSqlResources_SqlResourceIdChanging(value);
  1374. this.RaiseDataMemberChanging("SqlResources_SqlResourceId");
  1375. this.ValidateProperty("SqlResources_SqlResourceId", value);
  1376. this._sqlResources_SqlResourceId = value;
  1377. this.RaiseDataMemberChanged("SqlResources_SqlResourceId");
  1378. this.OnSqlResources_SqlResourceIdChanged();
  1379. }
  1380. }
  1381. }
  1382. private bool FilterSqlAppointment(SqlAppointment entity)
  1383. {
  1384. return (entity.SqlAppointmentId == this.SqlAppointments_SqlAppointmentId);
  1385. }
  1386. private bool FilterSqlResource(SqlResource entity)
  1387. {
  1388. return (entity.SqlResourceId == this.SqlResources_SqlResourceId);
  1389. }
  1390. /// <summary>
  1391. /// Computes a value from the key fields that uniquely identifies this entity instance.
  1392. /// </summary>
  1393. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  1394. public override object GetIdentity()
  1395. {
  1396. return EntityKey.Create(this._sqlAppointments_SqlAppointmentId, this._sqlResources_SqlResourceId);
  1397. }
  1398. }
  1399. /// <summary>
  1400. /// The 'SqlExceptionAppointment' entity class.
  1401. /// </summary>
  1402. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  1403. public sealed partial class SqlExceptionAppointment : Entity
  1404. {
  1405. private string _body;
  1406. private EntityRef<Category> _category;
  1407. private Nullable<int> _categoryID;
  1408. private DateTime _end;
  1409. private int _exceptionId;
  1410. private int _importance;
  1411. private bool _isAllDayEvent;
  1412. private EntityRef<SqlExceptionOccurrence> _sqlExceptionOccurrence;
  1413. private EntityCollection<SqlExceptionResource> _sqlExceptionResources;
  1414. private DateTime _start;
  1415. private string _subject;
  1416. private EntityRef<TimeMarker> _timeMarker;
  1417. private Nullable<int> _timeMarkerID;
  1418. private string _timeZoneString;
  1419. #region Extensibility Method Definitions
  1420. /// <summary>
  1421. /// This method is invoked from the constructor once initialization is complete and
  1422. /// can be used for further object setup.
  1423. /// </summary>
  1424. partial void OnCreated();
  1425. partial void OnBodyChanging(string value);
  1426. partial void OnBodyChanged();
  1427. partial void OnCategoryIDChanging(Nullable<int> value);
  1428. partial void OnCategoryIDChanged();
  1429. partial void OnEndChanging(DateTime value);
  1430. partial void OnEndChanged();
  1431. partial void OnExceptionIdChanging(int value);
  1432. partial void OnExceptionIdChanged();
  1433. partial void OnImportanceChanging(int value);
  1434. partial void OnImportanceChanged();
  1435. partial void OnIsAllDayEventChanging(bool value);
  1436. partial void OnIsAllDayEventChanged();
  1437. partial void OnStartChanging(DateTime value);
  1438. partial void OnStartChanged();
  1439. partial void OnSubjectChanging(string value);
  1440. partial void OnSubjectChanged();
  1441. partial void OnTimeMarkerIDChanging(Nullable<int> value);
  1442. partial void OnTimeMarkerIDChanged();
  1443. partial void OnTimeZoneStringChanging(string value);
  1444. partial void OnTimeZoneStringChanged();
  1445. #endregion
  1446. /// <summary>
  1447. /// Initializes a new instance of the <see cref="SqlExceptionAppointment"/> class.
  1448. /// </summary>
  1449. public SqlExceptionAppointment()
  1450. {
  1451. this.OnCreated();
  1452. }
  1453. /// <summary>
  1454. /// Gets or sets the 'Body' value.
  1455. /// </summary>
  1456. [DataMember()]
  1457. [StringLength(500)]
  1458. public string Body
  1459. {
  1460. get
  1461. {
  1462. return this._body;
  1463. }
  1464. set
  1465. {
  1466. if ((this._body != value))
  1467. {
  1468. this.OnBodyChanging(value);
  1469. this.RaiseDataMemberChanging("Body");
  1470. this.ValidateProperty("Body", value);
  1471. this._body = value;
  1472. this.RaiseDataMemberChanged("Body");
  1473. this.OnBodyChanged();
  1474. }
  1475. }
  1476. }
  1477. /// <summary>
  1478. /// Gets or sets the associated <see cref="Category"/> entity.
  1479. /// </summary>
  1480. [Association("Category_SqlExceptionAppointment", "CategoryID", "CategoryID", IsForeignKey=true)]
  1481. [XmlIgnore()]
  1482. public Category Category
  1483. {
  1484. get
  1485. {
  1486. if ((this._category == null))
  1487. {
  1488. this._category = new EntityRef<Category>(this, "Category", this.FilterCategory);
  1489. }
  1490. return this._category.Entity;
  1491. }
  1492. set
  1493. {
  1494. Category previous = this.Category;
  1495. if ((previous != value))
  1496. {
  1497. this.ValidateProperty("Category", value);
  1498. if ((previous != null))
  1499. {
  1500. this._category.Entity = null;
  1501. previous.SqlExceptionAppointments.Remove(this);
  1502. }
  1503. if ((value != null))
  1504. {
  1505. this.CategoryID = value.CategoryID;
  1506. }
  1507. else
  1508. {
  1509. this.CategoryID = default(Nullable<int>);
  1510. }
  1511. this._category.Entity = value;
  1512. if ((value != null))
  1513. {
  1514. value.SqlExceptionAppointments.Add(this);
  1515. }
  1516. this.RaisePropertyChanged("Category");
  1517. }
  1518. }
  1519. }
  1520. /// <summary>
  1521. /// Gets or sets the 'CategoryID' value.
  1522. /// </summary>
  1523. [DataMember()]
  1524. [RoundtripOriginal()]
  1525. public Nullable<int> CategoryID
  1526. {
  1527. get
  1528. {
  1529. return this._categoryID;
  1530. }
  1531. set
  1532. {
  1533. if ((this._categoryID != value))
  1534. {
  1535. this.OnCategoryIDChanging(value);
  1536. this.RaiseDataMemberChanging("CategoryID");
  1537. this.ValidateProperty("CategoryID", value);
  1538. this._categoryID = value;
  1539. this.RaiseDataMemberChanged("CategoryID");
  1540. this.OnCategoryIDChanged();
  1541. }
  1542. }
  1543. }
  1544. /// <summary>
  1545. /// Gets or sets the 'End' value.
  1546. /// </summary>
  1547. [DataMember()]
  1548. public DateTime End
  1549. {
  1550. get
  1551. {
  1552. return this._end;
  1553. }
  1554. set
  1555. {
  1556. if ((this._end != value))
  1557. {
  1558. this.OnEndChanging(value);
  1559. this.RaiseDataMemberChanging("End");
  1560. this.ValidateProperty("End", value);
  1561. this._end = value;
  1562. this.RaiseDataMemberChanged("End");
  1563. this.OnEndChanged();
  1564. }
  1565. }
  1566. }
  1567. /// <summary>
  1568. /// Gets or sets the 'ExceptionId' value.
  1569. /// </summary>
  1570. [DataMember()]
  1571. [Key()]
  1572. [RoundtripOriginal()]
  1573. public int ExceptionId
  1574. {
  1575. get
  1576. {
  1577. return this._exceptionId;
  1578. }
  1579. set
  1580. {
  1581. if ((this._exceptionId != value))
  1582. {
  1583. this.OnExceptionIdChanging(value);
  1584. this.RaiseDataMemberChanging("ExceptionId");
  1585. this.ValidateProperty("ExceptionId", value);
  1586. this._exceptionId = value;
  1587. this.RaiseDataMemberChanged("ExceptionId");
  1588. this.OnExceptionIdChanged();
  1589. }
  1590. }
  1591. }
  1592. /// <summary>
  1593. /// Gets or sets the 'Importance' value.
  1594. /// </summary>
  1595. [DataMember()]
  1596. public int Importance
  1597. {
  1598. get
  1599. {
  1600. return this._importance;
  1601. }
  1602. set
  1603. {
  1604. if ((this._importance != value))
  1605. {
  1606. this.OnImportanceChanging(value);
  1607. this.RaiseDataMemberChanging("Importance");
  1608. this.ValidateProperty("Importance", value);
  1609. this._importance = value;
  1610. this.RaiseDataMemberChanged("Importance");
  1611. this.OnImportanceChanged();
  1612. }
  1613. }
  1614. }
  1615. /// <summary>
  1616. /// Gets or sets the 'IsAllDayEvent' value.
  1617. /// </summary>
  1618. [DataMember()]
  1619. public bool IsAllDayEvent
  1620. {
  1621. get
  1622. {
  1623. return this._isAllDayEvent;
  1624. }
  1625. set
  1626. {
  1627. if ((this._isAllDayEvent != value))
  1628. {
  1629. this.OnIsAllDayEventChanging(value);
  1630. this.RaiseDataMemberChanging("IsAllDayEvent");
  1631. this.ValidateProperty("IsAllDayEvent", value);
  1632. this._isAllDayEvent = value;
  1633. this.RaiseDataMemberChanged("IsAllDayEvent");
  1634. this.OnIsAllDayEventChanged();
  1635. }
  1636. }
  1637. }
  1638. /// <summary>
  1639. /// Gets or sets the associated <see cref="SqlExceptionOccurrence"/> entity.
  1640. /// </summary>
  1641. [Association("SqlExceptionOccurrence_SqlExceptionAppointment", "ExceptionId", "ExceptionId", IsForeignKey=true)]
  1642. [XmlIgnore()]
  1643. public SqlExceptionOccurrence SqlExceptionOccurrence
  1644. {
  1645. get
  1646. {
  1647. if ((this._sqlExceptionOccurrence == null))
  1648. {
  1649. this._sqlExceptionOccurrence = new EntityRef<SqlExceptionOccurrence>(this, "SqlExceptionOccurrence", this.FilterSqlExceptionOccurrence);
  1650. }
  1651. return this._sqlExceptionOccurrence.Entity;
  1652. }
  1653. set
  1654. {
  1655. SqlExceptionOccurrence previous = this.SqlExceptionOccurrence;
  1656. if ((previous != value))
  1657. {
  1658. this.ValidateProperty("SqlExceptionOccurrence", value);
  1659. if ((previous != null))
  1660. {
  1661. this._sqlExceptionOccurrence.Entity = null;
  1662. previous.SqlExceptionAppointment = null;
  1663. }
  1664. if ((value != null))
  1665. {
  1666. this.ExceptionId = value.ExceptionId;
  1667. }
  1668. else
  1669. {
  1670. this.ExceptionId = default(int);
  1671. }
  1672. this._sqlExceptionOccurrence.Entity = value;
  1673. if ((value != null))
  1674. {
  1675. value.SqlExceptionAppointment = this;
  1676. }
  1677. this.RaisePropertyChanged("SqlExceptionOccurrence");
  1678. }
  1679. }
  1680. }
  1681. /// <summary>
  1682. /// Gets the collection of associated <see cref="SqlExceptionResource"/> entity instances.
  1683. /// </summary>
  1684. [Association("SqlExceptionAppointment_SqlExceptionResource", "ExceptionId", "SqlExceptionAppointments_ExceptionId")]
  1685. [XmlIgnore()]
  1686. public EntityCollection<SqlExceptionResource> SqlExceptionResources
  1687. {
  1688. get
  1689. {
  1690. if ((this._sqlExceptionResources == null))
  1691. {
  1692. this._sqlExceptionResources = new EntityCollection<SqlExceptionResource>(this, "SqlExceptionResources", this.FilterSqlExceptionResources, this.AttachSqlExceptionResources, this.DetachSqlExceptionResources);
  1693. }
  1694. return this._sqlExceptionResources;
  1695. }
  1696. }
  1697. /// <summary>
  1698. /// Gets or sets the 'Start' value.
  1699. /// </summary>
  1700. [DataMember()]
  1701. public DateTime Start
  1702. {
  1703. get
  1704. {
  1705. return this._start;
  1706. }
  1707. set
  1708. {
  1709. if ((this._start != value))
  1710. {
  1711. this.OnStartChanging(value);
  1712. this.RaiseDataMemberChanging("Start");
  1713. this.ValidateProperty("Start", value);
  1714. this._start = value;
  1715. this.RaiseDataMemberChanged("Start");
  1716. this.OnStartChanged();
  1717. }
  1718. }
  1719. }
  1720. /// <summary>
  1721. /// Gets or sets the 'Subject' value.
  1722. /// </summary>
  1723. [DataMember()]
  1724. [StringLength(100)]
  1725. public string Subject
  1726. {
  1727. get
  1728. {
  1729. return this._subject;
  1730. }
  1731. set
  1732. {
  1733. if ((this._subject != value))
  1734. {
  1735. this.OnSubjectChanging(value);
  1736. this.RaiseDataMemberChanging("Subject");
  1737. this.ValidateProperty("Subject", value);
  1738. this._subject = value;
  1739. this.RaiseDataMemberChanged("Subject");
  1740. this.OnSubjectChanged();
  1741. }
  1742. }
  1743. }
  1744. /// <summary>
  1745. /// Gets or sets the associated <see cref="TimeMarker"/> entity.
  1746. /// </summary>
  1747. [Association("TimeMarker_SqlExceptionAppointment", "TimeMarkerID", "TimeMarkersId", IsForeignKey=true)]
  1748. [XmlIgnore()]
  1749. public TimeMarker TimeMarker
  1750. {
  1751. get
  1752. {
  1753. if ((this._timeMarker == null))
  1754. {
  1755. this._timeMarker = new EntityRef<TimeMarker>(this, "TimeMarker", this.FilterTimeMarker);
  1756. }
  1757. return this._timeMarker.Entity;
  1758. }
  1759. set
  1760. {
  1761. TimeMarker previous = this.TimeMarker;
  1762. if ((previous != value))
  1763. {
  1764. this.ValidateProperty("TimeMarker", value);
  1765. if ((previous != null))
  1766. {
  1767. this._timeMarker.Entity = null;
  1768. previous.SqlExceptionAppointments.Remove(this);
  1769. }
  1770. if ((value != null))
  1771. {
  1772. this.TimeMarkerID = value.TimeMarkersId;
  1773. }
  1774. else
  1775. {
  1776. this.TimeMarkerID = default(Nullable<int>);
  1777. }
  1778. this._timeMarker.Entity = value;
  1779. if ((value != null))
  1780. {
  1781. value.SqlExceptionAppointments.Add(this);
  1782. }
  1783. this.RaisePropertyChanged("TimeMarker");
  1784. }
  1785. }
  1786. }
  1787. /// <summary>
  1788. /// Gets or sets the 'TimeMarkerID' value.
  1789. /// </summary>
  1790. [DataMember()]
  1791. [RoundtripOriginal()]
  1792. public Nullable<int> TimeMarkerID
  1793. {
  1794. get
  1795. {
  1796. return this._timeMarkerID;
  1797. }
  1798. set
  1799. {
  1800. if ((this._timeMarkerID != value))
  1801. {
  1802. this.OnTimeMarkerIDChanging(value);
  1803. this.RaiseDataMemberChanging("TimeMarkerID");
  1804. this.ValidateProperty("TimeMarkerID", value);
  1805. this._timeMarkerID = value;
  1806. this.RaiseDataMemberChanged("TimeMarkerID");
  1807. this.OnTimeMarkerIDChanged();
  1808. }
  1809. }
  1810. }
  1811. /// <summary>
  1812. /// Gets or sets the 'TimeZoneString' value.
  1813. /// </summary>
  1814. [DataMember()]
  1815. [StringLength(100)]
  1816. public string TimeZoneString
  1817. {
  1818. get
  1819. {
  1820. return this._timeZoneString;
  1821. }
  1822. set
  1823. {
  1824. if ((this._timeZoneString != value))
  1825. {
  1826. this.OnTimeZoneStringChanging(value);
  1827. this.RaiseDataMemberChanging("TimeZoneString");
  1828. this.ValidateProperty("TimeZoneString", value);
  1829. this._timeZoneString = value;
  1830. this.RaiseDataMemberChanged("TimeZoneString");
  1831. this.OnTimeZoneStringChanged();
  1832. }
  1833. }
  1834. }
  1835. private bool FilterCategory(Category entity)
  1836. {
  1837. return (entity.CategoryID == this.CategoryID);
  1838. }
  1839. private bool FilterSqlExceptionOccurrence(SqlExceptionOccurrence entity)
  1840. {
  1841. return (entity.ExceptionId == this.ExceptionId);
  1842. }
  1843. private void AttachSqlExceptionResources(SqlExceptionResource entity)
  1844. {
  1845. entity.SqlExceptionAppointment = this;
  1846. }
  1847. private void DetachSqlExceptionResources(SqlExceptionResource entity)
  1848. {
  1849. entity.SqlExceptionAppointment = null;
  1850. }
  1851. private bool FilterSqlExceptionResources(SqlExceptionResource entity)
  1852. {
  1853. return (entity.SqlExceptionAppointments_ExceptionId == this.ExceptionId);
  1854. }
  1855. private bool FilterTimeMarker(TimeMarker entity)
  1856. {
  1857. return (entity.TimeMarkersId == this.TimeMarkerID);
  1858. }
  1859. /// <summary>
  1860. /// Computes a value from the key fields that uniquely identifies this entity instance.
  1861. /// </summary>
  1862. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  1863. public override object GetIdentity()
  1864. {
  1865. return this._exceptionId;
  1866. }
  1867. }
  1868. /// <summary>
  1869. /// The 'SqlExceptionOccurrence' entity class.
  1870. /// </summary>
  1871. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  1872. public sealed partial class SqlExceptionOccurrence : Entity
  1873. {
  1874. private DateTime _exceptionDate;
  1875. private int _exceptionId;
  1876. private int _masterSqlAppointmentId;
  1877. private EntityRef<SqlAppointment> _sqlAppointment;
  1878. private EntityRef<SqlExceptionAppointment> _sqlExceptionAppointment;
  1879. #region Extensibility Method Definitions
  1880. /// <summary>
  1881. /// This method is invoked from the constructor once initialization is complete and
  1882. /// can be used for further object setup.
  1883. /// </summary>
  1884. partial void OnCreated();
  1885. partial void OnExceptionDateChanging(DateTime value);
  1886. partial void OnExceptionDateChanged();
  1887. partial void OnExceptionIdChanging(int value);
  1888. partial void OnExceptionIdChanged();
  1889. partial void OnMasterSqlAppointmentIdChanging(int value);
  1890. partial void OnMasterSqlAppointmentIdChanged();
  1891. #endregion
  1892. /// <summary>
  1893. /// Initializes a new instance of the <see cref="SqlExceptionOccurrence"/> class.
  1894. /// </summary>
  1895. public SqlExceptionOccurrence()
  1896. {
  1897. this.OnCreated();
  1898. }
  1899. /// <summary>
  1900. /// Gets or sets the 'ExceptionDate' value.
  1901. /// </summary>
  1902. [DataMember()]
  1903. public DateTime ExceptionDate
  1904. {
  1905. get
  1906. {
  1907. return this._exceptionDate;
  1908. }
  1909. set
  1910. {
  1911. if ((this._exceptionDate != value))
  1912. {
  1913. this.OnExceptionDateChanging(value);
  1914. this.RaiseDataMemberChanging("ExceptionDate");
  1915. this.ValidateProperty("ExceptionDate", value);
  1916. this._exceptionDate = value;
  1917. this.RaiseDataMemberChanged("ExceptionDate");
  1918. this.OnExceptionDateChanged();
  1919. }
  1920. }
  1921. }
  1922. /// <summary>
  1923. /// Gets or sets the 'ExceptionId' value.
  1924. /// </summary>
  1925. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  1926. [DataMember()]
  1927. [Editable(false, AllowInitialValue=true)]
  1928. [Key()]
  1929. [RoundtripOriginal()]
  1930. public int ExceptionId
  1931. {
  1932. get
  1933. {
  1934. return this._exceptionId;
  1935. }
  1936. set
  1937. {
  1938. if ((this._exceptionId != value))
  1939. {
  1940. this.OnExceptionIdChanging(value);
  1941. this.ValidateProperty("ExceptionId", value);
  1942. this._exceptionId = value;
  1943. this.RaisePropertyChanged("ExceptionId");
  1944. this.OnExceptionIdChanged();
  1945. }
  1946. }
  1947. }
  1948. /// <summary>
  1949. /// Gets or sets the 'MasterSqlAppointmentId' value.
  1950. /// </summary>
  1951. [DataMember()]
  1952. [RoundtripOriginal()]
  1953. public int MasterSqlAppointmentId
  1954. {
  1955. get
  1956. {
  1957. return this._masterSqlAppointmentId;
  1958. }
  1959. set
  1960. {
  1961. if ((this._masterSqlAppointmentId != value))
  1962. {
  1963. this.OnMasterSqlAppointmentIdChanging(value);
  1964. this.RaiseDataMemberChanging("MasterSqlAppointmentId");
  1965. this.ValidateProperty("MasterSqlAppointmentId", value);
  1966. this._masterSqlAppointmentId = value;
  1967. this.RaiseDataMemberChanged("MasterSqlAppointmentId");
  1968. this.OnMasterSqlAppointmentIdChanged();
  1969. }
  1970. }
  1971. }
  1972. /// <summary>
  1973. /// Gets or sets the associated <see cref="SqlAppointment"/> entity.
  1974. /// </summary>
  1975. [Association("SqlAppointment_SqlExceptionOccurrence", "MasterSqlAppointmentId", "SqlAppointmentId", IsForeignKey=true)]
  1976. [XmlIgnore()]
  1977. public SqlAppointment SqlAppointment
  1978. {
  1979. get
  1980. {
  1981. if ((this._sqlAppointment == null))
  1982. {
  1983. this._sqlAppointment = new EntityRef<SqlAppointment>(this, "SqlAppointment", this.FilterSqlAppointment);
  1984. }
  1985. return this._sqlAppointment.Entity;
  1986. }
  1987. set
  1988. {
  1989. SqlAppointment previous = this.SqlAppointment;
  1990. if ((previous != value))
  1991. {
  1992. this.ValidateProperty("SqlAppointment", value);
  1993. if ((previous != null))
  1994. {
  1995. this._sqlAppointment.Entity = null;
  1996. previous.SqlExceptionOccurrences.Remove(this);
  1997. }
  1998. if ((value != null))
  1999. {
  2000. this.MasterSqlAppointmentId = value.SqlAppointmentId;
  2001. }
  2002. else
  2003. {
  2004. this.MasterSqlAppointmentId = default(int);
  2005. }
  2006. this._sqlAppointment.Entity = value;
  2007. if ((value != null))
  2008. {
  2009. value.SqlExceptionOccurrences.Add(this);
  2010. }
  2011. this.RaisePropertyChanged("SqlAppointment");
  2012. }
  2013. }
  2014. }
  2015. /// <summary>
  2016. /// Gets or sets the associated <see cref="SqlExceptionAppointment"/> entity.
  2017. /// </summary>
  2018. [Association("SqlExceptionOccurrence_SqlExceptionAppointment", "ExceptionId", "ExceptionId")]
  2019. [XmlIgnore()]
  2020. public SqlExceptionAppointment SqlExceptionAppointment
  2021. {
  2022. get
  2023. {
  2024. if ((this._sqlExceptionAppointment == null))
  2025. {
  2026. this._sqlExceptionAppointment = new EntityRef<SqlExceptionAppointment>(this, "SqlExceptionAppointment", this.FilterSqlExceptionAppointment);
  2027. }
  2028. return this._sqlExceptionAppointment.Entity;
  2029. }
  2030. set
  2031. {
  2032. SqlExceptionAppointment previous = this.SqlExceptionAppointment;
  2033. if ((previous != value))
  2034. {
  2035. this.ValidateProperty("SqlExceptionAppointment", value);
  2036. if ((previous != null))
  2037. {
  2038. this._sqlExceptionAppointment.Entity = null;
  2039. previous.SqlExceptionOccurrence = null;
  2040. }
  2041. this._sqlExceptionAppointment.Entity = value;
  2042. if ((value != null))
  2043. {
  2044. value.SqlExceptionOccurrence = this;
  2045. }
  2046. this.RaisePropertyChanged("SqlExceptionAppointment");
  2047. }
  2048. }
  2049. }
  2050. private bool FilterSqlAppointment(SqlAppointment entity)
  2051. {
  2052. return (entity.SqlAppointmentId == this.MasterSqlAppointmentId);
  2053. }
  2054. private bool FilterSqlExceptionAppointment(SqlExceptionAppointment entity)
  2055. {
  2056. return (entity.ExceptionId == this.ExceptionId);
  2057. }
  2058. /// <summary>
  2059. /// Computes a value from the key fields that uniquely identifies this entity instance.
  2060. /// </summary>
  2061. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  2062. public override object GetIdentity()
  2063. {
  2064. return this._exceptionId;
  2065. }
  2066. }
  2067. /// <summary>
  2068. /// The 'SqlExceptionResource' entity class.
  2069. /// </summary>
  2070. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  2071. public sealed partial class SqlExceptionResource : Entity
  2072. {
  2073. private Nullable<bool> _manyToManyWorkaround;
  2074. private EntityRef<SqlExceptionAppointment> _sqlExceptionAppointment;
  2075. private int _sqlExceptionAppointments_ExceptionId;
  2076. private EntityRef<SqlResource> _sqlResource;
  2077. private int _sqlResources_SqlResourceId;
  2078. #region Extensibility Method Definitions
  2079. /// <summary>
  2080. /// This method is invoked from the constructor once initialization is complete and
  2081. /// can be used for further object setup.
  2082. /// </summary>
  2083. partial void OnCreated();
  2084. partial void OnManyToManyWorkaroundChanging(Nullable<bool> value);
  2085. partial void OnManyToManyWorkaroundChanged();
  2086. partial void OnSqlExceptionAppointments_ExceptionIdChanging(int value);
  2087. partial void OnSqlExceptionAppointments_ExceptionIdChanged();
  2088. partial void OnSqlResources_SqlResourceIdChanging(int value);
  2089. partial void OnSqlResources_SqlResourceIdChanged();
  2090. #endregion
  2091. /// <summary>
  2092. /// Initializes a new instance of the <see cref="SqlExceptionResource"/> class.
  2093. /// </summary>
  2094. public SqlExceptionResource()
  2095. {
  2096. this.OnCreated();
  2097. }
  2098. /// <summary>
  2099. /// Gets or sets the 'ManyToManyWorkaround' value.
  2100. /// </summary>
  2101. [DataMember()]
  2102. public Nullable<bool> ManyToManyWorkaround
  2103. {
  2104. get
  2105. {
  2106. return this._manyToManyWorkaround;
  2107. }
  2108. set
  2109. {
  2110. if ((this._manyToManyWorkaround != value))
  2111. {
  2112. this.OnManyToManyWorkaroundChanging(value);
  2113. this.RaiseDataMemberChanging("ManyToManyWorkaround");
  2114. this.ValidateProperty("ManyToManyWorkaround", value);
  2115. this._manyToManyWorkaround = value;
  2116. this.RaiseDataMemberChanged("ManyToManyWorkaround");
  2117. this.OnManyToManyWorkaroundChanged();
  2118. }
  2119. }
  2120. }
  2121. /// <summary>
  2122. /// Gets or sets the associated <see cref="SqlExceptionAppointment"/> entity.
  2123. /// </summary>
  2124. [Association("SqlExceptionAppointment_SqlExceptionResource", "SqlExceptionAppointments_ExceptionId", "ExceptionId", IsForeignKey=true)]
  2125. [XmlIgnore()]
  2126. public SqlExceptionAppointment SqlExceptionAppointment
  2127. {
  2128. get
  2129. {
  2130. if ((this._sqlExceptionAppointment == null))
  2131. {
  2132. this._sqlExceptionAppointment = new EntityRef<SqlExceptionAppointment>(this, "SqlExceptionAppointment", this.FilterSqlExceptionAppointment);
  2133. }
  2134. return this._sqlExceptionAppointment.Entity;
  2135. }
  2136. set
  2137. {
  2138. SqlExceptionAppointment previous = this.SqlExceptionAppointment;
  2139. if ((previous != value))
  2140. {
  2141. this.ValidateProperty("SqlExceptionAppointment", value);
  2142. if ((previous != null))
  2143. {
  2144. this._sqlExceptionAppointment.Entity = null;
  2145. previous.SqlExceptionResources.Remove(this);
  2146. }
  2147. if ((value != null))
  2148. {
  2149. this.SqlExceptionAppointments_ExceptionId = value.ExceptionId;
  2150. }
  2151. else
  2152. {
  2153. this.SqlExceptionAppointments_ExceptionId = default(int);
  2154. }
  2155. this._sqlExceptionAppointment.Entity = value;
  2156. if ((value != null))
  2157. {
  2158. value.SqlExceptionResources.Add(this);
  2159. }
  2160. this.RaisePropertyChanged("SqlExceptionAppointment");
  2161. }
  2162. }
  2163. }
  2164. /// <summary>
  2165. /// Gets or sets the 'SqlExceptionAppointments_ExceptionId' value.
  2166. /// </summary>
  2167. [DataMember()]
  2168. [Key()]
  2169. [RoundtripOriginal()]
  2170. public int SqlExceptionAppointments_ExceptionId
  2171. {
  2172. get
  2173. {
  2174. return this._sqlExceptionAppointments_ExceptionId;
  2175. }
  2176. set
  2177. {
  2178. if ((this._sqlExceptionAppointments_ExceptionId != value))
  2179. {
  2180. this.OnSqlExceptionAppointments_ExceptionIdChanging(value);
  2181. this.RaiseDataMemberChanging("SqlExceptionAppointments_ExceptionId");
  2182. this.ValidateProperty("SqlExceptionAppointments_ExceptionId", value);
  2183. this._sqlExceptionAppointments_ExceptionId = value;
  2184. this.RaiseDataMemberChanged("SqlExceptionAppointments_ExceptionId");
  2185. this.OnSqlExceptionAppointments_ExceptionIdChanged();
  2186. }
  2187. }
  2188. }
  2189. /// <summary>
  2190. /// Gets or sets the associated <see cref="SqlResource"/> entity.
  2191. /// </summary>
  2192. [Association("SqlResource_SqlExceptionResource", "SqlResources_SqlResourceId", "SqlResourceId", IsForeignKey=true)]
  2193. [XmlIgnore()]
  2194. public SqlResource SqlResource
  2195. {
  2196. get
  2197. {
  2198. if ((this._sqlResource == null))
  2199. {
  2200. this._sqlResource = new EntityRef<SqlResource>(this, "SqlResource", this.FilterSqlResource);
  2201. }
  2202. return this._sqlResource.Entity;
  2203. }
  2204. set
  2205. {
  2206. SqlResource previous = this.SqlResource;
  2207. if ((previous != value))
  2208. {
  2209. this.ValidateProperty("SqlResource", value);
  2210. if ((previous != null))
  2211. {
  2212. this._sqlResource.Entity = null;
  2213. previous.SqlExceptionResources.Remove(this);
  2214. }
  2215. if ((value != null))
  2216. {
  2217. this.SqlResources_SqlResourceId = value.SqlResourceId;
  2218. }
  2219. else
  2220. {
  2221. this.SqlResources_SqlResourceId = default(int);
  2222. }
  2223. this._sqlResource.Entity = value;
  2224. if ((value != null))
  2225. {
  2226. value.SqlExceptionResources.Add(this);
  2227. }
  2228. this.RaisePropertyChanged("SqlResource");
  2229. }
  2230. }
  2231. }
  2232. /// <summary>
  2233. /// Gets or sets the 'SqlResources_SqlResourceId' value.
  2234. /// </summary>
  2235. [DataMember()]
  2236. [Key()]
  2237. [RoundtripOriginal()]
  2238. public int SqlResources_SqlResourceId
  2239. {
  2240. get
  2241. {
  2242. return this._sqlResources_SqlResourceId;
  2243. }
  2244. set
  2245. {
  2246. if ((this._sqlResources_SqlResourceId != value))
  2247. {
  2248. this.OnSqlResources_SqlResourceIdChanging(value);
  2249. this.RaiseDataMemberChanging("SqlResources_SqlResourceId");
  2250. this.ValidateProperty("SqlResources_SqlResourceId", value);
  2251. this._sqlResources_SqlResourceId = value;
  2252. this.RaiseDataMemberChanged("SqlResources_SqlResourceId");
  2253. this.OnSqlResources_SqlResourceIdChanged();
  2254. }
  2255. }
  2256. }
  2257. private bool FilterSqlExceptionAppointment(SqlExceptionAppointment entity)
  2258. {
  2259. return (entity.ExceptionId == this.SqlExceptionAppointments_ExceptionId);
  2260. }
  2261. private bool FilterSqlResource(SqlResource entity)
  2262. {
  2263. return (entity.SqlResourceId == this.SqlResources_SqlResourceId);
  2264. }
  2265. /// <summary>
  2266. /// Computes a value from the key fields that uniquely identifies this entity instance.
  2267. /// </summary>
  2268. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  2269. public override object GetIdentity()
  2270. {
  2271. return EntityKey.Create(this._sqlExceptionAppointments_ExceptionId, this._sqlResources_SqlResourceId);
  2272. }
  2273. }
  2274. /// <summary>
  2275. /// The 'SqlResource' entity class.
  2276. /// </summary>
  2277. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  2278. public sealed partial class SqlResource : Entity
  2279. {
  2280. private string _displayName;
  2281. private string _resourceName;
  2282. private EntityCollection<SqlAppointmentResource> _sqlAppointmentResources;
  2283. private EntityCollection<SqlExceptionResource> _sqlExceptionResources;
  2284. private int _sqlResourceId;
  2285. private EntityRef<SqlResourceType> _sqlResourceType;
  2286. private Nullable<int> _sqlResourceTypeId;
  2287. #region Extensibility Method Definitions
  2288. /// <summary>
  2289. /// This method is invoked from the constructor once initialization is complete and
  2290. /// can be used for further object setup.
  2291. /// </summary>
  2292. partial void OnCreated();
  2293. partial void OnDisplayNameChanging(string value);
  2294. partial void OnDisplayNameChanged();
  2295. partial void OnResourceNameChanging(string value);
  2296. partial void OnResourceNameChanged();
  2297. partial void OnSqlResourceIdChanging(int value);
  2298. partial void OnSqlResourceIdChanged();
  2299. partial void OnSqlResourceTypeIdChanging(Nullable<int> value);
  2300. partial void OnSqlResourceTypeIdChanged();
  2301. #endregion
  2302. /// <summary>
  2303. /// Initializes a new instance of the <see cref="SqlResource"/> class.
  2304. /// </summary>
  2305. public SqlResource()
  2306. {
  2307. this.OnCreated();
  2308. }
  2309. /// <summary>
  2310. /// Gets or sets the 'DisplayName' value.
  2311. /// </summary>
  2312. [DataMember()]
  2313. [StringLength(100)]
  2314. public string DisplayName
  2315. {
  2316. get
  2317. {
  2318. return this._displayName;
  2319. }
  2320. set
  2321. {
  2322. if ((this._displayName != value))
  2323. {
  2324. this.OnDisplayNameChanging(value);
  2325. this.RaiseDataMemberChanging("DisplayName");
  2326. this.ValidateProperty("DisplayName", value);
  2327. this._displayName = value;
  2328. this.RaiseDataMemberChanged("DisplayName");
  2329. this.OnDisplayNameChanged();
  2330. }
  2331. }
  2332. }
  2333. /// <summary>
  2334. /// Gets or sets the 'ResourceName' value.
  2335. /// </summary>
  2336. [DataMember()]
  2337. [StringLength(100)]
  2338. public string ResourceName
  2339. {
  2340. get
  2341. {
  2342. return this._resourceName;
  2343. }
  2344. set
  2345. {
  2346. if ((this._resourceName != value))
  2347. {
  2348. this.OnResourceNameChanging(value);
  2349. this.RaiseDataMemberChanging("ResourceName");
  2350. this.ValidateProperty("ResourceName", value);
  2351. this._resourceName = value;
  2352. this.RaiseDataMemberChanged("ResourceName");
  2353. this.OnResourceNameChanged();
  2354. }
  2355. }
  2356. }
  2357. /// <summary>
  2358. /// Gets the collection of associated <see cref="SqlAppointmentResource"/> entity instances.
  2359. /// </summary>
  2360. [Association("SqlResource_SqlAppointmentResource", "SqlResourceId", "SqlResources_SqlResourceId")]
  2361. [XmlIgnore()]
  2362. public EntityCollection<SqlAppointmentResource> SqlAppointmentResources
  2363. {
  2364. get
  2365. {
  2366. if ((this._sqlAppointmentResources == null))
  2367. {
  2368. this._sqlAppointmentResources = new EntityCollection<SqlAppointmentResource>(this, "SqlAppointmentResources", this.FilterSqlAppointmentResources, this.AttachSqlAppointmentResources, this.DetachSqlAppointmentResources);
  2369. }
  2370. return this._sqlAppointmentResources;
  2371. }
  2372. }
  2373. /// <summary>
  2374. /// Gets the collection of associated <see cref="SqlExceptionResource"/> entity instances.
  2375. /// </summary>
  2376. [Association("SqlResource_SqlExceptionResource", "SqlResourceId", "SqlResources_SqlResourceId")]
  2377. [XmlIgnore()]
  2378. public EntityCollection<SqlExceptionResource> SqlExceptionResources
  2379. {
  2380. get
  2381. {
  2382. if ((this._sqlExceptionResources == null))
  2383. {
  2384. this._sqlExceptionResources = new EntityCollection<SqlExceptionResource>(this, "SqlExceptionResources", this.FilterSqlExceptionResources, this.AttachSqlExceptionResources, this.DetachSqlExceptionResources);
  2385. }
  2386. return this._sqlExceptionResources;
  2387. }
  2388. }
  2389. /// <summary>
  2390. /// Gets or sets the 'SqlResourceId' value.
  2391. /// </summary>
  2392. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  2393. [DataMember()]
  2394. [Editable(false, AllowInitialValue=true)]
  2395. [Key()]
  2396. [RoundtripOriginal()]
  2397. public int SqlResourceId
  2398. {
  2399. get
  2400. {
  2401. return this._sqlResourceId;
  2402. }
  2403. set
  2404. {
  2405. if ((this._sqlResourceId != value))
  2406. {
  2407. this.OnSqlResourceIdChanging(value);
  2408. this.ValidateProperty("SqlResourceId", value);
  2409. this._sqlResourceId = value;
  2410. this.RaisePropertyChanged("SqlResourceId");
  2411. this.OnSqlResourceIdChanged();
  2412. }
  2413. }
  2414. }
  2415. /// <summary>
  2416. /// Gets or sets the associated <see cref="SqlResourceType"/> entity.
  2417. /// </summary>
  2418. [Association("SqlResourceType_SqlResource", "SqlResourceTypeId", "SqlResourceTypeId", IsForeignKey=true)]
  2419. [XmlIgnore()]
  2420. public SqlResourceType SqlResourceType
  2421. {
  2422. get
  2423. {
  2424. if ((this._sqlResourceType == null))
  2425. {
  2426. this._sqlResourceType = new EntityRef<SqlResourceType>(this, "SqlResourceType", this.FilterSqlResourceType);
  2427. }
  2428. return this._sqlResourceType.Entity;
  2429. }
  2430. set
  2431. {
  2432. SqlResourceType previous = this.SqlResourceType;
  2433. if ((previous != value))
  2434. {
  2435. this.ValidateProperty("SqlResourceType", value);
  2436. if ((previous != null))
  2437. {
  2438. this._sqlResourceType.Entity = null;
  2439. previous.SqlResources.Remove(this);
  2440. }
  2441. if ((value != null))
  2442. {
  2443. this.SqlResourceTypeId = value.SqlResourceTypeId;
  2444. }
  2445. else
  2446. {
  2447. this.SqlResourceTypeId = default(Nullable<int>);
  2448. }
  2449. this._sqlResourceType.Entity = value;
  2450. if ((value != null))
  2451. {
  2452. value.SqlResources.Add(this);
  2453. }
  2454. this.RaisePropertyChanged("SqlResourceType");
  2455. }
  2456. }
  2457. }
  2458. /// <summary>
  2459. /// Gets or sets the 'SqlResourceTypeId' value.
  2460. /// </summary>
  2461. [DataMember()]
  2462. [RoundtripOriginal()]
  2463. public Nullable<int> SqlResourceTypeId
  2464. {
  2465. get
  2466. {
  2467. return this._sqlResourceTypeId;
  2468. }
  2469. set
  2470. {
  2471. if ((this._sqlResourceTypeId != value))
  2472. {
  2473. this.OnSqlResourceTypeIdChanging(value);
  2474. this.RaiseDataMemberChanging("SqlResourceTypeId");
  2475. this.ValidateProperty("SqlResourceTypeId", value);
  2476. this._sqlResourceTypeId = value;
  2477. this.RaiseDataMemberChanged("SqlResourceTypeId");
  2478. this.OnSqlResourceTypeIdChanged();
  2479. }
  2480. }
  2481. }
  2482. private void AttachSqlAppointmentResources(SqlAppointmentResource entity)
  2483. {
  2484. entity.SqlResource = this;
  2485. }
  2486. private void DetachSqlAppointmentResources(SqlAppointmentResource entity)
  2487. {
  2488. entity.SqlResource = null;
  2489. }
  2490. private bool FilterSqlAppointmentResources(SqlAppointmentResource entity)
  2491. {
  2492. return (entity.SqlResources_SqlResourceId == this.SqlResourceId);
  2493. }
  2494. private void AttachSqlExceptionResources(SqlExceptionResource entity)
  2495. {
  2496. entity.SqlResource = this;
  2497. }
  2498. private void DetachSqlExceptionResources(SqlExceptionResource entity)
  2499. {
  2500. entity.SqlResource = null;
  2501. }
  2502. private bool FilterSqlExceptionResources(SqlExceptionResource entity)
  2503. {
  2504. return (entity.SqlResources_SqlResourceId == this.SqlResourceId);
  2505. }
  2506. private bool FilterSqlResourceType(SqlResourceType entity)
  2507. {
  2508. return (entity.SqlResourceTypeId == this.SqlResourceTypeId);
  2509. }
  2510. /// <summary>
  2511. /// Computes a value from the key fields that uniquely identifies this entity instance.
  2512. /// </summary>
  2513. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  2514. public override object GetIdentity()
  2515. {
  2516. return this._sqlResourceId;
  2517. }
  2518. }
  2519. /// <summary>
  2520. /// The 'SqlResourceType' entity class.
  2521. /// </summary>
  2522. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  2523. public sealed partial class SqlResourceType : Entity
  2524. {
  2525. private bool _allowMultipleSelection;
  2526. private string _displayName;
  2527. private string _name;
  2528. private EntityCollection<SqlResource> _sqlResources;
  2529. private int _sqlResourceTypeId;
  2530. #region Extensibility Method Definitions
  2531. /// <summary>
  2532. /// This method is invoked from the constructor once initialization is complete and
  2533. /// can be used for further object setup.
  2534. /// </summary>
  2535. partial void OnCreated();
  2536. partial void OnAllowMultipleSelectionChanging(bool value);
  2537. partial void OnAllowMultipleSelectionChanged();
  2538. partial void OnDisplayNameChanging(string value);
  2539. partial void OnDisplayNameChanged();
  2540. partial void OnNameChanging(string value);
  2541. partial void OnNameChanged();
  2542. partial void OnSqlResourceTypeIdChanging(int value);
  2543. partial void OnSqlResourceTypeIdChanged();
  2544. #endregion
  2545. /// <summary>
  2546. /// Initializes a new instance of the <see cref="SqlResourceType"/> class.
  2547. /// </summary>
  2548. public SqlResourceType()
  2549. {
  2550. this.OnCreated();
  2551. }
  2552. /// <summary>
  2553. /// Gets or sets the 'AllowMultipleSelection' value.
  2554. /// </summary>
  2555. [DataMember()]
  2556. public bool AllowMultipleSelection
  2557. {
  2558. get
  2559. {
  2560. return this._allowMultipleSelection;
  2561. }
  2562. set
  2563. {
  2564. if ((this._allowMultipleSelection != value))
  2565. {
  2566. this.OnAllowMultipleSelectionChanging(value);
  2567. this.RaiseDataMemberChanging("AllowMultipleSelection");
  2568. this.ValidateProperty("AllowMultipleSelection", value);
  2569. this._allowMultipleSelection = value;
  2570. this.RaiseDataMemberChanged("AllowMultipleSelection");
  2571. this.OnAllowMultipleSelectionChanged();
  2572. }
  2573. }
  2574. }
  2575. /// <summary>
  2576. /// Gets or sets the 'DisplayName' value.
  2577. /// </summary>
  2578. [DataMember()]
  2579. [StringLength(100)]
  2580. public string DisplayName
  2581. {
  2582. get
  2583. {
  2584. return this._displayName;
  2585. }
  2586. set
  2587. {
  2588. if ((this._displayName != value))
  2589. {
  2590. this.OnDisplayNameChanging(value);
  2591. this.RaiseDataMemberChanging("DisplayName");
  2592. this.ValidateProperty("DisplayName", value);
  2593. this._displayName = value;
  2594. this.RaiseDataMemberChanged("DisplayName");
  2595. this.OnDisplayNameChanged();
  2596. }
  2597. }
  2598. }
  2599. /// <summary>
  2600. /// Gets or sets the 'Name' value.
  2601. /// </summary>
  2602. [DataMember()]
  2603. [Required()]
  2604. [StringLength(100)]
  2605. public string Name
  2606. {
  2607. get
  2608. {
  2609. return this._name;
  2610. }
  2611. set
  2612. {
  2613. if ((this._name != value))
  2614. {
  2615. this.OnNameChanging(value);
  2616. this.RaiseDataMemberChanging("Name");
  2617. this.ValidateProperty("Name", value);
  2618. this._name = value;
  2619. this.RaiseDataMemberChanged("Name");
  2620. this.OnNameChanged();
  2621. }
  2622. }
  2623. }
  2624. /// <summary>
  2625. /// Gets the collection of associated <see cref="SqlResource"/> entity instances.
  2626. /// </summary>
  2627. [Association("SqlResourceType_SqlResource", "SqlResourceTypeId", "SqlResourceTypeId")]
  2628. [XmlIgnore()]
  2629. public EntityCollection<SqlResource> SqlResources
  2630. {
  2631. get
  2632. {
  2633. if ((this._sqlResources == null))
  2634. {
  2635. this._sqlResources = new EntityCollection<SqlResource>(this, "SqlResources", this.FilterSqlResources, this.AttachSqlResources, this.DetachSqlResources);
  2636. }
  2637. return this._sqlResources;
  2638. }
  2639. }
  2640. /// <summary>
  2641. /// Gets or sets the 'SqlResourceTypeId' value.
  2642. /// </summary>
  2643. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  2644. [DataMember()]
  2645. [Editable(false, AllowInitialValue=true)]
  2646. [Key()]
  2647. [RoundtripOriginal()]
  2648. public int SqlResourceTypeId
  2649. {
  2650. get
  2651. {
  2652. return this._sqlResourceTypeId;
  2653. }
  2654. set
  2655. {
  2656. if ((this._sqlResourceTypeId != value))
  2657. {
  2658. this.OnSqlResourceTypeIdChanging(value);
  2659. this.ValidateProperty("SqlResourceTypeId", value);
  2660. this._sqlResourceTypeId = value;
  2661. this.RaisePropertyChanged("SqlResourceTypeId");
  2662. this.OnSqlResourceTypeIdChanged();
  2663. }
  2664. }
  2665. }
  2666. private void AttachSqlResources(SqlResource entity)
  2667. {
  2668. entity.SqlResourceType = this;
  2669. }
  2670. private void DetachSqlResources(SqlResource entity)
  2671. {
  2672. entity.SqlResourceType = null;
  2673. }
  2674. private bool FilterSqlResources(SqlResource entity)
  2675. {
  2676. return (entity.SqlResourceTypeId == this.SqlResourceTypeId);
  2677. }
  2678. /// <summary>
  2679. /// Computes a value from the key fields that uniquely identifies this entity instance.
  2680. /// </summary>
  2681. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  2682. public override object GetIdentity()
  2683. {
  2684. return this._sqlResourceTypeId;
  2685. }
  2686. }
  2687. /// <summary>
  2688. /// The 'TimeMarker' entity class.
  2689. /// </summary>
  2690. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  2691. public sealed partial class TimeMarker : Entity
  2692. {
  2693. private EntityCollection<SqlAppointment> _sqlAppointments;
  2694. private EntityCollection<SqlExceptionAppointment> _sqlExceptionAppointments;
  2695. private string _timeMarkerBrushName;
  2696. private string _timeMarkerName;
  2697. private int _timeMarkersId;
  2698. #region Extensibility Method Definitions
  2699. /// <summary>
  2700. /// This method is invoked from the constructor once initialization is complete and
  2701. /// can be used for further object setup.
  2702. /// </summary>
  2703. partial void OnCreated();
  2704. partial void OnTimeMarkerBrushNameChanging(string value);
  2705. partial void OnTimeMarkerBrushNameChanged();
  2706. partial void OnTimeMarkerNameChanging(string value);
  2707. partial void OnTimeMarkerNameChanged();
  2708. partial void OnTimeMarkersIdChanging(int value);
  2709. partial void OnTimeMarkersIdChanged();
  2710. #endregion
  2711. /// <summary>
  2712. /// Initializes a new instance of the <see cref="TimeMarker"/> class.
  2713. /// </summary>
  2714. public TimeMarker()
  2715. {
  2716. this.OnCreated();
  2717. }
  2718. /// <summary>
  2719. /// Gets the collection of associated <see cref="SqlAppointment"/> entity instances.
  2720. /// </summary>
  2721. [Association("TimeMarker_SqlAppointment", "TimeMarkersId", "TimeMarkerID")]
  2722. [XmlIgnore()]
  2723. public EntityCollection<SqlAppointment> SqlAppointments
  2724. {
  2725. get
  2726. {
  2727. if ((this._sqlAppointments == null))
  2728. {
  2729. this._sqlAppointments = new EntityCollection<SqlAppointment>(this, "SqlAppointments", this.FilterSqlAppointments, this.AttachSqlAppointments, this.DetachSqlAppointments);
  2730. }
  2731. return this._sqlAppointments;
  2732. }
  2733. }
  2734. /// <summary>
  2735. /// Gets the collection of associated <see cref="SqlExceptionAppointment"/> entity instances.
  2736. /// </summary>
  2737. [Association("TimeMarker_SqlExceptionAppointment", "TimeMarkersId", "TimeMarkerID")]
  2738. [XmlIgnore()]
  2739. public EntityCollection<SqlExceptionAppointment> SqlExceptionAppointments
  2740. {
  2741. get
  2742. {
  2743. if ((this._sqlExceptionAppointments == null))
  2744. {
  2745. this._sqlExceptionAppointments = new EntityCollection<SqlExceptionAppointment>(this, "SqlExceptionAppointments", this.FilterSqlExceptionAppointments, this.AttachSqlExceptionAppointments, this.DetachSqlExceptionAppointments);
  2746. }
  2747. return this._sqlExceptionAppointments;
  2748. }
  2749. }
  2750. /// <summary>
  2751. /// Gets or sets the 'TimeMarkerBrushName' value.
  2752. /// </summary>
  2753. [DataMember()]
  2754. [StringLength(50)]
  2755. public string TimeMarkerBrushName
  2756. {
  2757. get
  2758. {
  2759. return this._timeMarkerBrushName;
  2760. }
  2761. set
  2762. {
  2763. if ((this._timeMarkerBrushName != value))
  2764. {
  2765. this.OnTimeMarkerBrushNameChanging(value);
  2766. this.RaiseDataMemberChanging("TimeMarkerBrushName");
  2767. this.ValidateProperty("TimeMarkerBrushName", value);
  2768. this._timeMarkerBrushName = value;
  2769. this.RaiseDataMemberChanged("TimeMarkerBrushName");
  2770. this.OnTimeMarkerBrushNameChanged();
  2771. }
  2772. }
  2773. }
  2774. /// <summary>
  2775. /// Gets or sets the 'TimeMarkerName' value.
  2776. /// </summary>
  2777. [DataMember()]
  2778. [StringLength(50)]
  2779. public string TimeMarkerName
  2780. {
  2781. get
  2782. {
  2783. return this._timeMarkerName;
  2784. }
  2785. set
  2786. {
  2787. if ((this._timeMarkerName != value))
  2788. {
  2789. this.OnTimeMarkerNameChanging(value);
  2790. this.RaiseDataMemberChanging("TimeMarkerName");
  2791. this.ValidateProperty("TimeMarkerName", value);
  2792. this._timeMarkerName = value;
  2793. this.RaiseDataMemberChanged("TimeMarkerName");
  2794. this.OnTimeMarkerNameChanged();
  2795. }
  2796. }
  2797. }
  2798. /// <summary>
  2799. /// Gets or sets the 'TimeMarkersId' value.
  2800. /// </summary>
  2801. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  2802. [DataMember()]
  2803. [Editable(false, AllowInitialValue=true)]
  2804. [Key()]
  2805. [RoundtripOriginal()]
  2806. public int TimeMarkersId
  2807. {
  2808. get
  2809. {
  2810. return this._timeMarkersId;
  2811. }
  2812. set
  2813. {
  2814. if ((this._timeMarkersId != value))
  2815. {
  2816. this.OnTimeMarkersIdChanging(value);
  2817. this.ValidateProperty("TimeMarkersId", value);
  2818. this._timeMarkersId = value;
  2819. this.RaisePropertyChanged("TimeMarkersId");
  2820. this.OnTimeMarkersIdChanged();
  2821. }
  2822. }
  2823. }
  2824. private void AttachSqlAppointments(SqlAppointment entity)
  2825. {
  2826. entity.TimeMarker = this;
  2827. }
  2828. private void DetachSqlAppointments(SqlAppointment entity)
  2829. {
  2830. entity.TimeMarker = null;
  2831. }
  2832. private bool FilterSqlAppointments(SqlAppointment entity)
  2833. {
  2834. return (entity.TimeMarkerID == this.TimeMarkersId);
  2835. }
  2836. private void AttachSqlExceptionAppointments(SqlExceptionAppointment entity)
  2837. {
  2838. entity.TimeMarker = this;
  2839. }
  2840. private void DetachSqlExceptionAppointments(SqlExceptionAppointment entity)
  2841. {
  2842. entity.TimeMarker = null;
  2843. }
  2844. private bool FilterSqlExceptionAppointments(SqlExceptionAppointment entity)
  2845. {
  2846. return (entity.TimeMarkerID == this.TimeMarkersId);
  2847. }
  2848. /// <summary>
  2849. /// Computes a value from the key fields that uniquely identifies this entity instance.
  2850. /// </summary>
  2851. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  2852. public override object GetIdentity()
  2853. {
  2854. return this._timeMarkersId;
  2855. }
  2856. }
  2857. }