public AftnViewModel(Aftn aftn, AftnService aftnService) { if (aftn == null) throw new ArgumentNullException("aftn"); if (aftnService == null) throw new ArgumentNullException("aftnService"); _aftn = aftn; _aftnService = aftnService; AftnList = AftnList2; // _customerType = Strings.CustomerViewModel_CustomerTypeOption_NotSpecified; }
/// <summary> /// Places the specified origin into the repository. /// If the Aftn is already in the repository, an /// exception is not thrown. /// </summary> public void Insert(Aftn aftn) { if (aftn == null) throw new ArgumentNullException("aftn"); if (!_AftnList.Contains(aftn)) { _AftnList.Add(aftn); _dataContext.Aftns.InsertOnSubmit(aftn); _dataContext.SubmitChanges(); if (this.AftnAdded != null) this.AftnAdded(this, new EntityAddedEventArgs<Aftn>(aftn)); } }
/// <summary> /// /// </summary> /// <param name="origin"></param> public void Delete(Aftn aftn) { }
/// <summary> /// /// </summary> /// <param name="origin"></param> public void Update(Aftn aftn) { _dataContext.SubmitChanges(); }
public bool ContainsAftn(Aftn aftn) { if (aftn == null) throw new ArgumentNullException("aftn"); return _AftnList.Contains(aftn); }
public AftnViewModel(Aftn aftn, AftnService aftnService, ObservableCollection<WorkspaceViewModel> parent):this(aftn,aftnService) { parentWorkSpaces = parent; }