コード例 #1
0
        private void CheckForIncompleteSkiers()
        {
            CalcScoreSummary myCalcScoreSummary = new CalcScoreSummary();
            DataTable        curDataTable       = myCalcScoreSummary.getIncompleteSkiers(mySanctionNum);

            TourPackageButton.BeginInvoke((MethodInvoker) delegate() {
                Application.DoEvents();
                Cursor.Current = Cursors.Default;
            });

            if (curDataTable.Rows.Count > 0)
            {
                StringBuilder curMsg = new StringBuilder("");
                curMsg.Append("There are " + curDataTable.Rows.Count + " skiers that have incomplete scores or are marked as not ready to ski"
                              + "\nNote that skiers marked as not ready to ski will not be included in the scorebook or the skier performance file");
                curMsg.Append("\n\nSkierName AgeGroup Event Round Status");
                foreach (DataRow curRow in curDataTable.Rows)
                {
                    curMsg.Append("\n" + curRow["SkierName"]);
                    curMsg.Append(" " + curRow["AgeGroup"]);
                    curMsg.Append(" " + curRow["Event"]);
                    curMsg.Append(" " + curRow["Round"]);
                    curMsg.Append(" " + curRow["Status"]);
                }
                MessageBox.Show(curMsg.ToString());
            }
        }
コード例 #2
0
        private void MergeTourButton_Click(object sender, EventArgs e)
        {
            TourMerge tourMergeFiles = new TourMerge();
            bool      curResults     = tourMergeFiles.mergeTourFiles(this.mySanctionNum);

            if (curResults)
            {
                String curTourFolder = Properties.Settings.Default.ExportDirectory;

                Cursor.Current = Cursors.WaitCursor;
                ArrayList curFileFilterList = getEndOfTourReportList(mySanctionNum, myTourClass);
                ZipUtil.ZipFiles(curTourFolder, mySanctionNum + myTourClass + ".zip", curFileFilterList);
                TourPackageButton.BeginInvoke((MethodInvoker) delegate() {
                    Application.DoEvents();
                    Cursor.Current = Cursors.Default;
                });
            }
        }
コード例 #3
0
        private void TourPackageButton_Click(object sender, EventArgs e)
        {
            try {
                String curTourFolder = Properties.Settings.Default.ExportDirectory;
                if (myTourRow != null)
                {
                    using (FolderBrowserDialog curFolderDialog = new FolderBrowserDialog()) {
                        curFolderDialog.ShowNewFolderButton = true;
                        curFolderDialog.RootFolder          = Environment.SpecialFolder.Desktop;
                        curFolderDialog.SelectedPath        = @curTourFolder;
                        if (FolderBrowserLauncher.ShowFolderBrowser(curFolderDialog, Form.ActiveForm) == DialogResult.OK)
                        {
                            curTourFolder = curFolderDialog.SelectedPath;
                        }
                    }
                    writeTourIdentDataFile(myTourRow, curTourFolder);

                    ExportTourSummary myExportTourSummary = new ExportTourSummary();
                    myExportTourSummary.ExportData();

                    ExportData myExportData        = new ExportData();
                    String     curTourDataFileName = curTourFolder;
                    if (curTourFolder.Substring(curTourFolder.Length - 1).Equals("\\"))
                    {
                        curTourDataFileName += mySanctionNum + "TS.txt";
                    }
                    else
                    {
                        curTourDataFileName += "\\" + mySanctionNum + "TS.txt";
                    }
                    myExportData.exportTourData(mySanctionNum, curTourDataFileName);

                    Cursor.Current = Cursors.WaitCursor;
                    ArrayList curFileFilterList = getEndOfTourReportList(mySanctionNum, myTourClass);
                    ZipUtil.ZipFiles(curTourFolder, mySanctionNum + myTourClass + ".zip", curFileFilterList);
                    TourPackageButton.BeginInvoke((MethodInvoker) delegate() {
                        Application.DoEvents();
                        Cursor.Current = Cursors.Default;
                    });
                }
            } catch (Exception ex) {
                MessageBox.Show("Exception selecting and compressing selected files from specified folder " + "\n\nError: " + ex.Message);
            }
        }
コード例 #4
0
        private void validateTourData(object sender, EventArgs e)
        {
            if (sender != null)
            {
                Timer curTimerObj = (Timer)sender;
                curTimerObj.Stop();
                curTimerObj.Tick -= new EventHandler(validateTourData);
            }

            Cursor.Current = Cursors.WaitCursor;
            CheckTourData();
            CheckForIncompleteSkiers();
            CheckForChiefOfficials();
            CheckBoatUse();

            // Disabling the Alumni functionality at this time 8/8/17.
            // Do not want it used inadvertently
            if (((String)myTourRow["Name"]).Contains("##Alumni##"))
            {
                String curMsg = "This has been recognized as a collegiate alumni tournament  "
                                + "\nSlalom scores for these tournaments have been adjust for tournament scoring purposes"
                                + "\nYou will need to have the scores adjusted to submit them to the AWSA Ranking List"
                                + "\n\nClick OK to perform this update "
                                + "\nClick Cancel to bypass this update if you want to skip the update or have previously completed the update";
                DialogResult msgResp = MessageBox.Show(curMsg, "Update Notice",
                                                       MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                if (msgResp == DialogResult.OK)
                {
                    execUpdateAlumniSlalomScores();
                }
            }

            TourPackageButton.BeginInvoke((MethodInvoker) delegate() {
                Application.DoEvents();
                Cursor.Current = Cursors.Default;
            });
        }