public void FillRepairsDataTable(Repair reparatie) { DataSetCreator d = new DataSetCreator(); DataSet q = d.CreateSchema(); DataTable tabel = q.Tables["Repairs"]; tabel.Rows.Add(reparatie); }
public void FillVehiclesDataTable(Car masina) { DataSetCreator d = new DataSetCreator(); DataSet q = d.CreateSchema(); DataTable tabel = q.Tables["Vehicles"]; tabel.Rows.Add(masina); }
static void Main(string[] args) { Car car = new Car("viiin", "bmw", "320", 1999, "PH-10-BMW ca toti taranii"); Repair repar = new Repair("viiin", "busita rau", 10000); DataSetCreator dsc = new DataSetCreator(); dsc.FillVehiclesDataTable(car); dsc.PrintVehiclesDataTable(); // Console.WriteLine(aa.GetXml()); Console.ReadKey(); }
public void PrintRepairsDataTable() { DataSetCreator d = new DataSetCreator(); DataSet q = d.CreateSchema(); DataTable tabel = q.Tables["Repairs"]; foreach (DataRow dataRow in tabel.Rows) { foreach (var item in dataRow.ItemArray) { Console.WriteLine(item); } Console.WriteLine(); } Console.WriteLine(); }