///<summary>Validates the inssub of each inssubnum passed in. Will delete the inssub/create and attach a blank plan if needed.</summary> public static bool ValidatePlanNumForList(List <long> listInsSubNums, bool doFixIfInvalid = true) { bool isValid = true; listInsSubNums.ForEach(x => { if (!InsSubs.ValidatePlanNum(x, doFixIfInvalid)) { isValid = false; } }); return(isValid); }
///<summary>Checks all attached inssubs to make sure they have valid insplans. returns true if list is valid</summary> public static bool IsPatPlanListValid(List <PatPlan> listPatPlan, bool doFixIfInvalid = true, List <InsSub> listInsSubs = null) { //No need to check RemotingRole; no call to db. bool isValid = true; for (int i = 0; i < listPatPlan.Count; i++) { if (!InsSubs.ValidatePlanNum(listPatPlan[i].InsSubNum, doFixIfInvalid, listInsSubs)) { isValid = false; } } return(isValid); }