private void btnxoaphong_Click(object sender, EventArgs e)
        {
            phongBLL     pBLL = new phongBLL();
            DialogResult luu  = MessageBox.Show("Bạn chắc chắn xóa??", "Thông báo thêm mới", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (luu == DialogResult.Yes)
            {
                pBLL.xoa_Phong(int.Parse(txtPhong.Text));
                hienthi();
            }
        }
Example #2
0
 private void btnluuphong_Click(object sender, EventArgs e)
 {
     trangthai(false);
     if (temp == 1)
     {
         phongBLL pBLL = new phongBLL();
         pBLL.them_phong(Convert.ToInt32(txtphong.Text), traveTinhtrang(), cbloaiphong.Text, Convert.ToInt32(txtdongiaphong.Text));
         hienthi();
     }
     else
     {
         phongBLL pBLL = new phongBLL();
         pBLL.sua_phong(Convert.ToInt32(txtphong.Text), traveTinhtrang(), cbloaiphong.Text, Convert.ToInt32(txtdongiaphong.Text));
         // nvBLL.sua_phong(txttennv.Text, travegioitinh(), dtngaysinh.Value, txtscm.Text, txtdiachi.Text, txtsdt.Text, dtngayvaolam.Value, int.Parse(txtmanv.Text));
         hienthi();
     }
     btnluuphong.Enabled   = false;
     btnthemphong.Enabled  = true;
     btnxoaphong.Enabled   = true;
     btnthoatphong.Enabled = true;
 }
        private void btnluuphong_Click(object sender, EventArgs e)
        {
            trangthai(false);
            if (temp == 1)
            {
                phongBLL pBLL = new phongBLL();
                pBLL.them_phong(int.Parse(txtPhong.Text), traveTinhTrang(), traveLoaiPhong(), float.Parse(txtDonGiaPhong.Text));

                hienthi();
            }
            //else
            //{
            //    nhanvienBLL nvBLL = new nhanvienBLL();
            //    nvBLL.sua_nhanvien(txttennv.Text, travegioitinh(), dtngaysinh.Value, txtscm.Text, txtdiachi.Text, txtsdt.Text, dtngayvaolam.Value, int.Parse(txtmanv.Text));
            //    hienthi();
            //}
            //btnluu.Enabled = false;
            //btnhuy.Enabled = false;
            //btnsua.Enabled = true;
            //btnthem.Enabled = true;
            //btnxoa.Enabled = true;
        }
Example #4
0
        private void HienThiTimKiem()
        {
            phongBLL tkBLL = new phongBLL();

            dgTimKiem.DataSource = tkBLL.hienthithongtinphong();
        }
Example #5
0
        private void hienthiphong()
        {
            phongBLL pbll = new phongBLL();

            dtgvDanhSachphong.DataSource = pbll.hienthithongtinphong();
        }
Example #6
0
        private void hienthi()
        {
            phongBLL pbll = new phongBLL();

            GridView.DataSource = pbll.hienthithongtinphong();
        }
        //Load du lieu len datagridview thong tin phong kh
        private void frm_load(object sender, EventArgs e)
        {
            phongBLL pbll = new phongBLL();

            dataGridView1.DataSource = pbll.hienthithongtinphong();
        }
        private void hienthi()
        {
            phongBLL pbll = new phongBLL();

            grThongTinPhong.DataSource = pbll.hienthithongtinphong();
        }
        private void frm_load(object sender, EventArgs e)
        {
            phongBLL pbll = new phongBLL();

            grThongTinPhongKH.DataSource = pbll.hienthithongtinphong();
        }