public ConsumableEntryViewModel(IMessageBroker messageBroker, IConsumableService consumableService, 
            SaveConsumableCommand saveCommand, CancelCommand cancelCommand)
        {
            this.consumableService = consumableService;
            this.messageBroker = messageBroker;

            ActualSaveCommand = saveCommand;
            CancelCommand = cancelCommand;

            ConsumableTypes = new List<Tuple<byte, string>>()
                {
                    Tuple.Create((byte)ConsumableType.Feed, LanguageData.ConsumableType_Feed),
                    Tuple.Create((byte)ConsumableType.Ovk, LanguageData.ConsumableType_Ovk)
                };

            PropertiesToValidate = new List<string>() { "Name", "UnitPrice" };

            InitializeCommands();
            SubscribeMessages();
        }
Exemple #2
0
        public ConsumableEntryViewModel(IMessageBroker messageBroker, IConsumableService consumableService,
                                        SaveConsumableCommand saveCommand, CancelCommand cancelCommand)
        {
            this.consumableService = consumableService;
            this.messageBroker     = messageBroker;

            ActualSaveCommand = saveCommand;
            CancelCommand     = cancelCommand;

            ConsumableTypes = new List <Tuple <byte, string> >()
            {
                Tuple.Create((byte)ConsumableType.Feed, LanguageData.ConsumableType_Feed),
                Tuple.Create((byte)ConsumableType.Ovk, LanguageData.ConsumableType_Ovk)
            };

            PropertiesToValidate = new List <string>()
            {
                "Name", "UnitPrice"
            };

            InitializeCommands();
            SubscribeMessages();
        }