Beispiel #1
0
        /// <summary>
        /// 根据综合条件读取客户总产值明细数据
        /// </summary>
        /// <param name="strStartTime"></param>
        /// <param name="strEndTime"></param>
        /// <param name="strCustomerName"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List<CustomerTotalOutputDetail> LoadCustomerTotalOutputDetailsByConditions(string strStartTime, string strEndTime, string strCustomerName, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List<CustomerTotalOutputDetail> dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (StatisticsDAO dao = new StatisticsDAO())
                    {
                        dataResult = dao.LoadCustomerTotalOutputDetailsByConditions(strStartTime, strEndTime, strCustomerName, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return dataResult;
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return null;
            }
        }
Beispiel #2
0
 /// <summary>
 /// 在送货单退回调度之前进行检查
 /// </summary>
 /// <param name="nDeliverBillId"></param>
 /// <param name="nOpStaffId"></param>
 /// <param name="strOpStaffName"></param>
 /// <param name="strErrText"></param>
 /// <returns></returns>
 public bool CheckForReturnDispatch(long nDeliverBillId, long nOpStaffId, string strOpStaffName, out string strErrText)
 {
     try
     {
         using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
         {
             using (StatisticsDAO dao = new StatisticsDAO())
             {
                 if (!dao.CheckForReturnDispatch(nDeliverBillId, nOpStaffId, strOpStaffName, out strErrText))
                 {
                     return false;
                 }
             }
             transScope.Complete();
         }
         return true;
     }
     catch (Exception e)
     {
         strErrText = e.Message;
         return false;
     }
 }