Example #1
0
 public object search(string query)
 {
     try
     {
         return(LocationMdl.search_locations(query));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Example #2
0
 public object lov()
 {
     try
     {
         return(LocationMdl.get_lov_location());
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Example #3
0
 // GET: api/Location/
 public dynamic Get(string code)
 {
     try
     {
         return(LocationMdl.get_location(code));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Example #4
0
 public object Check(string code)
 {
     try
     {
         var result = LocationMdl.get_location(code);
         return(result != null ? (object)new { state = true, name = result.LOC_NAME } : new { state = false });
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Example #5
0
 public object save([FromBody] List <MS_SYS_LOCATION> locations)
 {
     try
     {
         foreach (var cty in locations)
         {
             LocationMdl.save_location(cty);
         }
         return(new { state = true, message = "Locations Successfully Created" });
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Example #6
0
        public IEnumerable <object> getLocations(ProductsRisksCoversJSON riskJson)
        {
            var riskLst = LocationMdl.get_Location_Lov(riskJson.PRD_CODE).ToList();

            return(riskLst);
        }