/// <summary> /// 单位表插入数据 /// </summary> /// <param name="ds"></param> public void Insert(DataTable unitTable) { using (PersistentManager pm = new PersistentManager()) { DownUnitDao dao = new DownUnitDao(); dao.InsertUnit(unitTable); } }
/// <summary> /// 把单位数据添加到数据库 /// </summary> /// <param name="ds"></param> public void Insert(DataSet unitCodeDs) { using (PersistentManager pm = new PersistentManager()) { DownUnitDao dao = new DownUnitDao(); dao.SetPersistentManager(pm); if (unitCodeDs.Tables["WMS_UNIT_INSERT"].Rows.Count > 0) { dao.InsertUnit(unitCodeDs.Tables["WMS_UNIT_INSERT"]); } } }
/// <summary> /// 把单位数据添加到数据库 /// </summary> /// <param name="ds"></param> public void Insert(DataSet unitds, DataSet productds) { using (PersistentManager pm = new PersistentManager()) { DownUnitDao dao = new DownUnitDao(); dao.SetPersistentManager(pm); if (unitds.Tables["WMS_UNIT_INSERT"].Rows.Count > 0) { dao.InsertUnit(unitds); } if (productds.Tables["WMS_UNIT_PRODUCT"].Rows.Count > 0) { dao.InsertUnitProduct(productds); } } }