public PayScreen(ConnectData conData, string mp, bool book) { InitializeComponent(); connectData = conData; maPhong = mp; book = book; if (Global.songay == 0) { connectData.getInfoPayRoom(maPhong); } else { //////// } listCustomers = Global.listCustomer; room = Global.room; note = Global.note; valuedayStart = Global.valuedayStart; valuedayEnd = Global.valuedayEnd; List <string> loaikhach = new List <string>(); for (int i = 0; i < listCustomers.Count; i++) { listCustomer.Add(listCustomers[i].TenKH); if (checkExistinList(loaikhach, listCustomers[i].TenLK)) { loaikhach.Add(listCustomers[i].TenLK); } } txtMaLP.Content = room.TenLP; txtMaPhong.Content = room.MaPhong; txtDonGia.Content = room.DonGia.ToString(); txtNgayBatDau.Content = valuedayStart; txtNgayTraPhong.Content = valuedayEnd; valueHeSo = connectData.getFactor(loaikhach); txtHeSo.Content = valueHeSo.ToString(); thanhtien = tinhtien(); txtThanhTien.Content = thanhtien.ToString() + " VNĐ"; }
public BookRoom(ConnectData conData, string MP) { InitializeComponent(); connectData = conData; maPhong = MP; //mã phognf listTypeOfCustomer = conData.getTypeOfCustommer(); foreach (ListViewDataCustommer item in listTypeOfCustomer) { listTypeCustomer.Add(item.LoaiKhach); } if (Global.valuedayStart != "") { room = Global.room; dpkDayBegin.Text = Global.valuedayStart; dpkDayEnd.Text = Global.valuedayEnd; listCustomer = Global.listCustomer; } else { room = connectData.getBookRoom(maPhong); } txtLoaiPhong.Text = room.TenLP; txtPhong.Text = room.MaPhong; txtDongia.Text = room.DonGia.ToString(); lvCustommer.ItemsSource = listCustomer; CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"; Thread.CurrentThread.CurrentCulture = ci; }