public string SearchLocations(string id) { using (var da = new UserLocationDA()) { return(da.GetUserLocations(id).ToJSON()); } }
public string GetLocations() { using (var da = new UserLocationDA()) { return(da.GetUserLocations().ToJSON()); } }
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" })); }