private void Hienthithongtinthuephong(int maPhieuthue) { PhieuThuePhongDTO phieuThuePhongDTO = new PhieuThuePhongDTO(); PhieuThuePhongBUS phieuThuePhongBUS = new PhieuThuePhongBUS(); phieuThuePhongDTO = phieuThuePhongBUS.LayPhieuthuephongTheoma(maPhieuthuephong); maP = phieuThuePhongDTO.MaPhong; PhongDTO phongDTO = new PhongDTO(); PhongBUS phongBUS = new PhongBUS(); phongDTO = phongBUS.LayPhongTheoMaSo(phieuThuePhongDTO.MaPhong); HienthiComboboxLoaiGia(); HienthiKhachhang(phieuThuePhongDTO.MaKhachHang); lbTenPhong.Text = phongDTO.Ten; lbTang.Text = phongDTO.Tang.ToString(); dtpkGioBD.Value = phieuThuePhongDTO.ThoiGianNhanPhong; dtpkGioKT.Value = phieuThuePhongDTO.ThoiGianTraPhong; dtpkNgayBD.Value = phieuThuePhongDTO.ThoiGianNhanPhong; dtpkNgayKT.Value = phieuThuePhongDTO.ThoiGianTraPhong; cbmLoaiDangKy.SelectedValue = phieuThuePhongDTO.MaLoaiThuePhong; lbLoaiPhong.Text = phongBUS.LayLoaiPhong(phongDTO.MaLoaiPhong); HienthiGiaPhong(int.Parse(cbmLoaiDangKy.SelectedValue.ToString()), phongDTO.MaLoaiPhong); HienthiThoiGian(); }
private void cbmLoaiDangKy_SelectedIndexChanged(object sender, EventArgs e) { PhongBUS phongBUS = new PhongBUS(); if (maP != 0) { HienthiGiaPhong(int.Parse(cbmLoaiDangKy.SelectedValue.ToString()), phongBUS.LayPhongTheoMaSo(maP).MaLoaiPhong); HienthiTraTruoc(); } HienthiThoiGian(); }
public void HienthithongTinDatPhong(int maPhong, DateTime nhan, DateTime tra) { maP = maPhong; PhongDTO phongDTO = new PhongDTO(); PhongBUS phongBUS = new PhongBUS(); phongDTO = phongBUS.LayPhongTheoMaSo(maPhong); lbTang.Text = phongDTO.Tang.ToString(); lbPhong.Text = phongDTO.Ten.ToString(); dtpkNgayBD.Value = nhan.Date; dtpkNgayKT.Value = tra.Date; dtpkGioBD.Text = nhan.TimeOfDay.ToString(); dtpkGioKT.Text = tra.TimeOfDay.ToString(); lbloaiPhong.Text = phongBUS.LayLoaiPhong(phongDTO.MaLoaiPhong); HienthiGiaPhong(int.Parse(cbmLoaiDangKy.SelectedValue.ToString()), phongDTO.MaLoaiPhong); HienthiTraTruoc(); _thoiGianNhan = nhan; _thoiGianTra = tra; }
private void TraPhong_Load(object sender, EventArgs e) { if (isSodoKScall) { PhieuThuePhongDTO phieuThuePhongDTO = new PhieuThuePhongDTO(); PhieuThuePhongBUS phieuThuePhongBUS = new PhieuThuePhongBUS(); phieuThuePhongDTO = phieuThuePhongBUS.DangO_Phong(maP); maLoaiThuePhong = phieuThuePhongDTO.MaLoaiThuePhong; maPhieuthuephong = phieuThuePhongDTO.Ma; PhongDTO phongDTO = new PhongDTO(); PhongBUS phongBUS = new PhongBUS(); phongDTO = phongBUS.LayPhongTheoMaSo(phieuThuePhongDTO.MaPhong); HienthiKhachhang(phieuThuePhongDTO.MaKhachHang); lbTenPhong.Text = phongDTO.Ten; dtpkGioBD.Value = phieuThuePhongDTO.ThoiGianNhanPhong; dtpkGioKT.Value = phieuThuePhongDTO.ThoiGianTraPhong; dtpkNgayBD.Value = phieuThuePhongDTO.ThoiGianNhanPhong; dtpkNgayKT.Value = phieuThuePhongDTO.ThoiGianTraPhong; lbLoaiDangKy.Text = phongBUS.LayLoaiDangKy(phieuThuePhongDTO.MaLoaiThuePhong); lbLoaiPhong.Text = phongBUS.LayLoaiPhong(phongDTO.MaLoaiPhong); HienthiGiaPhong(phieuThuePhongDTO.MaLoaiThuePhong, phongDTO.MaLoaiPhong); HienthiThoiGian(); HienthiTongTienDichVu(); HienthiTongTienPhaiTra(); } else { PhieuThuePhongDTO phieuThuePhongDTO = new PhieuThuePhongDTO(); PhieuThuePhongBUS phieuThuePhongBUS = new PhieuThuePhongBUS(); phieuThuePhongDTO = phieuThuePhongBUS.DangO_KhachHang(maKH); maLoaiThuePhong = phieuThuePhongDTO.MaLoaiThuePhong; maPhieuthuephong = phieuThuePhongDTO.Ma; maP = phieuThuePhongDTO.MaPhong; PhongDTO phongDTO = new PhongDTO(); PhongBUS phongBUS = new PhongBUS(); phongDTO = phongBUS.LayPhongTheoMaSo(phieuThuePhongDTO.MaPhong); HienthiKhachhang(phieuThuePhongDTO.MaKhachHang); lbTenPhong.Text = phongDTO.Ten; dtpkGioBD.Value = phieuThuePhongDTO.ThoiGianNhanPhong; dtpkGioKT.Value = phieuThuePhongDTO.ThoiGianTraPhong; dtpkNgayBD.Value = phieuThuePhongDTO.ThoiGianNhanPhong; dtpkNgayKT.Value = phieuThuePhongDTO.ThoiGianTraPhong; lbLoaiDangKy.Text = phongBUS.LayLoaiDangKy(phieuThuePhongDTO.MaLoaiThuePhong); lbLoaiPhong.Text = phongBUS.LayLoaiPhong(phongDTO.MaLoaiPhong); HienthiGiaPhong(phieuThuePhongDTO.MaLoaiThuePhong, phongDTO.MaLoaiPhong); HienthiThoiGian(); HienthiTongTienDichVu(); HienthiTongTienPhaiTra(); } }