コード例 #1
0
 public ActionResult GetCodeCombinitionList(long sobId)
 {
     CodeCombinitionListModel model = new CodeCombinitionListModel();
     model.CodeCombinitions = service.GetAll(AuthenticationHelper.User.CompanyId, sobId, model.SearchText, true, model.Page, model.SortColumn, model.SortDirection)
         .Select(x => new CodeCombinitionViewModel(x)).ToList();
     return PartialView("_List", model);
 }
コード例 #2
0
        public ActionResult Index(CodeCombinitionListModel model)
        {
            if (model.SetOfBooks == null)
            {
                model.SetOfBooks = sobService
                    .GetByCompanyId(AuthenticationHelper.User.CompanyId)
                    .Select(x => new SelectListItem
                    {
                        Text = x.Name,
                        Value = x.Id.ToString(),
                        Selected = x.Id == model.SOBId ? true : false
                    }).ToList();
            }

            model.CodeCombinitions = service.GetAll(AuthenticationHelper.User.CompanyId, model.SOBId != 0 ? model.SOBId : Convert.ToInt64(model.SetOfBooks.First().Value), model.SearchText, true, model.Page, model.SortColumn, model.SortDirection)
                .Select(x => new CodeCombinitionViewModel(x)).ToList();
            return View(model);
        }