internal void SelectionChanged(Guid Selectedi9PersonID) { MainLocations.Locationi9PersonID = Selectedi9PersonID; MainLocations.DataBind(mDataSet); MainPersonAKAs.PersonAKAi9PersonID = Selectedi9PersonID; MainPersonAKAs.DataBind(mDataSet); MainPersonSMTs.PersonSMTi9PersonID = Selectedi9PersonID; MainPersonSMTs.DataBind(mDataSet); }
public void DataBind(DataSet lDataSet) { mDataSet = lDataSet; //if (mDataView != null) // mDataView.Dispose(); mDataView = lDataSet.Tables["i9Person"].DefaultView; //mDataView = new DataView( lDataSet.Tables["i9Person"]); //mDataView.ListChanged += new ListChangedEventHandler(mDataView_ListChanged); //MainLocations.PersistId = //ICollectionView cv = CollectionViewSource.GetDefaultView(mDataView.Tables["i9Person"]); //mDataSet.Tables["i9Person"].DefaultView.Delete(cv.CurrentPosition); //General binding this.DataContext = mDataView; //Bind sub user controls: MainPersonDetailDynControl.DataBind(mDataView, "Incident.Person.Name", "i9Person"); MainLocations.DataBind(mDataSet); MainPersonAKAs.DataBind(mDataSet); MainPersonSMTs.DataBind(mDataSet); }