public SubBaseDal(string cnKey) { dao = new SubBaseDao(cnKey); }
public SubBaseDal() { dao = new SubBaseDao(); }
/// <summary> /// 保存子檔明細,多明細 /// </summary> /// <param name="dtSub"></param> /// <param name="oldID"></param> public void SaveDetail(DataTable[] dtSub, string oldID) { string strWhere = SysModel.strWhere; if (strWhere.Trim().Length > 0) strWhere += string.Format("And {0}='{1}'", SysModel.KeyField, oldID); else strWhere += string.Format("{0}='{1}'", SysModel.KeyField, oldID); SubBaseDao subDao = new SubBaseDao(); for (int i = 0; i < dtSub.Length; i++) subDao.Save(dtSub[i], strWhere); }
/// <summary> /// 保存子檔明細,單明細 /// </summary> /// <param name="dtSub"></param> /// <param name="oldID"></param> public void SaveDetail(DataTable dtSub, string oldID) { string strWhere = SysModel.strWhere; if (strWhere.Trim().Length > 0) strWhere += string.Format("And {0}='{1}'", SysModel.KeyField, oldID); else strWhere += string.Format("{0}='{1}'", SysModel.KeyField, oldID); SubBaseDao subDao = new SubBaseDao(cnKey); subDao.Save(dtSub, strWhere); }
/// <summary> /// 保存datatable到另一個庫 /// </summary> /// <param name="dtSub"></param> /// <param name="oldID"></param> public void SaveDbTable(DataTable dtSub, string filter) { SubBaseDao subDao = new SubBaseDao(cnKey); subDao.Save(dtSub, filter); }