private void btnDelete_Click(object sender, EventArgs e)
        {
            CategoryBUS bus = new CategoryBUS();
            if (txtCategoryID.ReadOnly == false)
            {
                MessageBox.Show(Resources.DELETE_NONE_CATEGORY);
            }
            else
            {
                if (String.IsNullOrEmpty(txtCategoryID.Text))
                {
                    MessageBox.Show(Resources.DELETE_NONE_CATEGORY);
                }
                else
                {

                    if (MessageBox.Show(Resources.DELETE_CATEGORY_CONFIRM, "", MessageBoxButtons.YesNo) ==
                        DialogResult.Yes)
                    {
                        if (!txtCategoryID.Text.Equals("0"))
                        {
                            CategoryDTO category = bus.GetCategoryById(txtCategoryID.Text);
                            if (bus.DeleteCategory(category) == 1)
                            {
                                MessageBox.Show(Resources.DELETE_CATEGORY_SUCCESS);
                                txtCategoryID.Text = "";
                                txtCategoryName.Text = "";
                                lst.Clear();
                                lst.AddRange(bus.GetAllCatagory());
                                grdCategory.RefreshDataSource();
                            }
                            else
                            {
                                MessageBox.Show(Resources.DELETE_CATEGORY_FAIL);
                            }
                        }
                        else
                        {
                            MessageBox.Show(Resources.DELETE_DEFAULT_CATEGORY);
                        }
                    }
                }
            }
        }
        public BookInfoForm()
        {
            InitializeComponent();

            grcCatalogue.DataSource = lst;

            CategoryBUS bus = new CategoryBUS();
            _lstCate.Add(new CategoryDTO()
            {
                CategoryId = "",
                CategoryName = "--Tất cả danh mục--"
            });
            _lstCate.AddRange(bus.GetAllCatagory());

            foreach (CategoryDTO categoryDTO in _lstCate)
            {
                for (int i = 0; i < categoryDTO.CategoryId.Split('.').Length - 1; i++)
                {
                    categoryDTO.CategoryName = "|--" + categoryDTO.CategoryName;
                }
            }

            cbeDetailCategory.DataSource = _lstCate;

            cboxField1.SelectedIndex = 0;
            cboxField2.SelectedIndex = 0;
            cboxField3.SelectedIndex = 0;
            cboxAno1.SelectedIndex = 0;
            cboxAno2.SelectedIndex = 0;
            cboxType1.SelectedIndex = 0;
            cboxType2.SelectedIndex = 0;
            cboxType3.SelectedIndex = 0;

            SearchBookBUS bbus = new SearchBookBUS();
            int stype = 1;
            dto = new SearchBookDTO();
            dto.Info1 = txtTitle.Text;
            dto.PageNumber = 1;
            dto.SearchType = (SearchType)stype;
            //grcCatalogue.DataSource = bbus.SearchBooks(dto);
            lst.Clear();
            lst.AddRange(bbus.SearchBooks(dto));

            grcCatalogue.RefreshDataSource();

            int NoR = bbus.SearchBooksCount(dto);
            lblResult.Text = NoR.ToString();

            int pages = (int)Math.Ceiling(((double)NoR) / ((double)Options.NumberOfRecord));

            cbePage.Items.Clear();
            cbePage.Text = "";
            for (int i = 1; i <= pages; i++)
            {
                cbePage.Items.Add(i);
            }
            if (pages != 0)
            {
                cbePage.SelectedIndex = 0;
            }
        }