コード例 #1
0
        public DeleteEggProductionCommand(IMessageBroker messageBroker, IEggProductionService costService)
        {
            Text = () => LanguageData.General_Delete;

            this.broker = messageBroker;
            this.service = costService;
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        public DeleteEggProductionCommand(IMessageBroker messageBroker, IEggProductionService costService)
        {
            Text = () => LanguageData.General_Delete;

            this.broker  = messageBroker;
            this.service = costService;
        }
コード例 #4
0
        public SaveEggProductionCommand(IMessageBroker broker, IEggProductionService service)
        {
            Text = () => LanguageData.General_Save;

            this.broker  = broker;
            this.service = service;
        }
コード例 #5
0
        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();
        }
コード例 #6
0
        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();
        }
コード例 #7
0
        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();
        }
コード例 #8
0
 public EggProductionServiceTests()
 {
     factory = DatabaseTestInitializer.GetConnectionFactory();
     service = new EggProductionService(factory);
 }
コード例 #9
0
 public EggProductionController(IEggProductionService service)
 {
     this.service = service;
 }
コード例 #10
0
 public EggProductionController(IEggProductionService service)
 {
     this.service = service;
 }
コード例 #11
0
 public EggProductionServiceTests()
 {
     factory = DatabaseTestInitializer.GetConnectionFactory();
     service = new EggProductionService(factory);
 }