using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections; using System.Data; using WdtUtils; namespace TempDbToWang { /// /// 中间库上传旺店通基类 /// public abstract class BaseUpload : IUploadToWang { #region 变量定义 protected DataTable _data = new DataTable(); #endregion /// /// 上传数据至旺店通 /// /// public void UploadToWang(Hashtable args) { _PrepareData(args); foreach (DataRow item in _data.Rows) { _WriteLog(_Upload(item),item); } } /// /// 数据准备 /// /// protected abstract void _PrepareData(Hashtable args); /// /// 导入单据 /// /// /// protected abstract AddResult _Upload(DataRow dr); /// /// 写日志 /// /// /// protected abstract void _WriteLog(AddResult result,DataRow dr); protected abstract string _GetData(DataRow dr); } }