Esempio n. 1
0
        private void Report_Click(object sender, RoutedEventArgs e)
        {
            string command = Report.Content.ToString();

            if (command == "Report Suspicious Activity")
            {
                LogTable.HeadersVisibility = DataGridHeadersVisibility.All;
                errorMsg.Content           = "To add, click the left buttons of the suspicious entries from the above table to add into the bottom table. If you clicked the wrong entry, remove it by clicking the left button" +
                                             "of the wrong entry from the bottom table   ";
                ReportTable.Items.Clear();
                Reporting.Visibility = Visibility.Visible;
                Report.Content       = "Submit";
            }
            else
            {
                List <int> test = (List <int>)Application.Current.Resources["logIdList"];
                if (test.Count != 0)
                {
                    OTP hello = new OTP();
                    hello.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    hello.ShowDialog();


                    if (hello.DialogResult == true)
                    {
                        Passlog.lockDown(test, getUserId());
                        LogTable.HeadersVisibility = DataGridHeadersVisibility.Column;
                        errorMsg.Content           = null;
                        test.Clear();
                        Application.Current.Resources["logIdList"] = test;
                        Reporting.Visibility = Visibility.Collapsed;
                        ReportTable.Items.Clear();
                        Report.Content = "Report Suspicious Activity";
                        MessageBox.Show("Report Submitted. Our Tech Support will contact you shortly");
                    }

                    else
                    {
                        MessageBox.Show("OTP not entered correctly");
                    }
                }
                else
                {
                    MessageBox.Show("Please select entries before submitting.");
                }
            }
        }
Esempio n. 2
0
        private bool popup()
        {
            Mouse.OverrideCursor = null;
            OTP hello = new OTP();

            hello.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            hello.ShowDialog();

            if (hello.DialogResult == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }