/// <summary>
		/// Display analysis results in the list box
		/// </summary>
		public void DisplayOutput()
		{
			ITable naTable = m_NAContext.NAClasses.get_ItemByName("ODLines") as ITable;
			if (naTable == null)
				lstOutput.Items.Add("Impossible to get the ODLines table");

			lstOutput.Items.Add("Number of destinations found: " + naTable.RowCount(null).ToString());
			lstOutput.Items.Add("");

			if (naTable.RowCount(null) > 0)
			{
				lstOutput.Items.Add("OriginID, DestinationID, DestinationRank, Total_" + comboCostAttribute.Text);
				double total_impedance;
				long OriginID;
				long DestinationID;
				long DestinationRank;

				ICursor naCursor = naTable.Search(null, false);
				IRow naRow = naCursor.NextRow();
				while (naRow != null)
				{
					OriginID = long.Parse(naRow.get_Value(naTable.FindField("OriginID")).ToString());
					DestinationID = long.Parse(naRow.get_Value(naTable.FindField("DestinationID")).ToString());
					DestinationRank = long.Parse(naRow.get_Value(naTable.FindField("DestinationRank")).ToString());
					total_impedance = double.Parse(naRow.get_Value(naTable.FindField("Total_" + comboCostAttribute.Text)).ToString());
					lstOutput.Items.Add(OriginID.ToString() + ", " + DestinationID.ToString() + ", " +
						DestinationRank.ToString() + ", " + total_impedance.ToString("#0.00"));

					naRow = naCursor.NextRow();
				}
			}

			lstOutput.Refresh();
		}
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = GetType().GetHashCode();
                hash = (hash * 31) ^ OriginID.GetHashCode();
                hash = (hash * 31) ^ DestinationID.GetHashCode();

                return(hash);
            }
        }
Exemplo n.º 3
0
 protected override string[] GetContent()
 {
     return(new[]
     {
         ID.ToString(),
         CurrencyID.ToString(),
         UnitID.ToString(),
         OriginID.ToString(),
         IncotermID.ToString(),
         PlaceID.ToString()
     });
 }