void LoadThongTin() { clsCustomer CUS = new clsCustomer(); Customer cus = CUS.checkIfExist(_idCustomer); lblTen.Text = cus.name; lblCMND.Text = cus.id_Customer; lblSoDT.Text = cus.phone; lblDiaChi.Text = cus.address; clsRoom ROOM = new clsRoom(); var room = ROOM.LayThongTinPhong(_idRoom); lblTenPhong.Text = room.RoomNumber; clsStyleRoom SROOM = new clsStyleRoom(); var SRoom = SROOM.GetRoomStyle(room.id_RoomStyle); lblLoaiPhong.Text = SRoom.NameStyle; double giaPhong = (double)SRoom.Price; lblDonGia.Text = giaPhong.ToString(); // So dem clsBookRoom BROOM = new clsBookRoom(); var BRoom = BROOM.GetThongTinBookRoom(_idRoom); lblNgayDen.Text = BRoom.Checkin_Date.ToString(); var soDem = (BRoom.Checkout_Date - BRoom.Checkin_Date).TotalDays; lblSoDem.Text = soDem.ToString(); double tienPhong = soDem * giaPhong; lblTienPhong.Text = string.Format("{0:0,0 vnđ}", tienPhong); double tienDV = TinhTienDichVu(); lblDichVu.Text = string.Format("{0:0,0 vnđ}", tienDV); double tongTien = tienDV + tienPhong; lblTongTien.Text = string.Format("{0:0,0 vnđ}", tongTien); }
private void ShowThongTinDatPhong(string cmnd, string idRoom) { clsCustomer clsCus = new clsCustomer(); Customer res = clsCus.checkIfExist(cmnd); if (res != null) { DuaDataKhachHangVaoTextBox(res); clsBookRoom clsBRoom = new clsBookRoom(); var ttbRoom = clsBRoom.GetThongTinBookRoomCuaKhach(res.id_Customer); DuaDataBookRoomVaoTextBox(ttbRoom); clsRoom Room = new clsRoom(); var ttRoom = Room.LayThongTinPhong(idRoom); DuaDataRoomVaoTextBox(ttRoom); _idRoom = ttRoom.id_Room; _idCustomer = res.id_Customer; } else { MessageBox.Show("Số CMND chưa đặt phòng", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public frmCustomerManagement() { InitializeComponent(); qlCustomer = new clsCustomer(); }