Exemple #1
0
        private void themeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmKhachHang f = new FrmKhachHang();

            this.Hide();
            f.ShowDialog();
            this.Show();
        }
Exemple #2
0
        private void liL1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            FrmKhachHang frmKH = new FrmKhachHang();

            this.Hide();
            frmKH.ShowDialog();
            this.Show();
        }
Exemple #3
0
        public void btn_Click(object sender, EventArgs e)
        {
            Button btn = sender as Button;
            //string id = (btn.Tag as Phong_DTO).MaPhong;
            //dgvKHDaDat.DataSource = BUS_KhachHang.takeCustomerAllID(id);
            //dgvKHDaDat.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            //dgvDichVuDaDat.DataSource = BUS_DichVu.takeAllServiceFId(id);
            //dgvDichVuDaDat.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;

            string status = (btn.Tag as Phong_DTO).TinhTrang;

            if (status == "Đã đặt")
            {
                // MessageBox.Show("" + status, "Thông báo !!!");
                btn.BackColor = Color.Tomato;
                string id = (btn.Tag as Phong_DTO).MaPhong;
                dgvKHDaDat.DataSource              = BUS_KhachHang.takeCustomerAllID(id);
                dgvKHDaDat.AutoSizeColumnsMode     = DataGridViewAutoSizeColumnsMode.Fill;
                dgvDichVuDaDat.DataSource          = BUS_DichVu.takeAllServiceFId(id);
                dgvDichVuDaDat.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
                showService(id);
                ShowDGVKhachHang(id);

                btnThem.Visible = true;
                btnXoa.Visible  = true;

                dgvKHDaDat.Visible     = true;
                dgvDichVuDaDat.Visible = true;
            }
            else
            {
                string ten     = (btn.Tag as Phong_DTO).TenPhong;
                string maPhong = (btn.Tag as Phong_DTO).MaPhong;
                // MessageBox.Show("" + ten, "Thông Báo !!!");
                FrmKhachHang frm = new FrmKhachHang();
                // this.Hide();
                frm.TenPhong = ten;
                frm.MaPhong  = maPhong;
                frm.ShowDialog();
                this.loadRoom();
                // this.Show();
            }
        }