예제 #1
0
 public async Task<ActionResult> ViewProduct(string Id, string SearchID)
 {
     iDunnoDB db = new iDunnoDB();
     TargetAPI api = new TargetAPI();
     TargetItem item = new TargetItem(api.GetObjectData(Id));
     await db.LogClick(SearchID, Id);
     
     return Redirect(item.Url);
 }
예제 #2
0
 //POST home
 public async Task<ActionResult> Index(string search, HomeScreen screen)
 {
     iDunnoDB db = new iDunnoDB();
     var iable = await db.LogSearch(search);
     TargetAPI api = new TargetAPI();
     screen.SearchQuery = search;
     screen.QueryID = iable.Id.ToString();
     List<TargetItem> items = new List<TargetItem>();
     foreach (dynamic duo in api.FastSearch(search))
     {
         items.Add(new TargetItem(duo));
     }
     screen.Items = items;
     return View(screen);
 }