コード例 #1
0
        public bool responseWaiters(int tableID)
        {
            profileDataContext myContext = new profileDataContext();

            restaurantTable rTable = new restaurantTable();

            // Query the database for the row to be updated.
            var query =
                from tord in myContext.restaurantTables
                where tord.tableID == tableID
                select tord;

            // Execute the query, and change the column values
            // you want to change.
            foreach (restaurantTable tord in query)
            {
                tord.callWaiter = false;
                // Insert any additional changes to column values.
            }

            // Submit the changes to the database.
            try
            {
                myContext.SubmitChanges();
                return(true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                // Provide for exceptions.
                return(false);
            }
            return(false);
        }
コード例 #2
0
 partial void DeleterestaurantTable(restaurantTable instance);
コード例 #3
0
 partial void UpdaterestaurantTable(restaurantTable instance);
コード例 #4
0
 partial void InsertrestaurantTable(restaurantTable instance);