Пример #1
0
		/// <summary>
		/// Saves the transport into the database
		/// </summary>
		private bool SaveTransport( bool createEmptyTransport )
		{
			// If there no elements then dont save the object to the db
			if( !createEmptyTransport && GetNumOfElement() == 0 )
			{
				return false;
			}

			ProjectManager svc = new ProjectManager();
			RecTransport newRecTransport = svc.InsertTransport( TransportObject );
			// Use the new transport id
			TransportObject.TransportId = newRecTransport.TransportId;
			return true;
		}