/// <summary> /// 读取库存盘点数据 /// </summary> /// <param name="strWarehouse"></param> /// <param name="strLocation"></param> /// <param name="nOpStaffId"></param> /// <param name="strOpStaffName"></param> /// <param name="strErrText"></param> /// <returns></returns> public List<Stock> LoadStocktakingByConditions(string strWarehouse, string strLocation, long nOpStaffId, string strOpStaffName, out string strErrText) { try { List<Stock> ret = null; using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0))) { using (StockDAO dao = new StockDAO()) { ret = dao.LoadStocktakingByConditions(strWarehouse, strLocation, nOpStaffId, strOpStaffName, out strErrText); if (ret == null) return null; } transScope.Complete(); } return ret; } catch (Exception e) { strErrText = e.Message; return null; } }