コード例 #1
0
        ///<summary>Helper method that copies existing Faq's (and their links) for the most recent version
        ///and inserts them for the new specified version. This is how Jordan handles releases in the manual publisher.
        ///Faq must follow this pattern as well. PageForVersionExists() should be called before this method.</summary>
        public static void CreateFaqsForNewVersion(int newVersion)
        {
            //No need to check RemotingRole; no direct calls to the Db from this method.
            string version = VersionReleases.GetLastReleases(2);

            string[]   versionParts      = version.Split('.');
            int        lastStableVersion = PIn.Int(versionParts[0] + versionParts[1]);
            List <Faq> listFaqs          = GetAllForVersion(lastStableVersion);

            foreach (Faq faq in listFaqs)
            {
                List <string> listPagesLinkedToFaq = GetLinkedManualPages(faq.FaqNum);
                Faq           faqNew = faq.Copy();
                faqNew.ManualVersion = newVersion;
                long faqNewNum = Insert(faqNew);
                //Attach the manual pages from the beta version to the new version.
                CreateManualPageLinks(faqNew.FaqNum, listPagesLinkedToFaq, faqNew.ManualVersion);
            }
        }
コード例 #2
0
        public static Bug GetNewBugForUser()
        {
            Bug bug = new Bug();

            bug.CreationDate = DateTime.Now;
            bug.Status_      = BugStatus.None;
            switch (System.Environment.MachineName)
            {
            case "ANDREW":
            case "ANDREW1":
                bug.Submitter = 29;                      //Andrew
                break;

            case "JORDANS":
            case "JORDANS3":
                bug.Submitter = 4;                      //jsparks
                break;

            case "JASON":
                bug.Submitter = 18;                      //jsalmon
                break;

            case "DAVID":
                bug.Submitter = 27;                      //david
                break;

            case "DEREK":
                bug.Submitter = 1;                      //grahamde
                break;

            case "SAM":
                bug.Submitter = 25;                      //sam
                break;

            case "RYAN":
            case "RYAN1":
                bug.Submitter = 20;                      //Ryan
                break;

            case "CAMERON":
                bug.Submitter = 21;                      //Cameron
                break;

            case "TRAVIS":
                bug.Submitter = 22;                      //tgriswold
                break;

            case "ALLEN":
                bug.Submitter = 24;                      //allen
                break;

            case "JOSH":
                bug.Submitter = 26;                      //josh
                break;

            case "JOE":
                bug.Submitter = 28;                      //joe
                break;

            case "CHRISM":
                bug.Submitter = 30;                      //chris
                break;

            case "SAUL":
                bug.Submitter = 31;                      //saul
                break;

            case "MATHERINL":
                bug.Submitter = 32;                      //matherinl
                break;

            case "LINDSAYS":
                bug.Submitter = 33;                      //linsdays
                break;

            case "BRENDANB":
                bug.Submitter = 34;                      //brendanb
                break;

            case "KENDRAS":
                bug.Submitter = 35;                      //kendras
                break;

            case "STEVENS":
                bug.Submitter = 37;                      //stevens
                break;

            case "LUKEM":
                bug.Submitter = 41;                      //lukem
                break;

            default:
                bug.Submitter = 2;                      //Tech Support
                break;
            }
            bug.Type_         = BugType.Bug;
            bug.VersionsFound = VersionReleases.GetLastReleases(2);
            return(bug);
        }