You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using NFine.Code; using NFine.Domain.Entity.SystemSecurity; using NFine.Domain.IRepository.SystemSecurity; using NFine.Repository.SystemSecurity; using System.Collections.Generic; using System.Linq;
namespace NFine.Application.SystemSecurity { public class FilterIPApp { private IFilterIPRepository service = new FilterIPRepository();
public List<FilterIPEntity> GetList(string keyword) { var expression = ExtLinq.True<FilterIPEntity>(); if (!string.IsNullOrEmpty(keyword)) { expression = expression.And(t => t.F_StartIP.Contains(keyword)); } return service.IQueryable(expression).OrderByDescending(t => t.F_DeleteTime).ToList(); }
public FilterIPEntity GetForm(string keyValue) { return service.FindEntity(keyValue); }
public void DeleteForm(string keyValue) { service.Delete(t => t.F_Id == keyValue); }
public void SubmitForm(FilterIPEntity filterIPEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { filterIPEntity.Modify(keyValue); service.Update(filterIPEntity); } else { filterIPEntity.Create(); service.Insert(filterIPEntity); } } } }
|