private void btnthem_Click(object sender, EventArgs e)
        {
            btnsua.Enabled = false;
            if (btnthem.Text == "Thêm")
            {
                MoDieuKien();
                setnull();
                txtmasach.Focus();
                btnthem.Text = "Lưu";
                MaTuTang();
            }
            else if (btnthem.Text == "Lưu")
            {
                int yearinput = int.Parse(dtnamxb.Value.Year.ToString());
                int c         = year - yearinput;
                int lt        = Convert.ToInt32(Time);
                if (txttacgia.Text == "" || txttensach.Text == "" || cbtls.Text == "")
                {
                    MessageBox.Show("Xin mời nhập đầy đủ thông tin", "Thông Báo");
                    return;
                }
                else if (c > lt)
                {
                    MessageBox.Show("Sách đã quá hạn.", "Thông Báo");
                    return;
                }
                else
                {
                    try
                    {
                        ec.masach     = txtmasach.Text;
                        ec.namsx      = dtnamxb.Value.ToString();
                        ec.ngaynhap   = dtngaynhap.Value.ToString();
                        ec.nhaxuatban = txtnhaxuatban.Text;
                        ec.tacgia     = txttacgia.Text;
                        ec.tensach    = txttensach.Text;
                        ec.theloai    = cbtls.Text;
                        ec.trigia     = txttrigia.Text;
                        bus.ThemDuLieu(ec);
                        ecds.masach  = txtmasach.Text;
                        ecds.tensach = txttensach.Text;
                        ecds.theloai = cbtls.Text;
                        ecds.tacgia  = txttacgia.Text;
                        busds.ThemDuLieu(ecds);


                        MessageBox.Show("Thêm dữ liệu thành công!", "Thông báo");
                    }
                    catch
                    {
                        MessageBox.Show("Báo lỗi", "Thông báo");
                        return;
                    }
                }
                btnthem.Text = "Thêm";
                KhoaDieuKien();
                HienThi("");
            }
            string show = "select DISTINCT theloai from Sach where theloai is not null";

            db.LoadData2Combobox(cbtls, show);
        }