public object search(string query) { try { return(ClaimCatastropicEventMdl.search_catastrophys(query)); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }
public object lov() { try { return(ClaimCatastropicEventMdl.get_lov_catastrophy()); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }
// GET: api/ClaimCatastropicEvent/ public dynamic Get(string code) { try { return(ClaimCatastropicEventMdl.get_catastrophy(code)); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }
public object Check(string code) { try { var result = ClaimCatastropicEventMdl.get_catastrophy(code); return(result != null ? (object)new { state = true, name = result.CLM_CAT_NAME } : new { state = false }); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }
public object save([FromBody] List <MS_CLM_CAT_EVENT> cats) { try { foreach (var cty in cats) { ClaimCatastropicEventMdl.save_catastrophy(cty); } return(new { state = true, message = "Catastrophy Successfully Created" }); } catch (Exception e) { return(new { state = false, message = "Server Error", exception = e }); } }