private void link_Attendance_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { AttendanceMonitoring am = new AttendanceMonitoring(""); am.Show(); this.Hide(); }
private void link_Attendance_Click(object sender, EventArgs e) { AttendanceMonitoring am = new AttendanceMonitoring(""); am.Show(); this.Hide(); }
private void timer_Tick(object sender, EventArgs e) { //BarcodeReader Reader = new BarcodeReader(); //Result result = Reader.Decode((Bitmap)pb_ScanQR.Image); try { Bitmap bitmap = new Bitmap(pb_ScanQR.Image); BarcodeReader reader = new BarcodeReader { AutoRotate = true, TryInverted = true }; Result result = reader.Decode(bitmap); decoded = result.ToString().Trim(); if (decoded != "") { timer.Stop(); if (origin == "book") { Book bk = new Book(usertype, decoded); bk.Show(); this.Close(); } else if (origin == "booksearch") { BookSearch bs = new BookSearch(usertype, decoded); bs.Show(); this.Close(); } else if (origin == "brwr") { Borrower br = new Borrower(usertype, decoded); br.sy = schoolyear; br.bt = brwrtype; br.Show(); this.Close(); } else if (origin == "inquiry") { Inquiry inq = new Inquiry(decoded); inq.Show(); this.Close(); } else if (origin == "attendance") { AttendanceMonitoring am = new AttendanceMonitoring(decoded); am.Show(); this.Close(); } else { MessageBox.Show("Invalid Destination"); } } } catch (Exception ex) { timer.Stop(); MessageBox.Show("No QR code detected."); } }
private void timer_Tick(object sender, EventArgs e) { BarcodeReader Reader = new BarcodeReader(); Result result = Reader.Decode((Bitmap)pb_ScanQR.Image); try { decoded = result.ToString().Trim(); if (decoded != "") { timer.Stop(); MessageBox.Show("Success"); if (gikan == "book") { Book bk = new Book(decoded); bk.Show(); this.Close(); } else if (gikan == "index-borrow") { Borrow br = new Borrow(decoded, ""); br.Show(); this.Close(); } else if (gikan == "borrowform") { Borrow br = new Borrow(Z, decoded); br.Show(); this.Close(); } else if (gikan == "return") { //Return r = new Return(decoded); //r.Show(); //this.Close(); } else if (gikan == "borrower_bk") { Borrower br = new Borrower(decoded, "borrower_bk"); br.Show(); this.Close(); } else if (gikan == "borrower_brwr") { Borrower br = new Borrower(decoded, "borrower_brwr"); br.Show(); this.Close(); } else if (gikan == "userinfo") { UserInformation ui = new UserInformation(decoded); ui.Show(); this.Close(); } else if (gikan == "inactiveusers") { UnapprovedAccounts ua = new UnapprovedAccounts(decoded); ua.Show(); this.Close(); } else if (gikan == "attendance") { AttendanceMonitoring am = new AttendanceMonitoring(decoded); am.Show(); this.Close(); } else { MessageBox.Show("Invalid Destination"); } } } catch (Exception ex) { } }