Пример #1
0
 private void pnl_Branch_Click(object sender, int idBranch)
 {
     crud_modal.Visibility = System.Windows.Visibility.Visible;
     cntrl.branch objBranch = new cntrl.branch();
     branchViewSource.View.MoveCurrentTo(entity.db.app_branch.Where(x => x.id_branch == idBranch).FirstOrDefault());
     objBranch.app_branchViewSource = branchViewSource;
     objBranch.entity = entity;
     crud_modal.Children.Add(objBranch);
 }
Пример #2
0
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            crud_modal.Visibility = System.Windows.Visibility.Visible;
            cntrl.branch objBranch  = new cntrl.branch();
            app_branch   app_branch = new app_branch();

            entity.db.app_branch.Add(app_branch);
            branchViewSource.View.MoveCurrentToLast();
            objBranch.app_branchViewSource = branchViewSource;
            objBranch.entity = entity;
            crud_modal.Children.Add(objBranch);
        }