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.SystemManage; using NFine.Domain.IRepository.SystemManage; using NFine.Repository.SystemManage; using System.Collections.Generic; using System.Linq;
namespace NFine.Application.SystemManage { public class ItemsDetailApp { private IItemsDetailRepository service = new ItemsDetailRepository();
public List<ItemsDetailEntity> GetList(string itemId = "", string keyword = "") { var expression = ExtLinq.True<ItemsDetailEntity>(); if (!string.IsNullOrEmpty(itemId)) { expression = expression.And(t => t.F_ItemId == itemId); } if (!string.IsNullOrEmpty(keyword)) { expression = expression.And(t => t.F_ItemName.Contains(keyword)); expression = expression.Or(t => t.F_ItemCode.Contains(keyword)); } return service.IQueryable(expression).OrderBy(t => t.F_SortCode).ToList(); }
public List<ItemsDetailEntity> GetItemList(string enCode) { return service.GetItemList(enCode); }
public List<ItemsDetailEntity> GetItemListWH(string itemID) { var expression = ExtLinq.True<ItemsDetailEntity>(); if (!string.IsNullOrEmpty(itemID)) { expression = expression.And(t => t.F_ItemId == itemID); } return service.IQueryable(expression).OrderBy(t => t.F_SortCode).ToList(); }
public ItemsDetailEntity GetForm(string keyValue) { return service.FindEntity(keyValue); }
public void DeleteForm(string keyValue) { service.Delete(t => t.F_Id == keyValue); }
public void SubmitForm(ItemsDetailEntity itemsDetailEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { itemsDetailEntity.Modify(keyValue); service.Update(itemsDetailEntity); } else { itemsDetailEntity.Create(); service.Insert(itemsDetailEntity); } } } }
|