// GET: BooksServer
        public JsonResult Index(string bookName, int pageIndex = 0)
        {
            List<BookServerModel> modelList = new List<BookServerModel>();

            BookInfoCondition condition = new BookInfoCondition();
            condition.BookName = bookName;

            IEnumerable<BookInfo> books = this.IBookInfoDataProvider.GetBookList(condition);

            PagingContent<BookInfo> paging = new PagingContent<BookInfo>(books, pageIndex);

            foreach (var item in paging.EntityList)
            {
                modelList.Add(BookServerModel.GetServerModel(item));
            }

            return Json(modelList, JsonRequestBehavior.AllowGet);
        }
        // GET: BookManage
        public ActionResult Index(string bookName, long searchselectedID = 0, bool? isAvaliable = null, Int32 pageIndex = 0)
        {
            if (!string.IsNullOrEmpty(bookName))
            {
                bookName = bookName.Trim();
            }

            BookManageIndexModel model = new BookManageIndexModel();

            BookInfoCondition condition = new BookInfoCondition();
            condition.BookName = bookName;
            condition.CategoryID = searchselectedID;
            condition.IsAvaliable = isAvaliable;

            IEnumerable<BookInfo> books = this.IBookInfoDataProvider.GetBookList(condition);

            PagingContent<BookInfo> paging = new PagingContent<BookInfo>(books, pageIndex, 10);

            foreach (var item in paging.EntityList)
            {
                model.BookModelList.Add(BookModel.GetViewModel(item, this.LoginUser()));
            }

            model.SearchBookName = bookName;
            model.SearchCategoryList = DropDownListHelper.GetCategorySelectListBySelectedID(searchselectedID);
            model.PagingContent = paging;

            if (base.Request.IsAjaxRequest())
            {
                return PartialView("BookPartial", model);
            }
            else
            {
                return View(model);
            }
        }
        // GET: BookManage
        public ActionResult Index(string bookName, long searchselectedID = 0, Int32 pageIndex = 0)
        {
            if (!string.IsNullOrEmpty(bookName))
            {
                bookName = bookName.Trim();
            }

            BookManageIndexModel model = new BookManageIndexModel();

            BookInfoCondition condition = new BookInfoCondition();
            condition.BookName = bookName;
            condition.CategoryID = searchselectedID;

            IEnumerable<BookInfo> books = this.IBookInfoDataProvider.GetBookList(condition);

            PagingContent<BookInfo> paging = new PagingContent<BookInfo>(books, pageIndex);

            foreach (var item in paging.EntityList)
            {
                model.BookModelList.Add(BookModel.GetViewModel(item));
            }

            model.SearchBookName = bookName;
            model.SearchCategoryList = DropDownListHelper.GetCategorySelectListBySelectedID(searchselectedID);
            model.PagingContent = paging;

            return View(model);
        }
        // GET: PublisherManage
        public ActionResult Index(String name, Int32 pageIndex = 0)
        {
            if(!string.IsNullOrEmpty(name))
            {
                name = name.Trim();
            }

            PublisherManageIndexModel model = new PublisherManageIndexModel();
            model.FilterName = name;

            PublisherInfoCondition condition = new PublisherInfoCondition();
            condition.PublisherName = name;

            IEnumerable<PublisherInfo> publishers = this.IPublisherInfoDataProvider.GetPublisherList(condition);

            PagingContent<PublisherInfo> paging = new PagingContent<PublisherInfo>(publishers, pageIndex);

            foreach (var item in paging.EntityList)
            {
                model.PublisherModelList.Add(PublisherModel.GetViewModel(item));
            }

            model.PagingContent = paging;

            return View(model);
        }
        // GET: CategroyManage
        public ActionResult Index(String name, Int32 pageIndex = 0)
        {
            if (!string.IsNullOrEmpty(name))
            {
                name = name.Trim();
            }

            CategoryManageIndexModel model = new CategoryManageIndexModel();
            model.FilterName = name;

            CategoryInfoCondition condition = new CategoryInfoCondition();
            condition.CategoryName = name;

            IEnumerable<CategoryInfo> categorys = this.ICategoryInfoDataProvider.GetCategoryList(condition);

            PagingContent<CategoryInfo> paging = new PagingContent<CategoryInfo>(categorys, pageIndex);

            foreach (var item in paging.EntityList)
            {
                model.CategoryModelList.Add(CategoryModel.GetViewModel(item));
            }

            model.PagingContent = paging;

            return View(model);
        }