public static void CommitReservation(Reservation pR)
 {
     DataContextDataContext dc = new DataContextDataContext();
     //$dc.ins
     dc.insert_reservation(
         (Guid?)pR.id,
         pR.userFrom,
         pR.customerName,
         pR.phone,
     (DateTime?)pR.arriveTime,
     pR.tableName,
     (int?)pR.seat,
     (int?)pR.state);
 }
        //CustomService customService = new CustomService();
        //ManagerService managerService = new ManagerService();
        //Function: assign a table to the custoemr who come into restaurant without a reservation
        //Parameters:
        //    string pTableName: table name assigned to the customer walk in
        //    Reservation pR: reservation generated which belongs to this new customer
        //Remarks:
        //    change the TableState to BUSY, the table is specified by  pTableName
        //    set the ReservationState to BUSY of pR
        //$ 一个客人进来,没有提前预定的 table 从available->busy,reservation-》busy
        public void WalkInArrive(string pTableName, Reservation pR)
        {
            foreach (SysTable t in Restaurant.tableList)
            {
                if (t.name == pTableName)
                {
                    DataContextDataContext dc = new DataContextDataContext();
                    dc.insert_reservation(
                        (Guid?)pR.id,
                        pR.userFrom,
                        pR.customerName,
                        pR.phone,
                        (DateTime?)pR.arriveTime,
                        pR.tableName,
                        (int?)pR.seat,
                        (int?)pR.state);

                    t.SetReservation(pR); //so the table now maintain a reservation
                    t.ChageState(TableState.BUSY);
                    t.GetReservation().ChangeState(ReservationState.BUSY);
                }
                else
                { }
            }
        }