Example #1
0
        private void tSMIBookCard_Click(object sender, EventArgs e)
        {
            if (this.Reading.Book != null)
            {
                FormBookCard form = new FormBookCard(this.Reading.Book, FormMode.View);
                form.ShowDialog();

                if (form.IsObjectAddedIntoDataBase)
                {
                    SetBook();
                }
            }
        }
Example #2
0
        private void bNAdd_Click(object sender, EventArgs e)
        {
            Book obj = new Book();

            FormBookCard form = new FormBookCard(obj, FormMode.Add);

            form.ShowDialog();

            if (form.IsObjectAddedIntoDataBase)
            {
                ApplyFilter();
            }
        }
Example #3
0
        private void bNEdit_Click(object sender, EventArgs e)
        {
            int?id = GetCurrentObjectId();

            if (id.HasValue)
            {
                Book obj = Config.Session.BookUtils.GetById(id.Value);

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

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