public DeleteEggProductionCommand(IMessageBroker messageBroker, IEggProductionService costService) { Text = () => LanguageData.General_Delete; this.broker = messageBroker; this.service = costService; }
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 SaveEggProductionCommand(IMessageBroker broker, IEggProductionService service) { Text = () => LanguageData.General_Save; this.broker = broker; this.service = service; }
public EggProductionListViewModel( IMessageBroker broker, IEggProductionService service,IClientContext clientContext, NewEggProductionCommand newCommand, EditEggProductionCommand editCommand, DeleteEggProductionCommand deleteCommand, RefreshCommand refreshCommand ) { this.broker = broker; this.service = service; pageSize = clientContext.PageSize; NewCommand = newCommand; EditCommand = editCommand; DeleteCommand = deleteCommand; RefreshCommand = refreshCommand; RefreshCommand.MessageName = CommonMessages.RefreshEggProductionList; NavigationCommands = new List<CommandBase>(){NewCommand, DeleteCommand, RefreshCommand}; 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 EggProductionListViewModel( IMessageBroker broker, IEggProductionService service, IClientContext clientContext, NewEggProductionCommand newCommand, EditEggProductionCommand editCommand, DeleteEggProductionCommand deleteCommand, RefreshCommand refreshCommand ) { this.broker = broker; this.service = service; pageSize = clientContext.PageSize; NewCommand = newCommand; EditCommand = editCommand; DeleteCommand = deleteCommand; RefreshCommand = refreshCommand; RefreshCommand.MessageName = CommonMessages.RefreshEggProductionList; NavigationCommands = new List <CommandBase>() { NewCommand, DeleteCommand, RefreshCommand }; SubscribeMessages(); }
public EggProductionServiceTests() { factory = DatabaseTestInitializer.GetConnectionFactory(); service = new EggProductionService(factory); }
public EggProductionController(IEggProductionService service) { this.service = service; }