Ejemplo n.º 1
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            studentfees stdfees = new studentfees();

            stdfees.txtid.text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            this.Visible       = false;


            stdfees.ShowDialog();
        }
Ejemplo n.º 2
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
            this.Visible = false;
            studentfees f2 = new studentfees();
            // f2.btnupdate.Visible = true;
            //f2.label2.Visible = true;
            f2.txtid.Visible = true;
            f2.btnsave.Visible = false;
            f2.txtfeesid.text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            f2.txtid.text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();

            f2.txtourses.text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
            f2.txtfees.text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
            f2.mrktxtpdat.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
            f2.txtrmfees.text = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
            f2.paidfees.text = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
            f2.btnupdate.Visible = true;
            f2.linkLabel1.Visible = false;
            f2.txtid.Enabled = false;
           
            
                if (f2.txtid.text == "")
                {
                    //f2.lblid.Text = "Student Id Is blank !";
                }
                else
                {

                    StudentReg std = new StudentReg();
                    SqlDataReader myReader = null;
                    SqlCommand myCommand = new SqlCommand(@"SELECT * FROM stdreg where studen_id='" + f2.txtid.text + "' ", cn);
                    //  @" SELECT * FROM Images where id = @id
                    cn.Close();
                    cn.Open();
                    myReader = myCommand.ExecuteReader();

                    if (myReader.Read())
                    {
                        f2.txtname.text = (myReader["name"].ToString());
                        f2.txtsurname.text = (myReader["surname"].ToString());
                        f2.mrktxtcontct.Text = (myReader["contact"].ToString());
                        f2.txtourses.text = (myReader["course"].ToString());
                        f2.cmbduration.Text = (myReader["duration"].ToString());
                        f2.cmbmoth.Text = (myReader["moth"].ToString());
                        f2.mrktxtdate.Text = (myReader["jdate"].ToString());
                        f2.btnupdate.Visible = true;
                        f2.linkLabel1.Visible = false;
                        f2.txtid.Enabled = false;
                        f2.ShowDialog();

                        //f2. button1_Click(sender, e);
                        //          lblid.Text = "Record Found";
                    }
                    else
                    {
                        //            lblid.Text = "Not Found";
                    }

                }

            }
            catch
            {
                MessageBox.Show("Something Went Wrong !");
            }

            
        }
Ejemplo n.º 3
0
        private void btnfees_Click(object sender, EventArgs e)
        {
            studentfees stdfees = new studentfees();

            stdfees.ShowDialog();
        }