コード例 #1
0
 // GET: api/Country/
 public dynamic Get(string code)
 {
     try
     {
         return(FireRiskMdl.get_risk(code));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
コード例 #2
0
 public object Check(string code)
 {
     try
     {
         var result = FireRiskMdl.get_risk(code);
         return(result != null ? (object)new { state = true, name = result.FRK_NAME } : new { state = false });
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }