Ejemplo n.º 1
0
        public TransactionStatusModel UpdateProduct(ProductDTO product)
        {
            TransactionStatusModel transStatus = new TransactionStatusModel();
            ProjectDataService     dataService = new ProjectDataService();

            using (TransactionScope tran = new TransactionScope())
            {
                try
                {
                    transStatus = dataService.UpdateProduct(product);
                }
                catch (Exception ex)
                {
                    transStatus.ReturnStatus = false;
                    transStatus.ReturnMessage.Add("Update Product Failed");
                    return(transStatus);
                }

                tran.Complete();
            }

            return(transStatus);
        }