Example #1
0
 public async Task <JsonResult> WebInsert(string name, string description)
 {
     try {
         var id = Guid.NewGuid();
         if (StatusTypeReferenceService.Insert(id, name, description))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtility.ServerError()));
     } catch { return(Failed(MessageUtility.ServerError())); }
 }
Example #2
0
 public async Task <JsonResult> Insert()
 {
     try {
         var id          = Guid.NewGuid();
         var name        = Request.Form["name"];
         var description = Request.Form["desc"];
         if (StatusTypeReferenceService.Insert(id, name, description))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtility.ServerError()));
     } catch { return(Failed(MessageUtility.ServerError())); }
 }