private bool DeleteRowManual(PDataLabelRow ARowToDelete, ref string ACompletionMessage) { bool ReturnValue = false; // We need to delete the rows in PDataLabelUse that reference the current row int key = ARowToDelete.Key; DataRow[] MatchingRows = FExtraDS.PDataLabelUse.Select("p_data_label_key_i=" + key.ToString()); foreach (DataRow row in MatchingRows) { row.Delete(); } // Now we can delete the row in the main table ARowToDelete.Delete(); ReturnValue = true; return(ReturnValue); }
private bool DeleteRowManual(PDataLabelRow ARowToDelete, ref string ACompletionMessage) { bool ReturnValue = false; // We need to delete the rows in PDataLabelUse that reference the current row int key = ARowToDelete.Key; DataRow[] MatchingRows = FExtraDS.PDataLabelUse.Select("p_data_label_key_i=" + key.ToString()); foreach (DataRow row in MatchingRows) { row.Delete(); } // Now we can delete the row in the main table ARowToDelete.Delete(); ReturnValue = true; return ReturnValue; }