protected void btn_add_Click(object sender, System.EventArgs e)
 {
     BlockIPBLL.Add_IP(txt_value.Text.Trim());
     ShowMessage("IP address has been blocked");
     txt_value.Text = "";
     BindList();
 }
示例#2
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 }));
        }