Exemplo n.º 1
0
 public object Search(string q)
 {
     try
     {
         return(MotorTariffMdl.search_motortariffs(q));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Exemplo n.º 2
0
 public object lov()
 {
     try
     {
         return(MotorTariffMdl.get_lov_motor_risks());
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Exemplo n.º 3
0
 //GET: api/Premium tariff/
 public dynamic Get(string code)
 {
     try
     {
         return(MotorTariffMdl.get_motortariff(code));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Exemplo n.º 4
0
 public object Check(string code)
 {
     try
     {
         var result = MotorTariffMdl.get_motorprod(code);
         return(result != null ? (object)new { state = true, name = result.MTP_PRD_CODE } : new { state = false });
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Exemplo n.º 5
0
 public object Save([FromBody] MS_MOTOR_PROD motortariff)
 {
     try
     {
         MotorTariffMdl.save_motortariff(motortariff);
         return(new { state = true, message = "Motor Tariff successfully Saved" });
     }
     catch (Exception e)
     {
         return(new { state = false, message = e });
     }
 }