コード例 #1
0
        public ActionResult Create( manualAssignementViewModel viewmodel)
        {
            if (ModelState.IsValid)
            {
                db.manualAssign_tweetRandomSample2_to_geonamesRestricted.Add(viewmodel.manualAssign);
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            else {
                var errors = ModelState
                .Where(x => x.Value.Errors.Count > 0)
                .Select(x => new { x.Key, x.Value.Errors })
                .ToArray();
            }

            return View(viewmodel.manualAssign);
        }
コード例 #2
0
 // GET: /_geoNamesRestricted/
 public PartialViewResult _geoNamesRestricted(string q)
 {
     var manualAssignementView = new manualAssignementViewModel();
     List<contains_search_geoNamesRestricted_Result> list1 = (db.contains_search_geoNamesRestricted("\""+ q +"\"")).ToList();
     List<contains_search_alternateNames3Join_Result> list2 = (db.contains_search_alternateNames3Join("\""+ q +"\"")).ToList();
     manualAssignementView.containsSearchGeoNamesRestricted = list1;
     manualAssignementView.containsSearchAlternateNames3 = list2;
     return this.PartialView(manualAssignementView);
 }
コード例 #3
0
        // GET: /manualAssignment/
        public ActionResult Index()
        {
            List<get_tweetRandomSample2_notProcessed_Result> tweetRandomSampleList = db.get_tweetRandomSample2_notProcessed().ToList();
            var manualAssignementView = new manualAssignementViewModel();
            List<contains_search_geoNamesRestricted_Result> list1 = (db.contains_search_geoNamesRestricted("\"" + tweetRandomSampleList.First().userlocation + "\"")).ToList();
            List<contains_search_alternateNames3Join_Result> list2 = (db.contains_search_alternateNames3Join("\"" + tweetRandomSampleList.First().userlocation + "\"")).ToList();
            manualAssignementView.containsSearchGeoNamesRestricted = list1;
            manualAssignementView.containsSearchAlternateNames3 = list2;

            manualAssignementView.tweetRandomSample2 = tweetRandomSampleList;

            return View(manualAssignementView);
        }