Ejemplo n.º 1
0
        private void btnThemLP_Click(object sender, EventArgs e)
        {
            string  maloaiphong  = lpBus.SinhMaLoaiPhong();
            string  tenloaiphong = txtTenLP.Text;
            decimal giaphong     = Decimal.Parse(txtGiaLP.Text);
            int     songuoi      = Int32.Parse(txtSoNguoiLP.Text);

            if (maloaiphong.ToString() != "" && tenloaiphong.ToString() != "" && giaphong.ToString() != "" && songuoi.ToString() != "")
            {
                if (lpBus.ThemLoaiPhong(maloaiphong, tenloaiphong, giaphong, songuoi))
                {
                    MessageBox.Show("Thêm mới thành công");
                    DanhSachLoaiPhong();
                    LoaiPhongBiding();
                }
                else
                {
                    MessageBox.Show("Có lỗi khi thêm ");
                }
            }
            else
            {
                MessageBox.Show("Mời nhập dữ liệu!");
            }
        }