Пример #1
0
 /// <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);
 }
Пример #2
0
 /// <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);
 }
Пример #3
0
 /// <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);
 }