Exemplo n.º 1
0
        private void unapprovedUsersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            UnapprovedAccounts ua = new UnapprovedAccounts(usertype);

            ua.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        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)
            {
            }
        }