Esempio n. 1
0
        public void CheckDipValue_Pass()
        {
            double startValue = 90;
            List <View_HoleDepthInfo> depthInfoList = new List <View_HoleDepthInfo>()
            {
                new View_HoleDepthInfo
                {
                    HoleName = "Hole1",
                    Depth    = 10,
                    Dip      = 90,
                    Azimuth  = 0
                },
                new View_HoleDepthInfo
                {
                    HoleName = "Hole1",
                    Depth    = 20,
                    Dip      = 89,
                    Azimuth  = 0
                },
                new View_HoleDepthInfo
                {
                    HoleName = "Hole1",
                    Depth    = 30,
                    Dip      = 91,
                    Azimuth  = 0
                },
                new View_HoleDepthInfo
                {
                    HoleName = "Hole1",
                    Depth    = 40,
                    Dip      = 92,
                    Azimuth  = 0
                },
                new View_HoleDepthInfo
                {
                    HoleName = "Hole1",
                    Depth    = 50,
                    Dip      = 91,
                    Azimuth  = 0
                },
            };

            DrilledHoleSurveyClass.CheckDipValue(startValue, depthInfoList);
            Assert.IsTrue(depthInfoList.Exists(a => a.DipStatus == "false") == false);
        }
Esempio n. 2
0
 public ActionResult HoleDepthInfoList(string holeName)
 {
     if (Request.IsAuthenticated)
     {
         var drilledHoleDb     = new DrilledHoleDbEntities();
         var drilledHole       = drilledHoleDb.Table_DrilledHole.FirstOrDefault(a => a.HoleName == holeName);
         var holeDepthInfoList = drilledHoleDb.View_HoleDepthInfo.Where(a => a.HoleName == holeName).OrderBy(a => a.Depth).ToList();
         DrilledHoleSurveyClass.CheckAzimuthValue(drilledHole.Azimuth, holeDepthInfoList);
         DrilledHoleSurveyClass.CheckDipValue(drilledHole.Dip, holeDepthInfoList);
         var model = new HoleDepthInfoListModel()
         {
             HoleName          = holeName,
             HoleDepthInfoList = holeDepthInfoList
         };
         return(View(model));
     }
     return(RedirectToAction("Login", "Account"));
 }