Esempio n. 1
0
        /// <summary>
        /// 读取指定起点到指定收货单位的距离
        /// </summary>
        /// <param name="strReceiverName"></param>
        /// <param name="strStartCountry"></param>
        /// <param name="strStartProvince"></param>
        /// <param name="strStartCity"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public ReceiverDistance LoadReceiverDistance(string strReceiverName, string strStartCountry, string strStartProvince, string strStartCity, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                ReceiverDistance dataResult = null;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (DDDAO dao = new DDDAO())
                    {
                        dataResult = dao.LoadReceiverDistance(strReceiverName, strStartCountry, strStartProvince, strStartCity, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return dataResult;
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return null;
            }
        }