예제 #1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            string  lcbookid  = "0000000";
            frmBook frnewbook = new frmBook();

            if (frnewbook.ShowDialog(lcbookid, _Genre.GenreName) == DialogResult.OK)
            {
                setdetails();
            }
        }
예제 #2
0
        private void lstBooks_DoubleClick(object sender, EventArgs e)
        {
            string lcKey;

            lcKey = Convert.ToString(value: lstBooks.SelectedItem);
            string lcBookid = lcKey.Substring(0, 6);


            if (lcKey != null)
            {
                try
                {
                    frmBook frnew = new frmBook();
                    if (frnew.ShowDialog(lcBookid, _Genre.GenreName) == DialogResult.OK)
                    {
                        setdetails();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "This should never occur");
                }
            }
        }