コード例 #1
0
 public ListViewModelBase(IObjectBL <T> objBL)
 {
     _objBL = objBL;
     List   = new ObservableCollection <WrapperT>();
     UpdateList();
     CreateCommand = new RelayCommand(o => CreateObject(), o => !IsEdited);
     EditCommand   = new RelayCommand(o => Edit(), o => !IsEdited && Current != null);
     SaveCommand   = new RelayCommand(o => SaveChanges(), o => IsEdited && Current != null && !Current.HasErrors);
     RemoveCommand = new RelayCommand(o => Remove(), o => Current != null && !IsEdited);
     CancelCommand = new RelayCommand(o => Cancel(), o => IsEdited);
 }
コード例 #2
0
ファイル: BusinessLogic.cs プロジェクト: UrbaniakM/PW-project
 public BusinessLogic(string dllLocation)
 {
     _dao         = GetDAO(dllLocation);
     ProducentsBL = new ProducentsBL(_dao.ProducentsDAO);
     ProductsBL   = new ProductsBL(_dao.ProductsDAO);
 }
コード例 #3
0
 public ProducersListViewModel(IObjectBL <IProducent> _objBL) : base(_objBL)
 {
 }