protected override void DeleteChildEntities(string[] childEntityList, string parentID) { foreach (string ChildEntity in childEntityList) { switch (ChildEntity) { #region /* Case Statements - All child grids */ case "CycleDetails": if (Convert.ToInt32(parentID) > 0) { CycleDetailsLibrary library = new CycleDetailsLibrary(ConfigurationHelper.GetsmARTDBContextConnectionString()); IEnumerable <CycleDetails> resultList = library.GetAllByParentID(Convert.ToInt32(parentID), new string[] { "Item", "Purchase_ID" }); foreach (CycleDetails cycleDetails in resultList) { library.Delete(cycleDetails.ID.ToString()); } } break; #endregion } } }