public HenDepreciationEntryViewModel(IMessageBroker messageBroker, IHenDepreciationService service, IHenHouseService houseService, SaveHenDepreciationCommand saveCommand, CancelCommand cancelCommand, ShowHenDepreciationListCommand showListCommand) { this.broker = messageBroker; this.service = service; ActualSaveCommand = saveCommand; CancelCommand = cancelCommand; CancelCommand.Action = b => showListCommand.Execute(null); RefreshCommand = new DelegateCommand(p => OnRefresh(),p => true) {Text = () => LanguageData.General_Refresh}; ShowListCommand = showListCommand; HenHouses = new ObservableCollection<HenHouse>(houseService.GetAll().OrderBy(h => h.Name)); InitializeCommands(); PropertiesToValidate = new List<string> { "Date", "Details" }; NavigationCommands = new List<CommandBase>(){SaveCommand, CancelCommand, RefreshCommand}; SubscribeMessages(); }
public UsageEntryViewModel(IMessageBroker messageBroker, IConsumableUsageService usageService, IHenHouseService houseService, IConsumableService consumableService, SaveUsageCommand saveUsageCommand, CancelCommand cancelCommand, ShowUsageCommand showListCommand ) { this.messageBroker = messageBroker; this.usageService = usageService; this.houseService = houseService; this.consumableService = consumableService; this.saveUsageCommand = saveUsageCommand; this.showListCommand = showListCommand; CancelCommand = cancelCommand; PropertiesToValidate = new List<string>() { "Date", "Total", "Details" }; InitializeCommands(); HouseList = new ObservableCollection<HenHouse>(houseService.GetAll()); ConsumableList = new ObservableCollection<Consumable>(consumableService.GetAll()); SubscribeMessages(); }
public EggProductionEntryViewModel(IMessageBroker broker, IEggProductionService service, IConsumableUsageService usageService, IHenHouseService houseService, SaveEggProductionCommand saveCommand, CancelCommand cancelCommand, ShowEggProductionListCommand showListCommand) { this.broker = broker; this.service = service; this.usageService = usageService; ActualSaveCommand = saveCommand; CancelCommand = cancelCommand; ShowListCommand = showListCommand; PropertiesToValidate = new List <string> { "Date", "Details" }; InitializeCommands(); NavigationCommands = new List <CommandBase>() { SaveCommand, CancelCommand, RefreshCommand }; CancelCommand.Action = b => showListCommand.Execute(null); HenHouses = new ObservableCollection <HenHouse>(houseService.GetAll().OrderBy(h => h.Name)); SubscribeMessages(); }
public HouseListViewModel(IMessageBroker messageBroker, IHenHouseService houseService, NewHouseCommand newHouseCommand, EditHouseCommand editHouseCommand, DeleteHouseCommand deleteHouseCommand) { this.messageBroker = messageBroker; this.houseService = houseService; NewCommand = newHouseCommand; EditCommand = editHouseCommand; DeleteCommand = deleteHouseCommand; NavigationCommands = new List<CommandBase> {NewCommand, DeleteCommand}; SubscribeMessages(); }
public HenListViewModel(IMessageBroker messageBroker,IHenService henService, IHenHouseService houseService, NewHenCommand newHenCommand,EditHenCommand editHenCommand, DeleteHenCommand deleteCommand) { this.henService = henService; this.messageBroker = messageBroker; this.houseService = houseService; NewCommand = newHenCommand; EditCommand = editHenCommand; DeleteCommand = deleteCommand; hens = new ObservableCollection<HenListItem>(); NavigationCommands = new List<CommandBase>() {NewCommand, DeleteCommand}; SubscribeMessages(); }
public HenListViewModel(IMessageBroker messageBroker, IHenService henService, IHenHouseService houseService, NewHenCommand newHenCommand, EditHenCommand editHenCommand, DeleteHenCommand deleteCommand) { this.henService = henService; this.messageBroker = messageBroker; this.houseService = houseService; NewCommand = newHenCommand; EditCommand = editHenCommand; DeleteCommand = deleteCommand; hens = new ObservableCollection <HenListItem>(); NavigationCommands = new List <CommandBase>() { NewCommand, DeleteCommand }; SubscribeMessages(); }
public HouseEntryViewModel(IMessageBroker messageBroker, IHenHouseService houseService, SaveHenHouseCommand saveCommand, CancelCommand cancelCommand) { this.houseService = houseService; this.messageBroker = messageBroker; ActualSaveCommand = saveCommand; SubscribeMessages(); PropertiesToValidate = new List<string> { "Name", "PurchaseCost", "YearUsage", "ProductiveAge" }; CancelCommand = cancelCommand; InitializeCommands(); }
public EggProductionEntryViewModel(IMessageBroker broker, IEggProductionService service,IConsumableUsageService usageService, IHenHouseService houseService, SaveEggProductionCommand saveCommand, CancelCommand cancelCommand, ShowEggProductionListCommand showListCommand) { this.broker = broker; this.service = service; this.usageService = usageService; ActualSaveCommand = saveCommand; CancelCommand = cancelCommand; ShowListCommand = showListCommand; PropertiesToValidate = new List<string> { "Date", "Details" }; InitializeCommands(); NavigationCommands =new List<CommandBase>(){SaveCommand, CancelCommand, RefreshCommand}; CancelCommand.Action = b => showListCommand.Execute(null); HenHouses = new ObservableCollection<HenHouse>(houseService.GetAll().OrderBy(h => h.Name)); SubscribeMessages(); }
public HenEntryViewModel(IMessageBroker messageBroker, IHenService henService, IHenHouseService houseService, SaveHenCommand saveCommand, CancelCommand cancelCommand) { this.henService = henService; this.messageBroker = messageBroker; this.houseService = houseService; ActualSaveCommand = saveCommand; CancelCommand = cancelCommand; PropertiesToValidate = new List<string> { "Name", "Type", "HouseId" }; OnRefreshHouseList(null); InitializeCommands(); SubscribeMessages(); }
public HenEntryViewModel(IMessageBroker messageBroker, IHenService henService, IHenHouseService houseService, SaveHenCommand saveCommand, CancelCommand cancelCommand) { this.henService = henService; this.messageBroker = messageBroker; this.houseService = houseService; ActualSaveCommand = saveCommand; CancelCommand = cancelCommand; PropertiesToValidate = new List <string> { "Name", "Type", "HouseId" }; OnRefreshHouseList(null); InitializeCommands(); SubscribeMessages(); }
public DeleteHouseCommand(IMessageBroker messageBroker, IHenHouseService houseService) { this.houseService = houseService; this.messageBroker = messageBroker; }
public HenHousePopulationController(IHenHouseService houseService) { this.houseService = houseService; }
public HenHousesController(IHenHouseService houseService) : base(houseService) { this.houseService = houseService; }
public SaveHenHouseCommand(IMessageBroker messageBroker, IHenHouseService houseService) { Text = () => "Save"; this.messageBroker = messageBroker; this.houseService = houseService; }