Example #1
0
        public ActionResult proc()
        {
            var json = new StreamReader(Request.Body).ReadToEnd();
            var item = JsonConvert.DeserializeObject <JGN_BlockIP>(json);

            if (item.id > 0)
            {
                // Update Operation
                BlockIPBLL.Update_Field_V3(_context, item.id, item.ipaddress, "ipaddress");
            }
            else
            {
                // Add Operation
                item = BlockIPBLL.Add_IP(_context, item);
            }

            return(Ok(new { status = "success", record = item, message = SiteConfig.generalLocalizer["_records_processed"].Value }));
        }