纽威
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
1.1 KiB

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