private void toolStripButtonEdit_Click(object sender, EventArgs e) { Call call = (Call)bindingSourceCalls.Current; FormAddEditCall editCallForm = new FormAddEditCall(call, user); if (editCallForm.ShowDialog() == DialogResult.OK) { CallsRepository callsRepository = new CallsRepository(); callsRepository.Save(call); BindControls(); } }
private void toolStripButtonAdd_Click(object sender, EventArgs e) { Call call = new Call(); FormAddEditCall formAddCall = new FormAddEditCall(call, user); if (formAddCall.ShowDialog() == DialogResult.OK) { CallsRepository callsRepository = new CallsRepository(); callsRepository.Save(call); BindControls(); } }