Exemplo n.º 1
0
        private void TienDVu_ValueChanged(object sender, EventArgs e)
        {
            DichVuControl dvctrl = new DichVuControl();

            QUANLYKHACHSAN.BusinessObject.DanhSachSuDungDichVuInFo dsi = ctrl.LayDSSuDungDVu(cmbMadichvu.SelectedValue.ToString());
            QUANLYKHACHSAN.BusinessObject.DichVuInFo dvi = dvctrl.LayMaDichVu(dsi.MaDichVu);
            float dongia  = dvi.DonGia;
            int   soluong = dsi.SoLuong;
            float tien    = 0;

            tien = tien + (dongia * soluong);
            //numTienDVu.Value = tien;

            //numTienDVu.Value=(numSoLuong.Value*dvi.DonGia);
        }
Exemplo n.º 2
0
        private void cmbMaSDDVu_SelectedIndexChanged(object sender, EventArgs e)
        {
            DanhSachSuDungDichVuControl dsdvctrl = new DanhSachSuDungDichVuControl();

            if (cmbMaSDDVu.SelectedValue != null)
            {
                QUANLYKHACHSAN.BusinessObject.DanhSachSuDungDichVuInFo dsi = dsdvctrl.LayDSSuDungDVu(cmbMaSDDVu.SelectedValue.ToString());
                int           solg   = dsi.SoLuong;
                DichVuControl dvctrl = new DichVuControl();
                QUANLYKHACHSAN.BusinessObject.DichVuInFo dvi = dvctrl.LayMaDichVu(dsi.MaDichVu);
                float dongia = dvi.DonGia;
                float tien   = solg * dongia;
                txtTienDVu.Text = tien.ToString();
            }
        }