public JsonResult StartQC(int ID) { return(Json(new ResponseMsg() { IsSuccess = QCLogic.Start(ID) }, JsonRequestBehavior.AllowGet)); }
public ActionResult QCDone(string ID, List <BillOfMaterialLabParameters> paramValue) { ResponseMsg response = new ResponseMsg(); if (QCLogic.Done(ID, paramValue)) { var fileName = QCLogic.PrintQCSlip(paramValue, Server.MapPath(ConfigurationManager.AppSettings["ReportFolderPath"]), Convert.ToInt32(ID), currUser.Name); if (!string.IsNullOrEmpty(fileName)) { response.IsSuccess = true; response.ResponseValue = ConfigurationManager.AppSettings["ReportFolderPath"].Replace("~", "").Trim() + fileName; } } return(Json(response)); }
public ActionResult QC() { return(View(QCLogic.GetQCBatches())); }
public void CalculateQCPropertiesOnlyTest() { RockProperties rock = new RockProperties() { RockPorosity = 0.34068825, KGrain = 37, MuGrain = 44, RhoGrain = 2650, RhoBulk = 2121.933213, KBulk = 9.316624568, MuBulk = 2.297016025 }; FluidProperties fluid = new FluidProperties() { GassmanResultKInitial = 2.54, GassmanResultRhoInitial = 1100 }; FluidProperties[] flagResults = new FluidProperties[] { new FluidProperties() { FluidType = FluidType.Brine, FlagResultK = 2.54, FlagResultRho = 1100 } }; QCProperties expected = new QCProperties() { Porosity = 0.34068825, KDryByKMin = 0.107294, DenBrineSat = 2121.933, VpBrineSat = 2415.363, VsBrineSat = 1040.438 }; QCProperties actual; actual = QCLogic.CalculateQCProperties(rock, fluid, flagResults, new MetricMPa()); //To test in Field units actual = QCLogic.CalculateQCProperties(rock, fluid, flagResults, new Field()) and convert values for assertion. Assert.AreEqual(expected.Porosity, actual.Porosity, "Porosity do not match"); Assert.AreEqual(expected.KDryByKMin, actual.KDryByKMin, 1e-3, "KDryByKmin do not match"); Assert.AreEqual(expected.DenBrineSat.Value, actual.DenBrineSat.Value, 1e-3, "DenBrineSat do not match"); Assert.AreEqual(expected.VpBrineSat.Value, actual.VpBrineSat.Value, 1e-3, "VpBrineSat do not match"); Assert.AreEqual(expected.VsBrineSat.Value, actual.VsBrineSat.Value, 1e-3, "VpBrineSat do not match"); PorosityKDryByKMinProperties kdryValueForPointZero2 = new PorosityKDryByKMinProperties() { porosity = 0.02, KDryByKMPoint1 = 0.833333333, KDryByKMPoint15 = 0.882352941, KDryByKMPoint2 = 0.909090909, KDryByKMPoint25 = 0.925925926, KDryByKMPoint3 = 0.9375, KDryByKMPoint35 = 0.945945946, KDryByKMPoint4 = 0.952380952, KDryByKMPoint45 = 0.957446809, KDryByKMPoint5 = 0.961538462 }; PorosityKDryByKMinProperties kdryValueForPoint98 = new PorosityKDryByKMinProperties() { KDryByKMPoint1 = 0.0925925925925926, KDryByKMPoint15 = 0.13274336283185842, KDryByKMPoint2 = 0.16949152542372883, KDryByKMPoint25 = 0.2032520325203252, KDryByKMPoint3 = 0.234375, KDryByKMPoint35 = 0.26315789473684209, KDryByKMPoint4 = 0.28985507246376813, KDryByKMPoint45 = 0.31468531468531469, KDryByKMPoint5 = 0.33783783783783783, porosity = 0.98 }; VpVsProperties vp1700 = new VpVsProperties() { CastagniaDolomite = 913.74, CastagniaLimestone = 538.8788, CastagniaMudrock = 293.17, CastagniaSandstone = 511.24, Han = 562.32, Vp = 1700 }; DenVpProperties denVp1700 = new DenVpProperties() { GardnerAnhydrite = 2384.05319906545, GardnerDolomite = 1988.94318029729, GardnerSandstone = 1906.5809814135, GardnerShale = 2014.22050513369, MavkoLimestone = 1381.579861, Vp = 1700 }; //Assert.AreEqual(kdryValueForPoint98, actual.PorosityKDryPlotList[1], "Kdry table does not match when porosity is 0.98", null); //Assert.AreEqual(vp1700, actual.VpVsPlotList[1], "VpVs table does not match when Vp is 1700", null); //Assert.AreEqual(denVp1700, actual.DenVpPlotList[1], "DenVp table does not match when Vp is 1700", null); }