public ActionResult AddItem(string groupID, string title, string method, string url, string header, string json) { var result = "0"; if (!string.IsNullOrWhiteSpace(groupID) && !string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(method) && !string.IsNullOrWhiteSpace(url)) { title = HttpUtility.UrlDecode(title); url = HttpUtility.UrlDecode(url); if (title.Length <= 15 && url.Length <= 2083) { if (!string.IsNullOrWhiteSpace(header)) { header = HttpUtility.UrlDecode(header); } if (!string.IsNullOrWhiteSpace(json)) { json = HttpUtility.UrlDecode(json); } RecordDataHelper.AddItem(groupID, title, method, url, header, json); result = "1"; } } return(Content(result)); }
public ActionResult GetList() { string groupID = string.Empty; HttpContext.Current.Request.Parmas.TryGetValue("groupID", out groupID); return(Content(RecordDataHelper.GetRightList(groupID))); }
public ActionResult RemoveGroup(string groupID) { var result = "0"; if (!string.IsNullOrWhiteSpace(groupID)) { RecordDataHelper.RemoveGroup(groupID); result = "1"; } return(Content(result)); }
public ActionResult AddGroup(string groupName) { var result = "0"; if (!string.IsNullOrWhiteSpace(groupName)) { RecordDataHelper.AddGroup(groupName); result = "1"; } return(Content(result)); }
public ActionResult UpdateGroup(string groupID, string groupName) { var result = "0"; if (!string.IsNullOrWhiteSpace(groupID) && !string.IsNullOrWhiteSpace(groupName)) { groupName = SAEA.Http.HttpUtility.UrlDecode(groupName); RecordDataHelper.UpdateGroup(groupID, groupName); result = "1"; } return(Content(result)); }
public ActionResult GetItem(string groupID, string itemID) { ListItem listItem = new ListItem(); if (!string.IsNullOrWhiteSpace(groupID) && !string.IsNullOrWhiteSpace(itemID)) { listItem = RecordDataHelper.GetItem(groupID, itemID); } if (listItem == null) { return(Content(string.Empty)); } return(Json(listItem)); }
public ActionResult AddGroup(string groupName) { var result = "0"; if (!string.IsNullOrWhiteSpace(groupName)) { groupName = HttpUtility.UrlDecode(groupName); if (groupName.Length <= 13) { RecordDataHelper.AddGroup(groupName); } result = "1"; } return(Content(result)); }
public ActionResult AddItem(string groupID, string title, string method, string url, string json) { var result = "0"; if (!string.IsNullOrWhiteSpace(groupID) && !string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(method) && !string.IsNullOrWhiteSpace(url)) { title = SAEA.Http.HttpUtility.UrlDecode(title); url = SAEA.Http.HttpUtility.UrlDecode(url); if (!string.IsNullOrWhiteSpace(json)) { json = SAEA.Http.HttpUtility.UrlDecode(json); } RecordDataHelper.AddItem(groupID, title, method, url, json); result = "1"; } return(Content(result)); }
public ActionResult Import(string json) { var result = "0"; try { if (!string.IsNullOrWhiteSpace(json)) { json = SAEA.Http.HttpUtility.UrlDecode(json); var rd = Deserialize <RecordData>(json); if (rd != null) { RecordDataHelper.Write(rd); result = "1"; } } } catch { } return(Content(result)); }
public ActionResult GetGroups() { return(Content(RecordDataHelper.GetGroups())); }
public ActionResult Export() { return(Json(RecordDataHelper.Read())); }
public ActionResult Search(string keywords) { return(Content(RecordDataHelper.Search(keywords))); }