/// <summary> /// /// </summary> /// <param name="origin"></param> public void Update(Origin origin) { if (origin == null) throw new ArgumentNullException("origin"); _dataContext.SubmitChanges(); }
public OriginViewModel(Origin origin, OriginService originService) { if (origin == null) throw new ArgumentNullException("origin"); if (originService == null) throw new ArgumentNullException("originService"); _origin = origin; _originService = originService; // _customerType = Strings.CustomerViewModel_CustomerTypeOption_NotSpecified; }
/// <summary> /// Places the specified origin into the repository. /// If the origin is already in the repository, an /// exception is not thrown. /// </summary> public void Insert(Origin origin) { if (origin == null) throw new ArgumentNullException("origin"); if (!_origins.Contains(origin)) { _origins.Add(origin); _dataContext.Origins.InsertOnSubmit(origin); _dataContext.SubmitChanges(); if (this.OriginAdded != null) this.OriginAdded(this, new EntityAddedEventArgs<Origin>(origin)); } }
public OriginViewModel(Origin origin, OriginService originService, ObservableCollection<WorkspaceViewModel> parent):this(origin,originService) { parentWorkSpaces = parent; }
/// <summary> /// Returns true if the specified origin exists in the /// repository, or false if it is not. /// </summary> public bool ContainsOrigin(Origin origin) { if (origin == null) throw new ArgumentNullException("origin"); return _origins.Contains(origin); }
/// <summary> /// /// </summary> /// <param name="origin"></param> public void Delete(Origin origin) { }