コード例 #1
0
 public int StoreBookingInformation(Booking booking)
 {
     SqlConnection connection=new SqlConnection(connectionString);
     string query = string.Format("insert into Booking Values('{0}','{1}','{2}','{3}','{4}','{5}','{6}')",
        booking.BookID,booking.AppID,booking.FaciID,booking.TimeSlot,booking.BookDate,booking.BookStatus,booking.UserName);
     SqlCommand command = new SqlCommand(query, connection);
     connection.Open();
     int x = command.ExecuteNonQuery();
     connection.Close();
     if (x > 0)
     {
         return x;
     }
     else
     {
         return 0;
     }
 }
コード例 #2
0
 public int StoreBookingInformation( Booking booking)
 {
     return gateway.StoreBookingInformation( booking);
 }