private void BrowserLib_Click(object sender, System.EventArgs e) { System.Action<PeopleProfile> action = null; if (this.peopleChooserHandler == null) { this.peopleChooserHandler = new PageActionHandler<PeopleProfile>(); this.peopleChooserHandler.GetItems = () => ViewModelLocator.PeopleViewModel.AccountBookDataContext.Peoples.AsEnumerable<PeopleProfile>(); if (action == null) { action = delegate(PeopleProfile result) { PeopleAssociationData item = new PeopleAssociationData { PeopleInfo = result, AttachedId = this.CurrentAttachedObjectId }; this.Peoples.Add(item); PeopleSelectorHandler.OnAfterAdd(item); }; } PeopleImporter.ResultGetter = action; } PeopleImporter.Go(this.peopleChooserHandler, this); }
private void detach_People(PeopleAssociationData peopleAssocidated) { this.OnNotifyPropertyChanging("AccountItem"); peopleAssocidated.AccountItem = null; }
/// <summary> /// Adds the picture. /// </summary> /// <param name="pic">The pic.</param> public void AddPeople(PeopleAssociationData personInfo) { if (this.PeoplesOutOfDatabase == null) { this.PeoplesOutOfDatabase = new List<PeopleAssociationData>(); } if (this.PeoplesOutOfDatabase != null) { this.PeoplesOutOfDatabase.Add(personInfo); OnNotifyPropertyChanged(PeopleTotalInfoForEditProperty); } }
public void RemovePeople(PeopleAssociationData people) { if (this.PeoplesOutOfDatabase != null) { this.PeoplesOutOfDatabase.Remove(people); OnNotifyPropertyChanged(PeopleTotalInfoForEditProperty); } }