using NFine.Data; using NFine.Domain.Entity.ProductManage; using NFine.Domain.IRepository.ProductManage; using NFine.Repository.ProductManage; using System.Collections.Generic; namespace NFine.Repository.ProductManage { public class DiscountRateRepository : RepositoryBase, IICSDiscountRateRepository { public void DeleteForm(string keyValue) { using (var db = new RepositoryBase().BeginTrans()) { db.Delete(t => t.F_Id == keyValue); db.Commit(); } } public void SubmitForm(ICSDiscountRateEntity dDiscountrateEntity, string keyValue) { using (var db = new RepositoryBase().BeginTrans()) { if (!string.IsNullOrEmpty(keyValue)) { db.Update(dDiscountrateEntity); } else { db.Insert(dDiscountrateEntity); } db.Commit(); } } } }