private void windowsUIButtonPanel1_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e) { switch (e.Button.Properties.Tag.ToString()) { case "Đặt": DatPhongDTO datPhong = new DatPhongDTO(DatPhongBUS.PhatSinhMaDatPhong(), txtGioVao.Time, Convert.ToDouble(txtTienTraTruoc.EditValue), (this.ParentForm.Owner as MainForm).nhanVien.MaNhanVien, khachHang.MaKH, txtGhiChu.EditValue.ToString(), 1, DateTime.Now); DatPhongBUS.LuuThongTinDatPhong(datPhong); foreach (PhongDTO phong in selectedPhong.Values) { ChiTietDatPhongBUS.LuuThongTinDatPhong(new ChiTietDatPhongDTO(ChiTietDatPhongBUS.PhatSinhMaChiTietDatPhong(), phong.MaPhong, datPhong.MaDatPhong)); } XtraMessageBox.Show("Đặt phòng thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); onDatPhongSuccess(datPhong); ((FlyoutDialog)this.Parent).Hide(); break; case "Hủy": ((FlyoutDialog)this.Parent).Hide(); break; default: break; } }