Пример #1
0
        public void FillRepairsDataTable(Repair reparatie)
        {
            DataSetCreator d     = new DataSetCreator();
            DataSet        q     = d.CreateSchema();
            DataTable      tabel = q.Tables["Repairs"];

            tabel.Rows.Add(reparatie);
        }
Пример #2
0
        public void FillVehiclesDataTable(Car masina)
        {
            DataSetCreator d     = new DataSetCreator();
            DataSet        q     = d.CreateSchema();
            DataTable      tabel = q.Tables["Vehicles"];

            tabel.Rows.Add(masina);
        }
Пример #3
0
        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();
        }
Пример #4
0
        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();
        }