BaseTrans.cs 650 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Collections;
  7. using cuidian.Sql;
  8. namespace UfidaToTempDb
  9. {
  10. public abstract class BaseTrans
  11. {
  12. protected string _sql;
  13. public BaseTrans()
  14. {
  15. _Init();
  16. }
  17. protected virtual void _Init()
  18. { }
  19. public void TransData(Hashtable args)
  20. {
  21. string sql = _BuildSql(args);
  22. DbUtils.ExecuteNonQuery(sql, ConnectionUtils.Instance.GetConnection());
  23. }
  24. protected abstract string _BuildSql(Hashtable args);
  25. }
  26. }