using NFine.Code; using NFine.Data; using NFine.Domain.Entity.SystemManage; using NFine.Domain.IRepository.SystemManage; using NFine.Repository.SystemManage; namespace NFine.Repository.SystemManage { public class CustomerRepository : RepositoryBase, ICustomerRepository { public void DeleteForm(string keyValue) { using (var db = new RepositoryBase().BeginTrans()) { db.Delete(t => t.F_Id == keyValue); db.Commit(); } } public void SubmitForm(CustomerEntity cusEntity, string keyValue) { using (var db = new RepositoryBase().BeginTrans()) { if (!string.IsNullOrEmpty(keyValue)) { db.Update(cusEntity); } else { db.Insert(cusEntity); } db.Commit(); } } } }