private void btReservation_Click(object sender, EventArgs e) { try { ReceptionTaskBO aCheckInActionBO = new ReceptionTaskBO(); aCheckInRoomBookingEN.BookingType = 3; // 1: Dat onlie, 2: Dat qua dien thoai, 3: Truc tiep, 4: Cong van aCheckInRoomBookingEN.IDSystemUser = CORE.CURRENTUSER.SystemUser.ID; ; aCheckInRoomBookingEN.Status = 3; // 3 : da checkin if (aCheckInRoomBookingEN.BookingMoney > 0) { aCheckInRoomBookingEN.StatusPay = 2; //2:Tam ung } else { aCheckInRoomBookingEN.StatusPay = 1; //1:chua thanh toan } bool success = aCheckInActionBO.CheckInForRoomAlreadyBooking(aCheckInRoomBookingEN); if (success == true) { MessageBox.Show("Đặt phòng thành công .", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); if (this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.afrmTsk_CheckInGoverment_ForRoomBooking_Step1.afrmTsk_ListBookingRs != null) { this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.afrmTsk_CheckInGoverment_ForRoomBooking_Step1.afrmTsk_ListBookingRs.Reload(); if (this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.afrmTsk_CheckInGoverment_ForRoomBooking_Step1.afrmTsk_ListBookingRs.afrmMain != null) { this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.afrmTsk_CheckInGoverment_ForRoomBooking_Step1.afrmTsk_ListBookingRs.afrmMain.ReloadData(); } } if (this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.afrmTsk_CheckInGoverment_ForRoomBooking_Step1.afrmMain != null) { this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.afrmTsk_CheckInGoverment_ForRoomBooking_Step1.afrmMain.ReloadData(); } this.Close(); this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.Close(); this.afrmTsk_CheckInGoverment_ForRoomBooking_Step2.afrmTsk_CheckInGoverment_ForRoomBooking_Step1.Close(); } } catch (Exception ex) { MessageBox.Show("frmTsk_CheckInGoverment_ForRoomBooking_Step3.btReservation_Click\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }