Пример #1
0
 /// Promotion
 private void BtnAddPromotion_Click(object sender, RoutedEventArgs e)
 {
     if (WhatRole == "Admin" || WhatRole == "Cashier")
     {
         PromotionWindow proWin = new PromotionWindow(EmployeeId, null);
         this.Close();
         proWin.ShowDialog();
     }
     else
     {
         MessageBox.Show("You're NOT allowed");
     }
 }
Пример #2
0
        private void BtnDetailPromotion_Click(object sender, RoutedEventArgs e)
        {
            if (WhatRole == "Admin" || WhatRole == "Cashier")
            {
                var selectedPromotion = dataGridPromotion.SelectedItem as KhuyenMai;
                if (selectedPromotion == null)
                {
                    MessageBox.Show("Please Choose The Promotion");
                    return;
                }

                PromotionWindow proWin = new PromotionWindow(EmployeeId, selectedPromotion);
                this.Close();
                proWin.ShowDialog();
            }
            else
            {
                MessageBox.Show("You're NOT allowed");
            }
        }