/// <summary> /// 读取所有货物类别 /// </summary> /// <param name="nOpStaffId">操作员工编码</param> /// <param name="strOpStaffName">操作员工姓名</param> /// <param name="strErrText">出错信息</param> /// <returns></returns> public List<GoodsType> LoadGoodsTypes(long nOpStaffId, string strOpStaffName, out string strErrText) { try { List<GoodsType> dsRet = null; using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0))) { using (DDDAO dao = new DDDAO()) { dsRet = dao.LoadGoodsTypes(nOpStaffId, strOpStaffName, out strErrText); if (dsRet == null) return null; } transScope.Complete(); } return dsRet; } catch (Exception e) { strErrText = e.Message; return null; } }