コード例 #1
0
        private void bNAdd_Click(object sender, EventArgs e)
        {
            Publisher obj = new Publisher();

            FormPublisherCard form = new FormPublisherCard(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)
            {
                Publisher obj = Config.Session.PublisherUtils.GetById(id.Value);

                FormPublisherCard form = new FormPublisherCard(obj, FormMode.Edit);
                form.ShowDialog();

                if (form.IsObjectAddedIntoDataBase)
                {
                    ApplyFilter();
                }
            }
        }