Пример #1
0
 private void btn_new_Click(object sender, RoutedEventArgs e)
 {
     ProductWizzard pw = new ProductWizzard();
     try
     {
         Globals.SyncLock = true;
         if (pw.ShowDialog().Value == true)
         {
             RefreshDataSource();
         }
     }
     catch (Exception) { }
     finally { Globals.SyncLock = false; }
 }
Пример #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            ProductWizzard pw = new ProductWizzard();
            try
            {
                Globals.SyncLock = true;
                if (pw.ShowDialog() == true)
                {

                    _products = Databases.localModel.ProductSet.ToList();
                    cb_product.ItemsSource = _products;
                }
            }
            catch (Exception) { }
            finally { Globals.SyncLock = false; }
        }