From 9b09d47e1519c2c3a7ff34e89615f96c2605439a Mon Sep 17 00:00:00 2001 From: PaulGarewal Date: Fri, 20 Sep 2024 13:25:00 -0700 Subject: [PATCH] removed commented out logic --- .../Controllers/NutrientsController.cs | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs index 1eef1fc0..d3012043 100644 --- a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs +++ b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs @@ -480,13 +480,6 @@ private void FertigationDetailSetup_Fertilizer(ref FertigationDetailsViewModel f fgvm.selFertOption = 0; } - // if (fgvm.selTypOption == "4") // this is custom liquid fertigation - // { - // fgvm.manualEntry = true; - // fgvm.fertOptions = new List() { new SelectListItem() { Id = 1, Value = "Custom" } }; - // fgvm.selFertOption = 1; - // } - return; } @@ -660,44 +653,6 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm) } } - // bool isCustomFertigation = fgvm.selTypOption == "4"; - // fgvm.manualEntry = isCustomFertigation; - - // if (isCustomFertigation) - // { - // // Validate custom nutrient inputs here, may have to be moved and altered - // if (string.IsNullOrEmpty(fgvm.valN)) - // { - // ModelState.AddModelError("valN", "Required"); - // } - // else if (!decimal.TryParse(fgvm.valN, out decimal customN) || customN < 0 || customN > 100) - // { - // ModelState.AddModelError("valN", "Invalid. Must be between 0 and 100."); - // } - - // if (string.IsNullOrEmpty(fgvm.valP2o5)) - // { - // ModelState.AddModelError("valP2o5", "Required"); - // } - // else if (!decimal.TryParse(fgvm.valP2o5, out decimal customP) || customP < 0 || customP > 100) - // { - // ModelState.AddModelError("valP2o5", "Invalid. Must be between 0 and 100."); - // } - - // if (string.IsNullOrEmpty(fgvm.valK2o)) - // { - // ModelState.AddModelError("valK2o", "Required"); - // } - // else if (!decimal.TryParse(fgvm.valK2o, out decimal customK) || customK < 0 || customK > 100) - // { - // ModelState.AddModelError("valK2o", "Invalid. Must be between 0 and 100."); - // } - - // // Set up custom fertilizer options - // fgvm.fertOptions = new List() { new SelectListItem() { Id = 1, Value = "Custom" } }; - // fgvm.selFertOption = 1; - // } - if (fgvm.buttonPressed == "Calculate" && ModelState.IsValid) { ModelState.Clear();