Пример #1
0
        private void DSPhongBT_Click(object sender, EventArgs e)
        {
            frmDSPhong frm = new frmDSPhong(_maNV, this);

            frm.Show();
            this.Hide();
        }
Пример #2
0
        private void frmDatPhong_Load(object sender, EventArgs e)
        {
            frmDSPhong form = new frmDSPhong();

            lbPhong.Text += maPhong;
            DateTime dt = DateTime.Now;

            txtNgayDat.Text          = string.Format("{0:dd/MM/yyyy}", dt);
            cbGioiTinh.SelectedIndex = 0;
        }
Пример #3
0
        private void btOK_Click(object sender, EventArgs e)
        {
            DateTime NgayDat  = DateTime.Now;
            DateTime NgaySinh = Convert.ToDateTime(txtNgaySinh.Text);
            Tam      t        = new Tam(maPhong, txtCMND.Text.ToString(), NgayDat, "NV001", Convert.ToInt32(txtSoNguoi.Text));

            new TamBUS().Insert(t);
            Khach k = new Khach(txtCMND.Text, txtHoTen.Text, NgaySinh, cbGioiTinh.SelectedItem.ToString(), txtDiaChi.Text, txtDienThoai.Text);

            new KhachBUS().Insert(k);
            MessageBox.Show("Đặt Phòng Thành Công!");
            if (UIParent is frmDSPhong)
            {
                frmDSPhong frm = UIParent as frmDSPhong;
                frm.LoadData();
            }
            this.Close();
        }