//DeletePart public bool DeletePart(int i) { bool success = false; for (int j = 0; j < AllParts.Count; j++) { if (AllParts[j].PartID.Equals(i)) { AllParts.RemoveAt(CurrentPartIndex); return(success = true); } else { MessageBox.Show("Removal failed."); return(false); } } return(success); }
// Remove Part by Part. internal static void RemovePart(Part part) { AllParts.RemoveAt(CurrentPartIndex); }
// SwapParts. internal static void SwapPart(Part part) { AllParts.Insert(CurrentPartIndex, part); AllParts.RemoveAt(CurrentPartIndex + 1); }
public static bool deletePart(int i) { AllParts.RemoveAt(i); return(true); }
public static void updatePart(int i, Part part) { AllParts.Insert(i, part); AllParts.RemoveAt(i + 1); }
public static void UpdatePart(int idx, Part selectedPart) { AllParts.Insert(idx, selectedPart); AllParts.RemoveAt(idx + 1); }
public static void updatePart(int k, Part part) { AllParts.RemoveAt(k); AllParts.Add(part); }