public async Task <JsonResult> Insert() { try { var id = Guid.NewGuid(); var name = Request.Form["name"]; var api = Guid.Parse(Request.Form["api"]); if (MessagingRoomService.Insert(id, name, api, DateTime.Now)) { return(Success(id.ToString())); } return(Failed(MessageUtility.ServerError())); } catch { return(Failed(MessageUtility.ServerError())); } }
public async Task <JsonResult> MRInsert() { try { var id = Guid.Parse(Request.Form["id"]); var name = Request.Form["name"]; var oid = Guid.Parse(Request.Form["oid"]); var aid = Guid.Parse(Request.Form["aid"]); var dtid = Guid.Parse(Request.Form["dtid"]); var ia = Boolean.Parse(Request.Form["ia"]); if (MessagingRoomService.Insert(id, name, oid, aid, dtid, ia)) { return(Success(id.ToString())); } return(Failed(MessageUtilityService.FailedInsert("Room"))); } catch { return(Failed(MessageUtilityService.ServerError())); } }