using EnVisage.App_Start; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace EnVisage.Controllers { [Authorize] public class ContentLockerApiController : Controller { public JsonResult AddLock(String tableId, String fieldId, string timestamp) { var response = ContentLocker.AddLock(tableId, fieldId, User.Identity.Name, timestamp); return Json(response); } public JsonResult UpdateLock(String tableId, String fieldId) { var response = ContentLocker.UpdateLock(tableId, fieldId, User.Identity.Name); return Json(response); } public JsonResult IsLock(String tableId, String fieldId) { var response = ContentLocker.IsLocked(tableId, fieldId, User.Identity.Name); return Json(response); } public JsonResult RemoveLock(String tableId, String fieldId) { var response = ContentLocker.RemoveLock(tableId, fieldId, User.Identity.Name); return Json(response); } } }