private void pnl_Curd_linkEdit_click(object sender, int intId) { crud_modal.Visibility = System.Windows.Visibility.Visible; cntrl.Curd.Geography _Geography = new cntrl.Curd.Geography(); app_geographyViewSource.View.MoveCurrentTo(entity.db.app_geography.Single(x => x.id_geography == intId)); _Geography.objCollectionViewSource = app_geographyViewSource; _Geography.entity = entity; crud_modal.Children.Add(_Geography); }
private void btnNew_Click(object sender, RoutedEventArgs e) { crud_modal.Visibility = System.Windows.Visibility.Visible; cntrl.Curd.Geography _Geography = new cntrl.Curd.Geography(); app_geography _app_geography = new app_geography(); entity.db.app_geography.Add(_app_geography); app_geographyViewSource.View.MoveCurrentToLast(); _Geography.objCollectionViewSource = app_geographyViewSource; _Geography.entity = entity; crud_modal.Children.Add(_Geography); }