Ejemplo n.º 1
0
        /// <summary>
        /// 一箱完成后更新日志表箱状态为1
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public Response <string> UpdateLogOperationPackageStatusRF(string userName, string BoxNumber)
        {
            Response <string> response = new Response <string>();
            string            message  = "";

            try
            {
                message = new LogOperationAccessor().UpdateLogOperationPackageStatusRF(userName, BoxNumber);
                if (message.Contains("更新成功"))
                {
                    response.Result    = message;
                    response.IsSuccess = true;
                }
                else
                {
                    response.Result    = message;
                    response.IsSuccess = false;
                }
                return(response);
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
                response.Result    = message + ex.Message;
            }

            return(response);
        }
Ejemplo n.º 2
0
        public Response <string> AddLogOperationRF(IEnumerable <WMS_Log_OperationRF> LogOperations)
        {
            Response <string> response = new Response <string>();
            string            message  = "";

            if (LogOperations == null || !LogOperations.Any())
            {
                ArgumentNullException ex = new ArgumentNullException("AddLogOperation request");
                LogError(ex);
                response.ErrorCode = ErrorCode.Argument;
                response.Exception = ex;
                return(response);
            }
            try
            {
                message = new LogOperationAccessor().AddLogOperationRF(LogOperations);
                if (message.Contains("添加成功"))
                {
                    response.Result    = message;
                    response.IsSuccess = true;
                }
                else
                {
                    response.Result    = message;
                    response.IsSuccess = false;
                }
                return(response);
            }
            catch (Exception ex)
            {
                LogError(ex);
                response.IsSuccess = false;
                response.ErrorCode = ErrorCode.Technical;
                response.Result    = message + ex.Message;
            }

            return(response);
        }