コード例 #1
0
        //
        // GET: /Employees/
        public ViewResult Index(EmployeeSearchParameters searchParameters)
        {
            AttachmentSlot[] slotsToShow = Query(new AttachmentSlotsQuery<Employee>());
            log.Dump(LogLevel.Debug, slotsToShow, "attachmentSlots");
            ScriptManager.RegisterGlobalJavascript(
                "ViewData",
                new
                {
                    attachmentSlots = slotsToShow
                },
                500);

            return View(searchParameters);
        }
コード例 #2
0
 public SearchEmployees(EmployeeSearchParameters parameters)
 {
     Parameters = parameters;
 }
コード例 #3
0
 //
 // GET: /Employees/List?terms=Mar
 public JsonNetResult List(EmployeeSearchParameters searchParameters)
 {
     var query = new SearchEmployees(searchParameters);
     var results = Query(query);
     return Json(new
     {
         Items = results,
         Skipped = searchParameters.Skip,
         TotalResults = query.Stats.TotalResults
     });
 }