/// Menu private void BtnAddMenu_Click(object sender, RoutedEventArgs e) { if (WhatRole == "Admin" || WhatRole == "Cashier") { MenuWindow menuWin = new MenuWindow(EmployeeId, null); this.Close(); menuWin.ShowDialog(); } else { MessageBox.Show("You're NOT allowed"); } }
//private void BtnDeleteMenu_Click(object sender, RoutedEventArgs e) //{ //} private void BtnDetailMenu_Click(object sender, RoutedEventArgs e) { if (WhatRole == "Admin" || WhatRole == "Cashier") { var selectedMenu = dataGridMenu.SelectedItem as ThucDon_MonAn; if (selectedMenu == null) { MessageBox.Show("Please Choose The Menu"); return; } MenuWindow menuWin = new MenuWindow(EmployeeId, selectedMenu); this.Close(); menuWin.ShowDialog(); } else { MessageBox.Show("You're NOT allowed"); } }