Пример #1
0
        }//end method Update

        public void IniAdapter()
        {
            TableCustomers customers = new TableCustomers();

            adapter = new SqlDataAdapter(customers.SelectCommand, Program.dbConnection.Connection);

            dataset = new DataSet();
            dataset.Tables.Add(customers);
            adapter.TableMappings.Add(customers.GetTableMapping());
        }//end method IniAdapter
Пример #2
0
        public RegData()
        {
            // Create dataset
            checkInData = new DataSet("CheckIn");

            // Create tables
            Customers = new TableCustomers();
            Groups    = new TableGroups();
            Rooms     = new TableRooms();
            Companies = new TableCompanies();

            // Add tables to dataset
            CheckInData.Tables.AddRange(new DataTable[] { Customers, Groups, Rooms, Companies });

            string selectCmd = @Customers.SelectCommand + " " + Companies.SelectCommand + ";";

            agent = new RegDataDAO(selectCmd);
            agent.Initialize(this);

            //agent.FillDataSet(CheckInData, Customers.GetTableMapping(), Customers.SourceTableName);
        }//end method RegData