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.

25 lines
922 B

1 year ago
  1. using log4net;
  2. using System.Data;
  3. namespace Repository.Coupon
  4. {
  5. public class CouponRepository : ICouponRepository
  6. {
  7. private readonly Dao _dao = new Dao();
  8. private static readonly ILog Log = LogManager.GetLogger(typeof(CouponRepository));
  9. string ICouponRepository.GetCouponDiscountValue(string schemeId, string serviceCharge)
  10. {
  11. // 동대문 코드 1034
  12. var sql = "EXEC proc_CouponOperation @flag='SearchCoupon'";
  13. sql += " ,@schemeId=" + _dao.FilterString(schemeId);
  14. sql += " ,@serviceCharge=" + _dao.FilterString(serviceCharge);
  15. var dbdataset = _dao.ExecuteDataset(sql);
  16. string discountValue = null;
  17. foreach (DataRow row in dbdataset.Tables[0].Rows)
  18. {
  19. discountValue = row["discountValue"].ToString();
  20. }
  21. return discountValue;
  22. }
  23. }
  24. }