Example #1
0
        public RegData()
        {
            // Create dataset
            checkInData = new DataSet("CheckIn");

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

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

            DataRelation relation = new DataRelation("OwnerIDRelation", Customers.Columns["CustomerID"], Rooms.Columns["OwnerID"], true);

            CheckInDataSet.Relations.Add(relation);

            agent = new RegDataDAO(this);
        }//end method RegData
Example #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