/// <summary>
        /// 确认或者取消电子面单
        /// </summary>
        /// <param name="stockOut">出库单</param>
        /// <param name="actionType">电子面单操作类型</param>
        /// <param name="userid">用户编号</param>
        /// <remarks>2015-10-8 杨浩 创建</remarks>
        public bool ConfirmElectronicWayBill(WhStockOut stockOut, LogisticsStatus.电子面单操作类型 actionType, int userid)
        {
            //UpdateStatus(stockOut.SysNo, actionType == LogisticsStatus.电子面单操作类型.取消订单 ? LogisticsStatus.电子面单状态.作废 : LogisticsStatus.电子面单状态.已确认, userid);//更新本地数据库中的电子面单状态
            //var response =  LgBestExpressSurfaceBillServiceBo.Instance.UpdateBill(stockOut, actionType);
            //if (response.IsSuccess)
            //{
            //    if (response.ExpressOrderResult.OrderStatus == "ACCEPT")//接单成功
            //    {
            //        return true;
            //    }
            //    var firstOrDefault = response.ExpressOrderResult.Errors.ErrorList.FirstOrDefault();
            //    if (firstOrDefault != null && actionType != LogisticsStatus.电子面单操作类型.取消订单)
            //    {
            //        throw new HytException(firstOrDefault.ErrorDescription);//接单失败
            //    }
            //    else
            //    {
            //        return false;
            //    }
            //}

            //else
            //{
            //    var error = response.ExpressOrderResult.Errors.ErrorList.FirstOrDefault();
            //    if (error != null)
            //    {
            //        SysLog.Instance.WriteLog(LogStatus.SysLogLevel.Error, LogStatus.系统日志来源.后台,
            //            " 确认或取消百世汇通电子面单未成功,出库单号:" + response.ExpressOrderResult.CustomerOrderCode + "错误编号:" + error.ErrorCode + "错误描述:" + error.ErrorDescription,
            //            LogStatus.系统日志目标类型.出库单, stockOut.SysNo, null, string.Empty, userid);
            //        if (actionType != LogisticsStatus.电子面单操作类型.取消订单)
            //        {
            //            throw new HytException(error.ErrorCode);
            //        }
            //        else
            //        {
            //            return false;
            //        }
            //    }
            //    if (actionType != LogisticsStatus.电子面单操作类型.取消订单)
            //    {
            //        throw new HytException(response.ExpressOrderXmlResult);
            //    }
            //    else
            //    {
            //        return false;
            //    }
            //}
            return(true);
        }
        /// <summary>
        /// 确认或者取消电子面单
        /// </summary>
        /// <param name="stockOutsysno">出库单编号</param>
        /// <param name="actionType">电子面单操作类型</param>
        /// <param name="userid">用户编号</param>
        /// <remarks>2015-10-8 杨浩 创建</remarks>
        public bool UpdateElectronicWayBill(int stockOutsysno, LogisticsStatus.电子面单操作类型 actionType, int userid)
        {
            var stockOut = Hyt.BLL.Warehouse.WhWarehouseBo.Instance.Get(stockOutsysno);                             //出库单

            if (stockOut != null && stockOut.DeliveryTypeSysNo == Hyt.Model.SystemPredefined.DeliveryType.百世汇通电子面单) //百事汇通
            {
                if (actionType == LogisticsStatus.电子面单操作类型.取消订单)
                {
                    var electronModel = LgElectronicWayBillBo.Instance.GetElectronicWayBillByStockOutSysNo(stockOutsysno);//获取电子面单
                    if (electronModel == null)
                    {
                        return(false);
                    }
                }
                return(ConfirmElectronicWayBill(stockOut, actionType, userid));//确认或者取消电子面单
            }
            return(false);
        }