Beispiel #1
0
 public object search(string query)
 {
     try
     {
         return(AreaMdl.search_areas(query));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Beispiel #2
0
 public object lov()
 {
     try
     {
         return(AreaMdl.get_lov_areas());
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Beispiel #3
0
 // GET: api/Area/5
 public dynamic Get(string code)
 {
     try
     {
         return(AreaMdl.get_area(code));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Beispiel #4
0
 public object Check(string code)
 {
     try
     {
         var result = AreaMdl.get_area(code);
         return(result != null ? (object)new { state = true, name = result.ARE_NAME } : new { state = false });
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Beispiel #5
0
        public object save([FromBody] List <MS_SYS_AREA> areas)
        {
            try
            {
                foreach (var are in areas)
                {
                    AreaMdl.save_area(are);
                }

                return(new { state = true, message = "Areas Successfully Created" });
            }
            catch (Exception e)
            {
                return(new { state = false, message = "Server Error", exception = e });
            }
        }
Beispiel #6
0
        public IEnumerable <object> getAreas(ProductsRisksCoversJSON riskJson)
        {
            var riskLst = AreaMdl.get_Area_Lov(riskJson.PRD_CODE).ToList();

            return(riskLst);
        }