private void bNAdd_Click(object sender, EventArgs e) { Author obj = new Author(); FormAuthorCard form = new FormAuthorCard(obj, FormMode.Add); form.ShowDialog(); if (form.IsObjectAddedIntoDataBase) { ApplyFilter(); } }
private void bNEdit_Click(object sender, EventArgs e) { int?id = GetCurrentObjectId(); if (id.HasValue) { Author obj = Config.Session.AuthorUtils.GetById(id.Value); FormAuthorCard form = new FormAuthorCard(obj, FormMode.Edit); form.ShowDialog(); if (form.IsObjectAddedIntoDataBase) { ApplyFilter(); } } }