public Studentfine(Std st, string id)
        {
            InitializeComponent();
            this.s   = st;
            this.idd = id;
            DataTable dt = new DataTable();

            dt = opr.stdfine(idd);
            dataGridView1.DataSource = dt;
        }
Exemple #2
0
        private void blgnl_Click(object sender, EventArgs e)
        {
            inf.Username = tbuname.Text;
            inf.Password = tbpass.Text;
            dt           = opr.Login(inf);
            if (dt.Rows.Count > 0)
            {
                usertype = dt.Rows[0][8].ToString().Trim();
                string id     = dt.Rows[0][0].ToString().Trim();
                string status = dt.Rows[0][9].ToString().Trim();
                if (usertype == "A")

                {
                    this.Hide();
                    admin AD = new admin(id);

                    AD.Show();
                }
                else if (usertype == "L")
                {
                    this.Hide();
                    LibraryEmploye le = new LibraryEmploye(id);
                    le.Show();
                }
                else if (usertype == "S")
                {
                    if (status == "valid")
                    {
                        this.Hide();
                        Std st = new Std(id);
                        st.Show();
                    }
                    else
                    {
                        MessageBox.Show("You are Invalid : Please Wait For Confirmation");
                    }
                }
            }
            else
            {
                MessageBox.Show("Invalid Password or Username", "Stooped ", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }