示例#1
0
        /// <summary>
        /// 读取指定客户和时间的仓储费价格数据
        /// </summary>
        /// <param name="nCustomerId"></param>
        /// <param name="dtStartTime"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public CustomerStorageFeePrice LoadCustomerStorageFeePrice(long nCustomerId, DateTime dtStartTime, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                CustomerStorageFeePrice dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (CustomerDAO dao = new CustomerDAO())
                    {
                        dataResult = dao.LoadCustomerStorageFeePrice(nCustomerId, dtStartTime, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return dataResult;
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return null;
            }
        }