コード例 #1
0
        //打印补货单
        public Response <GetReplenishmentAndReplenishmentDetailsResponse> PrintReplishmentYFBLD(string rsid)
        {
            Response <GetReplenishmentAndReplenishmentDetailsResponse> response = new Response <GetReplenishmentAndReplenishmentDetailsResponse>()
            {
                Result = new GetReplenishmentAndReplenishmentDetailsResponse()
            };

            //if (request == null)
            //{
            //    ArgumentNullException ex = new ArgumentNullException("AddReceiptAndReceiptDetail request");
            //    LogError(ex);
            //    response.ErrorCode = ErrorCode.Argument;
            //    response.Exception = ex;
            //    return response;
            //}
            try
            {
                ReplenishmentManagementAccessor accessor = new ReplenishmentManagementAccessor();
                response.Result    = accessor.PrintReplishmentYFBLD(rsid);
                response.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
            }
            return(response);
        }
コード例 #2
0
        //明细单条的查看或者编辑
        public Response <ReplenishmentAndReplenishmentDetail> GetReplenishmentInfos(GetReplenishmentByConditionRequest request)
        {
            Response <ReplenishmentAndReplenishmentDetail> response = new Response <ReplenishmentAndReplenishmentDetail>();

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

            try
            {
                ReplenishmentManagementAccessor accessor = new ReplenishmentManagementAccessor();
                response.Result    = accessor.GetReplenishmentInfos(request.ID);
                response.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
            }

            return(response);
        }
コード例 #3
0
        public Response <GetReplenishmentDetailByConditionResponse> GetReplenishmentByCondition(GetReplenishmentByConditionRequest request)
        {
            Response <GetReplenishmentDetailByConditionResponse> response = new Response <GetReplenishmentDetailByConditionResponse>()
            {
                Result = new GetReplenishmentDetailByConditionResponse()
            };

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

            try
            {
                ReplenishmentManagementAccessor accessor = new ReplenishmentManagementAccessor();
                int RowCount;

                response.Result           = accessor.GetReplenishmentByCondition(request.SearchCondition, request.PageIndex, request.PageSize, out RowCount);
                response.Result.PageCount = RowCount % request.PageSize == 0 ? RowCount / request.PageSize : RowCount / request.PageSize + 1;
                response.Result.PageIndex = request.PageIndex;
                response.IsSuccess        = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.Exception = ex;
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
            }
            return(response);
        }
コード例 #4
0
        public Response <ReplenishmentAndReplenishmentDetail> GenerateReplenishment(IEnumerable <ReplenishmentDetailSKUs> list, string ProjectID, string CustomerID, string CustomerName, string WarehouseID, string WarehouseName, string Remark, string Creator)
        {
            Response <ReplenishmentAndReplenishmentDetail> response = new Response <ReplenishmentAndReplenishmentDetail>();


            try
            {
                ReplenishmentManagementAccessor accessor = new ReplenishmentManagementAccessor();
                response.Result    = accessor.GenerateReplenishment(list, ProjectID, CustomerID, CustomerName, WarehouseID, WarehouseName, Remark, Creator);
                response.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
            }

            return(response);
        }