示例#1
0
 public AccountsUC()
 {
     InitializeComponent();
     _viewmodel = new AccountsViewModel();
     gdAccountsUC.DataContext = _viewmodel.ad;
     adata = new ObservableCollection <AccountsData>();
     adata.Add(new AccountsData());
     dgBody.ItemsSource = adata;
     db = new DataBaseConnection();
     comboTaxClass.ItemsSource    = _viewmodel.TaxClass();
     dgColumnTaxClass.ItemsSource = _viewmodel.TaxClass();
     dgBody.LoadingRow           += new EventHandler <DataGridRowEventArgs>(dgBody_LoadingRow);
     dgBody.RowEditEnding        += new EventHandler <DataGridRowEditEndingEventArgs>(dgBody_RowEditEnding);
 }
 public AccountsReportUC()
 {
     InitializeComponent();
     db         = new DataBaseConnection();
     _viewmodel = new AccountsViewModel();
     gdAccountsReport.DataContext = _viewmodel.ad;
     adata = new ObservableCollection <AccountsData>();
     adata.Add(new AccountsData());
     dgAccountsReport.ItemsSource = adata;
     dgColumnTaxClass.ItemsSource = _viewmodel.TaxClass();
     dgAccountsReport.LoadingRow += new EventHandler <DataGridRowEventArgs>(dgAccountsReport_LoadingRow);
     //comboFilter.ItemsSource = Filterlist();
 }