Ejemplo n.º 1
0
 private void BtnAddCustomer_Click(object sender, RoutedEventArgs e)
 {
     if (WhatRole == "Admin" || WhatRole == "Cashier")
     {
         CustomerWindow cusWin = new CustomerWindow(EmployeeId, null);
         this.Close();
         cusWin.ShowDialog();
     }
     else
     {
         MessageBox.Show("You're NOT allowed");
     }
 }
Ejemplo n.º 2
0
        /// Customer
        private void BtnDetailCustomer_Click(object sender, RoutedEventArgs e)
        {
            if (WhatRole == "Admin" || WhatRole == "Cashier")
            {
                var selectedCustomer = dataGridCustomer.SelectedItem as ThanhVien;
                if (selectedCustomer == null)
                {
                    MessageBox.Show("Please Choose The Customer");
                    return;
                }

                CustomerWindow cusWin = new CustomerWindow(EmployeeId, selectedCustomer);
                this.Close();
                cusWin.ShowDialog();
            }
            else
            {
                MessageBox.Show("You're NOT allowed");
            }
        }