예제 #1
0
 public async Task <IHttpActionResult> List(string query = null)
 {
     return(JsonWithPermissions(new
     {
         Results = await ReagentsDao.Find(this, query)
     }));
 }
예제 #2
0
        public async Task <ActionResult> Index(string query)
        {
            if (string.IsNullOrWhiteSpace(query))
            {
                return(View(new ReagentsSearchViewModel()));
            }

            var model = new ReagentsSearchViewModel
            {
                Query   = query,
                Results = await ReagentsDao.Find(this, query)
            };

            return(View(model));
        }
예제 #3
0
        public async Task <ActionResult> AddReagent(Lab lab, string query = null)
        {
            var model = new LabsAddReagentViewModel
            {
                Lab = lab,
            };

            if (string.IsNullOrWhiteSpace(query))
            {
                return(View(model));
            }

            model.Query   = query;
            model.Results = await ReagentsDao.Find(this, query);

            return(View(model));
        }