Ejemplo n.º 1
0
        /// <summary>
        /// 根据综合条件读取出仓单数据
        /// </summary>
        /// <param name="strStartTime"></param>
        /// <param name="strEndTime"></param>
        /// <param name="strShipmentBillNo"></param>
        /// <param name="strCustomerName"></param>
        /// <param name="strCarNo"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List <ShipmentBill> LoadShipmentBillsByConditions(string strStartTime, string strEndTime, string strShipmentBillNo, string strCustomerName, string strCarNo, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List <ShipmentBill> dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (DeliverDAO dao = new DeliverDAO())
                    {
                        dataResult = dao.LoadShipmentBillsByConditions(strStartTime, strEndTime, strShipmentBillNo, strCustomerName, strCarNo, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return(dataResult);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(null);
            }
        }