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); }
public BusinessLogic(string dllLocation) { _dao = GetDAO(dllLocation); ProducentsBL = new ProducentsBL(_dao.ProducentsDAO); ProductsBL = new ProductsBL(_dao.ProductsDAO); }
public ProducersListViewModel(IObjectBL <IProducent> _objBL) : base(_objBL) { }