Пример #1
0
        /// <summary>
        /// 新增仓储力支费结算数据
        /// </summary>
        /// <param name="data"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public long InsertCustomerStorageAndForceFeeSettlement(CustomerStorageAndForceFeeSettlement data, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            long nId = 0;

            try
            {
                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (StockDAO dao = new StockDAO())
                    {
                        nId = dao.InsertCustomerStorageAndForceFeeSettlement(data, nOpStaffId, strOpStaffName, out strErrText);
                        if (nId <= 0)
                            return 0;
                    }
                    transScope.Complete();
                }
                return nId;
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return 0;
            }
        }