Example #1
0
        public Response <IEnumerable <PodAll> > GetNikeExportPodAllByCondition(GetNikeExportPodAllByConditionRequest request)
        {
            Response <IEnumerable <PodAll> > response = new Response <IEnumerable <PodAll> >();

            if (request == null)
            {
                ArgumentNullException ex = new ArgumentNullException("GetNikeExportPodAllByCondition request");
                LogError(ex);
                response.ErrorCode = ErrorCode.Argument;
                response.Exception = ex;
                return(response);
            }

            try
            {
                NikeAccessor accessor = new NikeAccessor();
                response.Result    = accessor.GetNikeExportPodAllByCondition(request.Condition);
                response.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
            }

            return(response);
        }
Example #2
0
        public string CancelNikePodForBS(NikePODForBSRequest request)
        {
            Response <NikePODForBSResponses> response = new Response <NikePODForBSResponses>()
            {
                Result = new NikePODForBSResponses()
            };
            string str = "";

            try
            {
                NikeAccessor accessor = new NikeAccessor();
                int          RowCount = 0;
                str = accessor.CancelNikePodForBS(request.PodCollection);//, request.PageIndex, request.PageSize,out RowCount

                response.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
                response.Exception = ex;
            }
            return(str);
        }
Example #3
0
        /// <summary>
        /// 获取Nike导出报表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public Response <DataTable> GetNikeReportExprot(GetNikeReportExportRequest request)
        {
            Response <DataTable> response = new Response <DataTable>()
            {
                Result = new GetNikeReportExportRequest().NikeReport
            };

            if (request == null)
            {
                ArgumentNullException ex = new ArgumentNullException("GetNikeReportExport request");
                LogError(ex);
                response.ErrorCode = ErrorCode.Argument;
                response.Exception = ex;
                return(response);
            }

            try
            {
                NikeAccessor Accessor = new NikeAccessor();

                response.Result    = Accessor.GetNikeReportExprot(request.SqlWhere, request.ReportName);
                response.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.Exception = ex;
                response.ErrorCode = ErrorCode.Technical;
            }

            return(response);
        }
Example #4
0
        public Response <NikePODForBSResponses> GetNikePOD(NikePODForBSRequest request)
        {
            Response <NikePODForBSResponses> response = new Response <NikePODForBSResponses>()
            {
                Result = new NikePODForBSResponses()
            };

            try
            {
                NikeAccessor accessor = new NikeAccessor();
                int          Rowcount = 0;
                response.Result.PodCollection = accessor.GetNikePOD(request.Condition, request.PageIndex, request.PageSize, out Rowcount);//
                response.Result.PageIndex     = request.PageIndex;
                response.Result.PageCount     = Rowcount % request.PageSize == 0 ? Rowcount / request.PageSize : Rowcount / request.PageSize + 1;
                response.Result.RowCount      = Rowcount;
                response.IsSuccess            = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
                response.Exception = ex;
            }
            return(response);
        }
Example #5
0
        /// <summary>
        /// 箱数件数同步
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public Response <UpdateNikePodBGAndGetTheDifferenceResponse> UpdateNikePodBGAndGetTheDifference(UpdateNikePodBGAndGetTheDifferenceRequest request)
        {
            Response <UpdateNikePodBGAndGetTheDifferenceResponse> response = new Response <UpdateNikePodBGAndGetTheDifferenceResponse>()
            {
                Result = new UpdateNikePodBGAndGetTheDifferenceResponse()
            };

            if (request == null || request.Pods == null || !request.Pods.Any())
            {
                ArgumentNullException ex = new ArgumentNullException("UpdateNikePodAndGetTheDifference request Pods");
                LogError(ex);
                response.ErrorCode = ErrorCode.Argument;
                response.Exception = ex;
                return(response);
            }

            try
            {
                NikeAccessor accessor = new NikeAccessor();

                response.Result = accessor.UpdateNikePodBGAndGetTheDifference(request.Pods);

                response.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
                response.Exception = ex;
            }

            return(response);
        }
Example #6
0
        public Response <GetNikeReportExportRequest> GetNikeReportQutry(GetNikeReportExportRequest request)
        {
            Response <GetNikeReportExportRequest> response = new Response <GetNikeReportExportRequest>()
            {
                Result = new GetNikeReportExportRequest()
            };

            if (request == null)
            {
                ArgumentNullException ex = new ArgumentNullException("GetNikeReportQutry request");
                LogError(ex);
                response.ErrorCode = ErrorCode.Argument;
                response.Exception = ex;
                return(response);
            }

            try
            {
                NikeAccessor accessor = new NikeAccessor();
                int          Rowcount;
                response.Result.NikeReport = accessor.GetNikeReportQuery(request.SqlWhere, request.ReportName, request.PageIndex, request.PageSize, out Rowcount);
                response.Result.PageIndex  = request.PageIndex;
                response.Result.PageCount  = Rowcount % request.PageSize == 0 ? Rowcount / request.PageSize : Rowcount / request.PageSize + 1;
                response.Result.RowCount   = Rowcount;
                response.IsSuccess         = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
                response.Exception = ex;
            }

            return(response);
        }