示例#1
0
        public ActionResult HandelForm(Test ApplicatioNames, Test TestTypes, Test ProjectNames)
        {
            string    ProjectName    = ProjectNames.ProjectName.ToString();
            string    TestType       = TestTypes.TestType.ToString();
            string    ApplicatioName = ApplicatioNames.ApplicatioName.ToString();
            TestCase1 Testobj        = new TestCase1();

            switch (ProjectName)
            {
            case "lifeAlborzInsurance":
            {
                switch (ApplicatioName)
                {
                case "AlborzContactManagingDirector":
                {
                    switch (TestType)
                    {
                    case "AcceptanceTest":
                        string[] testrepo = Testobj.TestAction1();
                        IList <TestingResult> testindexlist = new List <TestingResult>();
                        testindexlist.Add(new TestingResult()
                                {
                                    TestCheck1 = ApplicatioName, TestCheck2 = ProjectName, TestCheck3 = TestType
                                });

                        TestingResult aaa = new TestingResult();
                        aaa.TestCheck1 = ApplicatioName;
                        aaa.TestCheck2 = ProjectName;
                        aaa.TestCheck3 = TestType;

                        _context.Add(aaa);
                        _context.SaveChangesAsync();
                        ViewData["testindexlist"] = testindexlist;
                        return(View("TestResult"));
                    }
                }
                break;
                }
                break;
            }
            }

            return(View("Index"));
        }