コード例 #1
0
        public ActionResult personalized_medicine(int?geneid, string aliasid, int?testid)
        {
            var pmusermodel = new PersonalizedMedicine_User();

            pmusermodel.checkgene = PersonalizedMedicine.checkGeneexists(geneid);
            pmusermodel.checktest = PersonalizedMedicine.checkTestexists(testid);

            pmusermodel.GetGenealiases = PersonalizedMedicine.GetGenealiases(geneid);
            pmusermodel.GeneTestlist   = PersonalizedMedicine.GetTestNames(testid);
            pmusermodel.Geneslist      = PersonalizedMedicine.GetGeneNames(geneid);

            if (geneid != null && pmusermodel.checkgene)
            {
                pmusermodel = PersonalizedMedicine.GetGeneDetails(geneid);
                pmusermodel.GetGeneComments           = PersonalizedMedicine.getCommentsSection(geneid);
                pmusermodel.GetRelatededitorscomments = PersonalizedMedicine.getRelatedEditorsChoiceSection(geneid, CurrentUser.UserId);
                pmusermodel.Getclinicalinks           = PersonalizedMedicine.Getclinicallinks(geneid);
                pmusermodel.Gene_citationslist        = PersonalizedMedicine.GetGeneCitations(CurrentUser.UserId, geneid);
                pmusermodel.GetGeneslinks             = PersonalizedMedicine.Getlinkinfo(geneid);
                pmusermodel.GetGenealiases            = PersonalizedMedicine.GetGenealiases(geneid);
                pmusermodel.GeneTestlist = PersonalizedMedicine.GetTestsforGenebygeneid(geneid);
                pmusermodel.Geneslist    = PersonalizedMedicine.GetGeneNames(geneid);
                if (!string.IsNullOrEmpty(aliasid))
                {
                    pmusermodel.Geneslist = PersonalizedMedicine.GetparticularGeneNames(geneid);
                }
            }


            if (testid != null && pmusermodel.checktest)
            {
                pmusermodel = PersonalizedMedicine.GetTestDetails(testid);
                pmusermodel.GetTestComments = PersonalizedMedicine.getTestCommentsSection(testid);
                pmusermodel.GetRelatededitorsTestcomments = PersonalizedMedicine.getRelatedEditorsTestChoiceSection(testid, CurrentUser.UserId);

                pmusermodel.Test_citationslist    = PersonalizedMedicine.GetTestCitations(CurrentUser.UserId, testid);
                pmusermodel.GetTestslinks         = PersonalizedMedicine.GetTestlinkinfo(testid);
                pmusermodel.GetGenesrelatedtoTest = PersonalizedMedicine.GetGenesForTestByTestID(testid);
                pmusermodel.GetGenealiases        = PersonalizedMedicine.GetGenealiases(geneid);
                pmusermodel.GeneTestlist          = PersonalizedMedicine.GetTestNames(testid);
                pmusermodel.Geneslist             = PersonalizedMedicine.GetparticularGeneNames(geneid);
            }

            if (geneid != null)
            {
                pmusermodel.GeneId = Convert.ToInt32(geneid);
            }
            if (testid != null)
            {
                pmusermodel.TestId = Convert.ToInt32(testid);
            }
            pmusermodel.checkgene = PersonalizedMedicine.checkGeneexists(geneid);
            pmusermodel.checktest = PersonalizedMedicine.checkTestexists(testid);
            if ((geneid != null && pmusermodel.checkgene == false) || (testid != null && pmusermodel.checktest == false))
            {
                pmusermodel.Geneslist = PersonalizedMedicine.GetGeneNames(geneid);
            }

            return(View(pmusermodel));
        }