static void Main(string[] args) { Console.WriteLine("***** Fun with Strongly Typed DataSets *****\n"); // Caller creates the DataSet object. AutoLotDataSet.InventoryDataTable table = new AutoLotDataSet.InventoryDataTable(); // Inform adapter of the Select command text and connection. InventoryTableAdapter dAdapt = new InventoryTableAdapter(); // Fill our DataSet with a new table, named Inventory. dAdapt.Fill(table); PrintInventory(table); Console.WriteLine(); // Add rows, update and reprint. AddRecords(table, dAdapt); table.Clear(); dAdapt.Fill(table); PrintInventory(table); Console.WriteLine(); // Remove rows we just made and reprint. RemoveRecords(table, dAdapt); table.Clear(); dAdapt.Fill(table); PrintInventory(table); Console.WriteLine(); CallStoredProc(); Console.ReadLine(); }
static void Main(string[] args) { WriteLine("***** Fun with Strongly Typed DataSets *****\n"); // Caller creates the DataSet object. var table = new AutoLotDataSet.InventoryDataTable(); // Inform adapter of the Select command text and connection. var adapter = new InventoryTableAdapter(); // Fill our DataSet with a new table, named Inventory. adapter.Fill(table); PrintInventory(table); WriteLine(); // Add rows, update and reprint. AddRecords(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); WriteLine(); // Remove rows we just made and reprint. RemoveRecords(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); WriteLine(); CallStoredProc(); ReadLine(); }
static void Main(string[] args) { Console.WriteLine("***** Fun with Strongly Typed DataSets *****\n"); AutoLotDataSet.InventoryDataTable table = new AutoLotDataSet.InventoryDataTable(); InventoryTableAdapter dAdapt = new InventoryTableAdapter(); dAdapt.Fill(table); PrintInventory(table); // 添加行,更新病再次打印 AddRecords(table, dAdapt); table.Clear(); dAdapt.Fill(table); PrintInventory(table); RemoveRecords(table, dAdapt); table.Clear(); dAdapt.Fill(table); PrintInventory(table); CallStoredProc(); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("***** Fun with Strongly Typed DataSets *****\n"); AutoLotDataSet.InventoryDataTable table = new AutoLotDataSet.InventoryDataTable(); InventoryTableAdapter dAdapt = new InventoryTableAdapter(); dAdapt.Fill(table); PrintInventory(table); // Добавить строки, обновить и вывести повторно AddRecords(table, dAdapt); table.Clear(); dAdapt.Fill(table); PrintInventory(table); // Удалить строки, обновить и вывести повторно RemoveRecords(table, dAdapt); table.Clear(); dAdapt.Fill(table); PrintInventory(table); CallStoredProc(); Console.ReadLine(); }
static void Main(string[] args) { AutoLotDataSet.InventoryDataTable table = new AutoLotDataSet.InventoryDataTable(); InventoryTableAdapter adapter = new InventoryTableAdapter(); AddRecords(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); Console.ReadLine(); }
private static void AddRows() { ForegroundColor = ConsoleColor.Cyan; WriteLine("=> Add Two Rows Using AutoLogDAL library version 3"); var table = new AutoLotDataSet.InventoryDataTable(); var adapter = new InventoryTableAdapter(); adapter.Fill(table); AddRecords(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); }
private static void DelRows() { ForegroundColor = ConsoleColor.DarkYellow; WriteLine("=> Delete Records Using AutoLogDAL library"); var table = new AutoLotDataSet.InventoryDataTable(); var adapter = new InventoryTableAdapter(); adapter.Fill(table); DelRecords(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); }
static void Main(string[] args) { AutoLotDataSet.InventoryDataTable table = new AutoLotDataSet.InventoryDataTable(); InventoryTableAdapter dAdapt = new InventoryTableAdapter(); AddRecords(table, dAdapt); table.Clear(); dAdapt.Fill(table); RemoveRecords(table, dAdapt); PrintInventory(table); CallStoreProc(); Console.ReadLine(); }
static void Main(string[] args) { WriteLine("***** Fun with Strongly Typed DataSets *****\n"); //Caller creates the Dataset object var table = new AutoLotDataSet.InventoryDataTable(); //Inform adapter of the Select command text and connection var adapter = new InventoryTableAdapter(); AddRecords(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); ReadLine(); }
private static void Main(string[] args) { Console.WriteLine("***** Fun with Strongly Typed DataSets *****\n"); var table = new AutoLotDataSet.InventoryDataTable(); var adapter = new InventoryTableAdapter(); AddRecords(table, adapter); RemoveRecords(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); CallStoredProc(); PrintDataWithIndexers(table); PrintDataWithDataTableReader(table); AddRowWithTypedDataSet(); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("**** Fun with Strongly Typed DataSets ****\n"); //CAller create the dataset object var table = new AutoLotDataSet.InventoryDataTable(); //Inform a dapter of the SELECT command text connection var adapter = new InventoryTableAdapter(); //Fill our dataset with a new table, named inventory adapter.Fill(table); PrintInventory(table); //Add rows, update and reprint AddRecord(table, adapter); table.Clear(); adapter.Fill(table); PrintInventory(table); Console.ReadLine(); }