Exemplo n.º 1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public OldOrderPageViewModel()
        {
            Task.Run(async() => await UpdateList()).Wait();

            CurrentOrderPizzaList = new List <BackendHandler.Pizza>();
            CurrentOrderExtraList = new List <BackendHandler.Extra>();

            Delete = new RelayAsyncCommand(DeleteCommand);

            Navigate = new RelayParameterlessCommand(MainWindowViewModel.VM.NavigatorCommand);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Default Constructor
        /// </summary>
        public PizzaPageViewModel()
        {
            Task.Run(async() => UpdateList()).Wait();

            Add    = new RelayAsyncCommand(AddCommand);
            Update = new RelayAsyncCommand(UpdateCommand);
            Delete = new RelayAsyncCommand(DeleteCommand);

            Clear = new RelayParameterlessCommand(ClearCommand);

            Navigate = new RelayParameterlessCommand(MainWindowViewModel.VM.NavigatorCommand);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public WarningOnDeleteWindowViewModel()
        {
            // Creating commands
            Confirm = new RelayParameterlessCommand((o) =>
            {
                deleteWindow.DialogResult = true;
            });

            Decline = new RelayParameterlessCommand((o) =>
            {
                deleteWindow.DialogResult = false;
            });
        }
Exemplo n.º 4
0
        public EmployeePageViewModel()
        {
            Task.Run(async() => await UpdateList()).Wait();

            Employee = new EmployeeViewModel();

            AddEmployee    = new RelayParameterizedCommand(async(parameter) => await AddEmployeeCommand(parameter));
            UpdateEmployee = new RelayParameterizedCommand(async(parameter) => await UpdateEmployeeCommand(parameter));
            Delete         = new RelayAsyncCommand(DeleteCommand);
            Clear          = new RelayParameterlessCommand(ClearCommand);

            Navigate = new RelayParameterlessCommand(MainWindowViewModel.VM.NavigatorCommand);
        }