爱思开
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.

36 lines
1009 B

2 years ago
  1. using NFine.Code;
  2. using NFine.Data;
  3. using NFine.Domain.Entity.SystemManage;
  4. using NFine.Domain.IRepository.SystemManage;
  5. using NFine.Repository.SystemManage;
  6. namespace NFine.Repository.SystemManage
  7. {
  8. public class CustomerRepository : RepositoryBase<CustomerEntity>, ICustomerRepository
  9. {
  10. public void DeleteForm(string keyValue)
  11. {
  12. using (var db = new RepositoryBase().BeginTrans())
  13. {
  14. db.Delete<CustomerEntity>(t => t.F_Id == keyValue);
  15. db.Commit();
  16. }
  17. }
  18. public void SubmitForm(CustomerEntity cusEntity, string keyValue)
  19. {
  20. using (var db = new RepositoryBase().BeginTrans())
  21. {
  22. if (!string.IsNullOrEmpty(keyValue))
  23. {
  24. db.Update(cusEntity);
  25. }
  26. else
  27. {
  28. db.Insert(cusEntity);
  29. }
  30. db.Commit();
  31. }
  32. }
  33. }
  34. }