private void btnAdd_Click(Object sender, EventArgs e) { using(GBGNodeAddModifyRecord modForm = new GBGNodeAddModifyRecord()) { modForm.ShowDialog(this); if(modForm.OkExit) { elbRecords.RelativeAdd(modForm.GetRecord(), 1); parent.WriteLogLine("New record accepted."); } else parent.WriteLogLine("Record creation cancelled."); } }
private void btnAdd_Click(Object sender, EventArgs e) { using (GBGNodeAddModifyRecord modForm = new GBGNodeAddModifyRecord()) { modForm.ShowDialog(this); if (modForm.OkExit) { elbRecords.RelativeAdd(modForm.GetRecord(), 1); parent.WriteLogLine("New record accepted."); } else { parent.WriteLogLine("Record creation cancelled."); } } }
private void btnModifyRecord_Click(Object sender, EventArgs e) { RecordBase record = (RecordBase)lbRecords.SelectedItem; using (GBGNodeAddModifyRecord modForm = new GBGNodeAddModifyRecord(record)) { modForm.ShowDialog(this); if (modForm.OkExit) { elbRecords.SelectedReplace(modForm.GetRecord()); parent.WriteLogLine("Record modification accepted."); } else { parent.WriteLogLine("Record modification attempt cancelled."); } } }
private void btnModifyRecord_Click(Object sender, EventArgs e) { RecordBase record = (RecordBase) lbRecords.SelectedItem; using(GBGNodeAddModifyRecord modForm = new GBGNodeAddModifyRecord(record)) { modForm.ShowDialog(this); if(modForm.OkExit) { elbRecords.SelectedReplace(modForm.GetRecord()); parent.WriteLogLine("Record modification accepted."); } else parent.WriteLogLine("Record modification attempt cancelled."); } }