コード例 #1
0
        private void btnViewOrder_Click(object sender, RoutedEventArgs e)
        {
            if (lblOrderID.Content.ToString().Length > 0)
            {
                Application.Current.Properties["orderId"] = lblOrderID.Content.ToString();
                var newWindow = new LastOrderView();

                newWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;

                newWindow.Show();
            }
            else
            {
                MessageBox.Show("Sorry there was no last order", "Last order", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
コード例 #2
0
        private void DG_Hyperlink_Click(object sender, RoutedEventArgs e)
        {
            Button clicked = (Button)sender;
            string orderid = clicked.Content.ToString();

            if (orderid.Length > 0)
            {
                Application.Current.Properties["orderId"] = orderid;
                var newWindow = new LastOrderView();

                newWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;

                newWindow.Show();
            }
            else
            {
                MessageBox.Show("Sorry there was no last order", "Last order", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }