public DeleteHenDepreciationCommand(IMessageBroker broker, IHenDepreciationService depreciationService) { Text = () => LanguageData.General_Delete; this.broker = broker; this.service = depreciationService; }
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 SaveHenDepreciationCommand(IMessageBroker broker, IHenDepreciationService service) { Text = () => LanguageData.General_Save; this.broker = broker; this.service = service; }
public HenDepreciationListViewModel(IMessageBroker broker, IClientContext clientContext, IHenDepreciationService service, NewHenDepreciationCommand newCommand, EditHenDepreciationCommand editCommand, DeleteHenDepreciationCommand deleteCommand, RefreshCommand refreshCommand) { this.broker = broker; this.service =service; pageSize = clientContext.PageSize; NewCommand = newCommand; EditCommand = editCommand; DeleteCommand = deleteCommand; RefreshCommand = refreshCommand; RefreshCommand.MessageName = CommonMessages.RefreshHenDepreciationList; NavigationCommands = new List<CommandBase>() { NewCommand, DeleteCommand, RefreshCommand }; SubscribeMessages(); }
public HenDepreciationListViewModel(IMessageBroker broker, IClientContext clientContext, IHenDepreciationService service, NewHenDepreciationCommand newCommand, EditHenDepreciationCommand editCommand, DeleteHenDepreciationCommand deleteCommand, RefreshCommand refreshCommand) { this.broker = broker; this.service = service; pageSize = clientContext.PageSize; NewCommand = newCommand; EditCommand = editCommand; DeleteCommand = deleteCommand; RefreshCommand = refreshCommand; RefreshCommand.MessageName = CommonMessages.RefreshHenDepreciationList; NavigationCommands = new List <CommandBase>() { NewCommand, DeleteCommand, RefreshCommand }; SubscribeMessages(); }
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 HenDepreciationServiceTests() { factory = DatabaseTestInitializer.GetConnectionFactory(); service = new HenDepreciationService(factory); }
public HenDepreciationController(IHenDepreciationService service) { this.service = service; }