/// <summary>
        /// Input datas from confirmation by restaurant
        /// - change value from false to true in RestoConfirmation
        /// - change value of RestoConfirmationDate to DateTime.now
        /// - input comments if completed
        ///
        /// </summary>
        /// <param name="reservation"></param>
        /// <returns></returns>
        public bool ConfirmReservationFromResto(Reservation reservation)
        {
            this.RefreshDataSet();

            int nbrRowsUpdated = -1;

            try
            {
                DataRow row = dp.ds.RESERVATION.Select(string.Format("RESERVATIONID = '{0}'", reservation.Id)).FirstOrDefault();
                row["RESTOCONFIRMATION"]     = true;
                row["RESTOCONFIRMATIONDATE"] = DateTime.Now;
                row["RESTOCOMMENTS"]         = reservation.RestoComments;

                using (RestoBook.Common.Model.DataSetRestoBookTableAdapters.RESERVATIONTableAdapter daReservation = new Model.DataSetRestoBookTableAdapters.RESERVATIONTableAdapter())
                {
                    nbrRowsUpdated = daReservation.Update(row);
                }
                return(nbrRowsUpdated > 0);
            }

            catch (System.NullReferenceException)
            {
                return(false);
            }
        }
        /// <summary>
        /// Only used by backoffice to change all reservation's data except foreign keys (serviceId, customerId)
        /// </summary>
        /// <param name="reservation"></param>
        /// <returns></returns>
        public bool ModifyReservationsFromBackOffice(Reservation reservation)
        {
            this.RefreshDataSet();

            int nbrRowsUpdated = -1;

            try
            {
                DataRow row = dp.ds.RESERVATION.Select(string.Format("RESERVATIONID = '{0}'", reservation.Id)).FirstOrDefault();
                row["RESERVATIONDATE"]       = reservation.ReservationDate;
                row["PLACEQUANTITY"]         = reservation.PlaceQuantity;
                row["SERVICE"]               = reservation.Service;
                row["RESTOCONFIRMATION"]     = reservation.RestoConfirmation;
                row["RESTOCONFIRMATIONDATE"] = (reservation.RestoConfirmation == true) ? DateTime.Now : DateTime.MaxValue;
                row["RESTOCOMMENTS"]         = reservation.RestoComments;

                using (RestoBook.Common.Model.DataSetRestoBookTableAdapters.RESERVATIONTableAdapter daReservation = new Model.DataSetRestoBookTableAdapters.RESERVATIONTableAdapter())
                {
                    nbrRowsUpdated = daReservation.Update(row);
                }
                return(nbrRowsUpdated > 0);
            }

            catch (System.NullReferenceException)
            {
                return(false);
            }
        }
        /// <summary>
        /// This method allow customer to modify number of places reserved
        /// Other datas can't be modified
        /// A reservation must be deleted and recreated in place to modify customer or service
        /// </summary>
        /// <param name="reservation"></param>
        /// <returns>bool if creation succeed</returns>
        public bool ModifyReservationFromCustomer(Reservation reservation)
        {
            this.RefreshDataSet();

            int nbrRowsUpdated = -1;

            try
            {
                DataRow row = dp.ds.RESERVATION.Select(string.Format("RESERVATIONID = '{0}'", reservation.Id)).FirstOrDefault();
                //string test = row["RESERVATIONID"].ToString();
                //string test1 = row["CUSTOMERID"].ToString();
                //string test2 = row["SERVICEID"].ToString();
                //string test3 = row["RESERVATIONDATE"].ToString();
                row["RESERVATIONDATE"]       = reservation.ReservationDate;
                row["SERVICE"]               = reservation.Service;
                row["PLACEQUANTITY"]         = reservation.PlaceQuantity;
                row["RESTOCONFIRMATION"]     = reservation.RestoConfirmation;
                row["RESTOCONFIRMATIONDATE"] = reservation.RestoConfirmationDate;
                row["RESTOCOMMENTS"]         = reservation.RestoComments;
                row["ENABLE"] = reservation.IsEnabled;


                using (RestoBook.Common.Model.DataSetRestoBookTableAdapters.RESERVATIONTableAdapter daReservation = new Model.DataSetRestoBookTableAdapters.RESERVATIONTableAdapter())
                {
                    nbrRowsUpdated = daReservation.Update(row);
                }
                return(nbrRowsUpdated > 0);
            }
            catch (System.NullReferenceException)
            {
                return(false);
            }
        }