/// <summary> /// Called by <see cref="DataPortal" /> to update a /// business object. /// </summary> /// <param name="obj">The business object to update.</param> /// <param name="context"> /// <see cref="Server.DataPortalContext" /> object passed to the server. /// </param> public Server.DataPortalResult Update(object obj, Server.DataPortalContext context) { object result; Server.Hosts.WebServicePortal.UpdateRequest request = new Server.Hosts.WebServicePortal.UpdateRequest(); request.Object = obj; request.Context = context; using (WebServiceHost.WebServicePortal wsvc = GetPortal()) { result = Deserialize(wsvc.Update(Serialize(request))); } if (result is Exception) { throw (Exception)result; } return((Server.DataPortalResult)result); }
/// <summary> /// Called by <see cref="DataPortal" /> to update a /// business object. /// </summary> /// <param name="obj">The business object to update.</param> /// <param name="context"> /// <see cref="Server.DataPortalContext" /> object passed to the server. /// </param> public Server.DataPortalResult Update(object obj, Server.DataPortalContext context) { object result; Server.Hosts.WebServicePortal.UpdateRequest request = new Server.Hosts.WebServicePortal.UpdateRequest(); request.Object = obj; request.Context = context; using (WebServiceHost.WebServicePortal wsvc = GetPortal()) { result = Deserialize(wsvc.Update(Serialize(request))); } if (result is Exception) throw (Exception)result; return (Server.DataPortalResult)result; }