Пример #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            dto = loginBL.login(tbCopyCode.Text);

            if (dto != null)
            {
                MessageBox.Show("Benutzer: '" + dto.User.Username + "' erfolgreich eingeloggt!");

                ClientForm clientform = new ClientForm(dto);
                clientform.Show();
                this.Hide();
            }
        }
Пример #2
0
        public ClientForm(DTO dto)
        {
            InitializeComponent();

            this.coffeeShopBL = new CoffeeShopBL(dto);
            tbCoffeeCount.Text = currentCoffeeCount.ToString();

            if(dto != null)
            {
                if(dto.User != null)
                {
                    lbUserName.Text = dto.User.Username;
                    tbReceipt.Text = coffeeShopBL.getReceipt();
                }
            }
        }