Beispiel #1
0
        public void LogInAsClient()
        {
            var client = clientBLL.GetClientWithEmailAndPassword(Email, Parola);

            if (client != null)
            {
                ClientLoggedInView view = new ClientLoggedInView();
                view.DataContext = _clientLoggedInViewModel;
                _clientLoggedInViewModel.Email    = Email;
                _clientLoggedInViewModel.Password = Parola;
                view.ShowDialog();
            }
        }
Beispiel #2
0
        public void PlaseazaComanda()
        {
            ClientBLL clientBLL = new ClientBLL();
            var       client    = clientBLL.GetClientWithEmailAndPassword(Email, Password);

            comenziBLL.AddComanda(new Comenzi()
            {
                ClientId = client.Id
            });

            var comanda = comenziBLL.GetComandaIdForClientId(client);

            foreach (var prep in _preparateAdaugateInComanda)
            {
                //preparateBLL.AddPreparatInComanda(comanda, prep, 1);
                preparateComandateBLL.AddPreparatComandate(comanda, prep, 1);
            }

            foreach (var menu in _meniuriAdaugateInComanda)
            {
                meniuBLL.AddMeniuInComanda(comanda, menu, 1);
            }
        }