public void GetDataFromQRCode(Image MyQRCode) { Bitmap imgQRCode = (Bitmap)MyQRCode; if (imgQRCode != null) { ZXing.BarcodeReader Reader = new ZXing.BarcodeReader(); Result result = Reader.Decode(imgQRCode); if (result != null) { string decoded = result.ToString().Trim(); CustomerModel customer = CustomerDataProvider.GetCustomer(decoded); if (customer != null) { cap.Dispose(); myTimer.Stop(); label_email.Text = customer.Email; label_dateCreated.Text = customer.DateCreated; label_SeatType.Text = customer.SeatType; label1_name.Text = customer.Name; ovalPictureBox1_avatar.Image = Image.FromFile(CommonManager.ProjectDirectory() + customer.Avatar); SuccessCheckInForm resultForm = new SuccessCheckInForm(customer); resultForm.FormClosed += ResultForm_FormClosed; resultForm.ShowDialog(); //while (resultForm.IsClose == false) { }; } } } }
public Customer Get(int id) { return(_CustomerDataProvider.GetCustomer(id)); }