Пример #1
0
        private void butOtherFee_Click(object sender, EventArgs e)
        {
            string         newadno  = "";
            string         newstdno = "";
            SqlDataAdapter da       = new SqlDataAdapter("Select adno,cstandard from tbl_student where adno='" + adno + "' and cstandard='" + stdno + "'", d.con);
            DataSet        ds       = new DataSet();

            da.Fill(ds);
            DataRow dr;

            if (ds.Tables[0].Rows.Count >= 1)
            {
                dr       = ds.Tables[0].Rows[0];
                newadno  = dr[0].ToString();
                newstdno = dr[1].ToString();
                Addothrfeecollect payotherfee = new Addothrfeecollect();
                SchoolManagement.rno      = newadno;
                SchoolManagement.standard = newstdno;
                payotherfee.Show();
            }
            else
            {
                MessageBox.Show("Please select any one of the student", "Warning..", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        private void dgvsview_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            adno     = dgvsview.Rows[e.RowIndex].Cells[0].Value.ToString();
            standard = dgvsview.Rows[e.RowIndex].Cells[2].Value.ToString();
            SchoolManagement.standard = standard;
            SchoolManagement.rno      = adno;

            Addothrfeecollect c = new Addothrfeecollect();

            c.Show();
            this.Hide();
        }