private void btnCancel_Click(object sender, EventArgs e)
        {
            if (Num.Text == "")
            {
                MessageBox.Show("Please enter the Issue Number", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                var issueBook = new IssueBook();
                var isDeleted = issueBook.Delete(Num.Text);

                if (isDeleted)
                {
                    MessageBox.Show("Issue Deleted Succesfully.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    IncreaseQuantity();
                    populate();
                }
            }
        }
        private void add_Click(object sender, EventArgs e)
        {
            if (Num.Text == "" || textBox1.Text == "")
            {
                MessageBox.Show("Please fill all informations", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                try
                {
                    var issueBook = new IssueBook();
                    issueBook.issueNum   = Convert.ToInt32(Num.Text);
                    issueBook.stdId      = Convert.ToInt32(Usn.SelectedValue.ToString());
                    issueBook.stdName    = textBox1.Text;
                    issueBook.stdDep     = Dep.Text;
                    issueBook.stdPhone   = Phone.Text;
                    issueBook.stdMail    = email.Text;
                    issueBook.bookIssued = Book.SelectedValue.ToString();
                    issueBook.issueDate  = Date.Value.Month.ToString() + "/" + Date.Value.Day.ToString() + "/" + Date.Value.Year.ToString();


                    var result = issueBook.Save();

                    if (result)
                    {
                        MessageBox.Show("Book Issued Successfully.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        UpdateQuantity();
                        populate();
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
        }
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            IssueBook issue = new IssueBook();

            issue.Show();
        }