Exemple #1
0
 private void addPaymentbtn_Click(object sender, EventArgs e)
 {
     using (NewPaymentWindow npw = new NewPaymentWindow())
     {
         npw.ShowDialog(this.TopLevelControl);
     }
     refreshtables();
 }
Exemple #2
0
        private void AddPaymentBtn_Click(object sender, RoutedEventArgs e)
        {
            if (User.Role.userRole.Equals("Admin"))
            {
                NewPaymentWindow paymentWindow = new NewPaymentWindow();
                paymentWindow.OrderRepository      = orderRepository;
                paymentWindow.PaymentRepository    = paymentRepository;
                paymentWindow.PaymentModeRepositoy = paymentModeRepositoy;
                paymentWindow.SetValues();

                paymentWindow.ShowDialog();
                PaymentsDataGrid.ItemsSource = paymentRepository.GetAll();
            }
            else
            {
                MessageBox.Show("У вас недостатньо прав!");
            }
        }