public DataSet ToDataSet() { //Return a dataset containing values for this object SortProfileDS ds = null; try { ds = new SortProfileDS(); SortProfileDS.SortProfileTableRow profile = ds.SortProfileTable.NewSortProfileTableRow(); profile.FreightType = this.mFreightType; profile.SortTypeID = this.mSortTypeID; profile.SortType = this.mSortType; profile.ClientNumber = this.mClientNumber; profile.ClientDivision = this.mClientDivision; if (this.mVendorNumber.Length > 0) { profile.VendorNumber = this.mVendorNumber; } profile.Status = this.mStatus; if (this.mExceptionDeliveryLocation > 0) { profile.ExceptionLocation = this.mExceptionDeliveryLocation; } if (this.mLabelID > 0) { profile.LabelID = this.mLabelID; } ds.SortProfileTable.AddSortProfileTableRow(profile); ds.Merge(this.mInboundLabel.ToDataSet()); ds.AcceptChanges(); } catch (Exception) { } return(ds); }