private void manufacturingOk_Click(object sender, EventArgs e) { if (manufacturingTxtComponent1.Text.Equals(ItemManufacturingRecordManager.UnspecifiedComponentId)) { // When the first component is unspecified we assume the user intends // to delete the manufacturing recipe if (m_tableIO.getState().Equals(TableIO.State.View)) { // Only delete on View since Add only creates the record during save m_tableIO.recordDelete(); } this.Close(); } else { DataValidation.Result dataValidationResult = m_tableIO.recordValid(); if (dataValidationResult == null || dataValidationResult.isValid()) { if (m_tableIO.recordSave(m_itemId)) { this.Close(); } } else { dataValidationResult.showMessage(); } } // Not every path leads to this.Close() and that is intentional }
public void deleteRecord() { if (TableIO.recordDelete(listTableHandler)) { activate(); } }
private void btnDelete_Click(object sender, EventArgs e) { m_currentTableIO.recordDelete(); }