Exemplo n.º 1
0
        private void BtnDetailTable_Click(object sender, RoutedEventArgs e)
        {
            if (WhatRole == "Admin" || WhatRole == "Table Manager")
            {
                var selectedTable = dataGridTable.SelectedItem as Ban;
                if (selectedTable == null)
                {
                    MessageBox.Show("Please Choose The Table");
                    return;
                }

                if (selectedTable.TinhTrang == true)
                {
                    MessageBox.Show("Table in use");
                    return;
                }
                else
                {
                    TableWindow tabWin = new TableWindow(EmployeeId, selectedTable);
                    this.Close();
                    tabWin.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("You're NOT allowed");
            }
        }
Exemplo n.º 2
0
 private void BtnAddTable_Click(object sender, RoutedEventArgs e)
 {
     if (WhatRole == "Admin" || WhatRole == "Table Manager")
     {
         TableWindow tabWin = new TableWindow(EmployeeId, null);
         this.Close();
         tabWin.ShowDialog();
     }
     else
     {
         MessageBox.Show("You're NOT allowed");
     }
 }