コード例 #1
0
        public void DoubleBookingTest()
        {
            Booking bookInfo = new Booking();

            using (var scop = new System.Transactions.TransactionScope())
            {
                controller.NewBooking.MemberNumber = "hofi9002";
                controller.NewBooking.BookingDate  = "01-05-2018";
                controller.BookSession();
                Assert.AreEqual(true, bookingRepository.FindDate(bookingInfo));
                controller.NewBooking.MemberNumber = "hofi9002";
                controller.NewBooking.BookingDate  = "01-05-2018";
                controller.BookSession();
                Assert.AreEqual(false, bookingRepository.FindDate(bookingInfo));
            }
        }
コード例 #2
0
        private void Btn_ScheduleSession_Click(object sender, RoutedEventArgs e)
        {
            BindingExpression _Bind_MemberNumber = tb_TypeMemberNumber.GetBindingExpression(TextBox.TextProperty);
            BindingExpression _Bind_BookingDate  = Pick_BookingDate.GetBindingExpression(DatePicker.TextProperty);

            _Bind_MemberNumber.UpdateSource();
            _Bind_BookingDate.UpdateSource();

            _Controller.BookSession();
        }