using System; using System.Data; namespace ADOdotNET_Demos { public class cur { // Loop through DataSet and display field public static void ShowDataSet(DataSet dsArg) { for(int i=0; i < 10; i++) { DataRow dr = dsArg.Tables["MyTableName"].Rows[i]; string strField = dr.ItemArray[1].ToString(); WL("Item #1, Row[" + i.ToString() + "] = ",strField); } } public static void Title(string strItem) { Console.WriteLine("Starting: " + strItem + "..."); WL(""); AnyKey(); WL(""); } public static void Footer() { WL(""); Console.WriteLine("Execution Complete."); WL(""); AnyKey(); } public static void WL(string strItem) { Console.WriteLine(strItem); } public static void WL(string strItem, object objValue) { string strValue = (string)objValue; Console.WriteLine(strItem + ": [" + strValue + "]"); } public static void AnyKey() { WL(""); Console.Write("Press enter key to continue... "); RL(); } public static void RL(){Console.ReadLine();} public static void Wline() { string str = "--------------------------------------------"; string strOutput = str.PadRight(20).Substring(0,18) + " "; Console.Write(strOutput); } public static void Wpad(string str) { string strOutput; strOutput = str.PadRight(20).Substring(0,19) + " "; Console.Write(strOutput); } } }