Esempio n. 1
0
        private void btnNuevo_Click(object sender, RoutedEventArgs e)
        {
            AltaModificarProveedorCuenta alta = new AltaModificarProveedorCuenta();

            try
            {
                CatalogProveedorCuentaViewModel proveedorCuentaViewModel = (this.DataContext as ObjectDataProvider).Data as CatalogProveedorCuentaViewModel;
                alta.DataContext = proveedorCuentaViewModel.CreateAddProveedorCuentaViewModel();
                alta.ShowDialog();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
 private void dtGridItemStatus_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (sender != null)
     {
         DataGrid dg = sender as DataGrid;
         if (dg != null && dg.SelectedItems != null && dg.SelectedItems.Count == 1)
         {
             ModifyProveedorCuentaView dlgModify = new ModifyProveedorCuentaView();
             try
             {
                 CatalogProveedorCuentaViewModel proveedorViewModel = (this.DataContext as ObjectDataProvider).Data as CatalogProveedorCuentaViewModel;
                 dlgModify.DataContext = proveedorViewModel.CreateModifyProveedorCuentaViewModel();
                 dlgModify.ShowDialog();
             }
             catch (Exception ex)
             {
                 throw ex;
             }
         }
     }
 }