/// <summary> /// Returns a list of all of the distinct total costs for an invoice in the database /// </summary> /// <returns>List total costs</returns> public List <String> GetTotalCost() { List <String> result = new List <String>(); try { int iRet = 0; DataSet ds = dataAccess.ExecuteSQLStatement(sql.SelectAllInvoiceTotalCost(), ref iRet); for (int i = 0; i < iRet; ++i) { result.Add(ds.Tables[0].Rows[i][0].ToString()); } } catch (Exception ex) { //Just throw the exception throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } return(result); }