Beispiel #1
0
        /// <summary>
        /// Persist changes to the product object
        /// </summary>
        /// <param name="productlist"></param>
        /// <param name="auditUserId"></param>
        /// <param name="auditWorkstation"></param>
        /// <returns></returns>
        internal Response <long> InsertProduct(ProductResult productResult, int language, long auditUserId, string auditWorkstation)
        {
            try
            {
                long   productId;
                string responseMessage;
                if (_cardManService.InsertProduct(productResult, language, auditUserId, auditWorkstation, out productId, out responseMessage))
                {
                    return(new Response <long>(productId, ResponseType.SUCCESSFUL, responseMessage, ""));
                }

                return(new Response <long>(productId, ResponseType.UNSUCCESSFUL, responseMessage, responseMessage));
            }
            catch (Exception ex)
            {
                log.Error(ex);
                return(new Response <long>(0,
                                           ResponseType.ERROR,
                                           "Error when processing request.",
                                           log.IsDebugEnabled || log.IsTraceEnabled ? ex.Message : ""));
            }
        }