// GET: FW public ActionResult Index() { var listModel = FwHelper.GetList(_fireName); listModel.Remove("11.11.11.11"); return(View(listModel)); }
public ActionResult Add(string ip, string password) { if (string.IsNullOrEmpty(ip)) { return(Json(new { Success = false, Message = "IP不能为空" })); } if (string.IsNullOrEmpty(password)) { return(Json(new { Success = false, Message = "密码不能为空" })); } if (string.Compare(password, "1234abcd,", true) != 0) { return(Json(new { Success = false, Message = "密码不正确" })); } FwHelper.AddRemoteIp(_fireName, ip); return(Json(new { Success = true, Message = "成功" })); }