コード例 #1
0
        /// <summary>
        ///     Update an existing row in the datasource.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="entity">Nettiers.AdventureWorks.Entities.Address object to update.</param>
        /// <remarks></remarks>
        /// <returns>Returns true if operation is successful.</returns>
        public override bool Update(TransactionManager transactionManager, Nettiers.AdventureWorks.Entities.Address entity)
        {
            WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWorksServices();
            proxy.Url = Url;

            try
            {
                WsProxy.Address result = proxy.AddressProvider_Update(Convert(entity));
                Convert(entity, result);
                entity.AcceptChanges();
                return(true);
            }
            catch (SoapException soex)
            {
                System.Diagnostics.Debug.WriteLine(soex);
                throw soex;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                throw ex;
            }
        }
コード例 #2
0
		/// <summary>
		/// 	Update an existing row in the datasource.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="entity">Nettiers.AdventureWorks.Entities.Address object to update.</param>		
		/// <remarks></remarks>
		/// <returns>Returns true if operation is successful.</returns>
		public override bool Update(TransactionManager transactionManager, Nettiers.AdventureWorks.Entities.Address entity)
		{
			WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWorksServices();
			proxy.Url = Url;
			
			try
			{
				WsProxy.Address result = proxy.AddressProvider_Update(Convert(entity));
				Convert(entity, result);
				entity.AcceptChanges();
				return true;
			}
			catch(SoapException soex)
			{
				System.Diagnostics.Debug.WriteLine(soex);
				throw soex;
			}
			catch(Exception ex)
			{
				System.Diagnostics.Debug.WriteLine(ex);
				throw ex;
			}
		}