예제 #1
0
        // GET: CompanyBookManage
        public ActionResult Index()
        {
            var model = new CompanyBookSearchViewModel();

            SearchSubOrders(model);
            return(View(model));
        }
예제 #2
0
 private void SearchSubOrders(CompanyBookSearchViewModel model)
 {
     using (UnitOfWorkManager.NewUnitOfWork())
     {
         LoadBookStatusList(model);
         model.CompanySubOrders = _companySubOrderService.Search(new CompanySubOrderSearchModel
         {
             CompanyId          = WorkContext.CurrentMembershipUser.Company.Id,
             MaxSearchTime      = model.MaxSearchTime,
             MinSearchTime      = model.MinSearchTime,
             SelectedBookStatus = model.SelectedBookStatus,
             PageIndex          = model.PageIndex,
         });
     }
 }
예제 #3
0
 private void LoadBookStatusList(CompanyBookSearchViewModel model)
 {
     using (UnitOfWorkManager.NewUnitOfWork())
     {
         IList <Category> cats = _categoryService.GetByParentName("SubOrderStatus");
         model.BookStatusList.Add(new SelectListItem {
             Text = "所有", Value = string.Empty
         });
         foreach (var item in cats)
         {
             model.BookStatusList.Add(new SelectListItem {
                 Text = item.Name, Value = item.Id.ToString()
             });
         }
     }
 }
예제 #4
0
 public ActionResult Index(CompanyBookSearchViewModel model)
 {
     SearchSubOrders(model);
     return(View(model));
 }