コード例 #1
0
        private void toolStripButtonRefresh_Click(object sender, EventArgs e)
        {
            pctrl1.HienthiComboBoxPhongTra(cmbMaPhong);
            cmbMaPhong.SelectedValue = maphong;
            pctrl.HienthiDataGridviewComboBoxMaPhong(MaPhong);

            cmbMaPhong.SelectedIndexChanged += new EventHandler(cmbMaPhong_SelectedValueChanged);

            dvctrl.HienthiComboBoxMaSuDung(cmbMaSDDVu);
            dataGridViewX1.Rows.Add(dvctrl.HienthiDataGridViewComboBoxColumn());
            cmbMaSDDVu.SelectedIndexChanged += new EventHandler(cmbMaSDDVu_SelectedIndexChanged);

            cstr.HienThiCombobox(cmbMaChinhSach);
            dataGridViewX1.Columns.Add(cstr.HienthiDataGridViewComboBoxColumn());
            cmbMaChinhSach.SelectedIndexChanged += new EventHandler(cmbMaChinhSach_SelectedIndexChanged);

            cmbMaNhanPhong.SelectedIndexChanged += new EventHandler(cmbMaNhanPhong_SelectedIndexChanged);

            khctrl.HienthiComboBox(cmbTenKhachHang);
            pnctrl.HienthiComboBoxMaPhieuNhan(cmbMaNhanPhong);
            ctrl.HienThiHoaDon(dataGridViewX1, bindingNavigator1);
            bindingNavigator1.BindingSource.CurrentChanged -= new EventHandler(BindingSource_CurrentChanged);
            bindingNavigator1.BindingSource.CurrentChanged += new EventHandler(BindingSource_CurrentChanged);

            ctctrl.HienThi(dataGridViewX1, txtMaHoaDon.Text);
            if (status == Controll.AddNew)
            {
                txtMaHoaDon.Text = ThamSo.LayHoaDon().ToString();
                Allow(true);
            }
            else
            {
                Allow(false);
            }
        }
コード例 #2
0
        private void PhieuNhanPhong_Load(object sender, EventArgs e)
        {
            //if (pnguoiDungBO.NguoiDung != "Admin")
            //    PhanQuyen();

            pctrl1.HienthiComboBoxPhongDat(cmbMaPhg);
            cmbMaPhg.SelectedValue = maphong;

            pctrl.HienthiDataGridviewComboBoxMaPhong(MaPhong);


            ptctrl.HienthiComboBoxMaPhieuThue(cmbMaPThue);
            khctrl.HienthiComboBox(cmbMaKH);

            ctrl.HienThiPhieuNhan(dataGridViewX1, bindingNavigator1);
            bindingNavigator1.BindingSource.CurrentChanged -= new EventHandler(BindingSource_CurrentChanged);
            bindingNavigator1.BindingSource.CurrentChanged += new EventHandler(BindingSource_CurrentChanged);

            ctpnctrl.HienThi(dataGridViewX1, txtMaNhanPhong.Text);
            if (status == Controll.AddNew)
            {
                txtMaNhanPhong.Text = ThamSo.LayPhieuNhan().ToString();
                Allow(true);
            }
            else
            {
                Allow(false);
            }
            f();
        }
コード例 #3
0
        private void PhieuDangKy_Load(object sender, EventArgs e)
        {
            pctrl1.HienthiComboBox(cmbMaPHong);
            cmbMaPHong.SelectedValue = maphong;
            pctrl.HienthiDataGridviewComboBoxMaPhong(MaPhong);

            khctrl.HienthiComboBox(cmbMaKH);
            ctrl.HienThiPhieuThue(dataGridViewX1, bindingNavigator1);
            bindingNavigator1.BindingSource.CurrentChanged -= new EventHandler(BindingSource_CurrentChanged);
            bindingNavigator1.BindingSource.CurrentChanged += new EventHandler(BindingSource_CurrentChanged);

            ctpnctrl.HienThi(dataGridViewX1, txtMaPhieuThue.Text);
            if (status == Controll.AddNew)
            {
                txtMaPhieuThue.Text = ThamSo.LayPhieuDangKy().ToString();
                Allow(true);
            }
            else
            {
                Allow(false);
            }
        }