Example #1
0
        public Response <GetMaryKayOrderIssuedRequest> GetMaryKayGetOrderIssued(GetMaryKayOrderIssuedRequest request)
        {
            Response <GetMaryKayOrderIssuedRequest> response = new Response <GetMaryKayOrderIssuedRequest>()
            {
                Result = new GetMaryKayOrderIssuedRequest()
            };

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

            try
            {
                MaryKayAccessor accessor = new MaryKayAccessor();
                int             Rowcount;
                response.Result.OrderNoIssuedTable = accessor.GetMaryKayGetOrderIssued(request.SqlWhere, 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.IsSuccess = true;
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
                response.Exception = ex;
            }

            return(response);
        }
Example #2
0
        public Response <GetMaryKayOrderIssuedRequest> GetOrderNoIssuedInfoByID(GetMaryKayOrderIssuedRequest request)
        {
            Response <GetMaryKayOrderIssuedRequest> response = new Response <GetMaryKayOrderIssuedRequest>()
            {
                Result = new GetMaryKayOrderIssuedRequest()
            };

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

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

            return(response);
        }
Example #3
0
        public void UpdateOrderNoIsSuedStatus(GetMaryKayOrderIssuedRequest request)
        {
            if (request == null)
            {
                ArgumentNullException ex = new ArgumentNullException("UpdateOrderNoIsSuedStatus request");
                LogError(ex);
            }

            try
            {
                MaryKayAccessor accessor = new MaryKayAccessor();
                accessor.UpdateOrderNoIsSuedStatus(request.OrderNoIssuedStatus, request.ID);
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
Example #4
0
        public void AddMaryKayInterfaceLog(GetMaryKayOrderIssuedRequest request)
        {
            if (request == null)
            {
                ArgumentNullException ex = new ArgumentNullException("AddMaryKayInterfaceLog request");
                LogError(ex);
            }

            try
            {
                MaryKayAccessor accessor = new MaryKayAccessor();
                accessor.AddMaryKayInterfaceLog(request.InterfaceLog);
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }