예제 #1
0
 public string SearchLocations(string id)
 {
     using (var da = new UserLocationDA())
     {
         return(da.GetUserLocations(id).ToJSON());
     }
 }
예제 #2
0
 public string GetLocations()
 {
     using (var da = new UserLocationDA())
     {
         return(da.GetUserLocations().ToJSON());
     }
 }
예제 #3
0
        public ActionResult Save(UserComment data)
        {
            if (string.IsNullOrEmpty(User.Identity.Name))
            {
                return(Json(new
                {
                    status = "fail",
                    result = "notloggedin"
                }));
            }
            data.name = User.Identity.Name;
            using (var da = new UserLocationDA())
            {
                da.InsertUserComment(data);
            }

            return(Json(new
            {
                status = "success",
                result = "Done"
            }));
        }