Ejemplo n.º 1
0
 public object search(string query)
 {
     try
     {
         return(ClaimCatastropicEventMdl.search_catastrophys(query));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Ejemplo n.º 2
0
 public object lov()
 {
     try
     {
         return(ClaimCatastropicEventMdl.get_lov_catastrophy());
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Ejemplo n.º 3
0
 // 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 });
     }
 }
Ejemplo n.º 4
0
 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 });
     }
 }
Ejemplo n.º 5
0
        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 });
            }
        }