示例#1
0
        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();
            }
        }
示例#2
0
        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();
                }
            }
        }