private void update_button_Click(object sender, EventArgs e) { if (Student_Detail_dataGridView.Rows.Count > 0) { int selectedRow = Student_Detail_dataGridView.Rows.GetFirstRow(DataGridViewElementStates.Selected); int Grno = Convert.ToInt32(Student_Detail_dataGridView.Rows[selectedRow].Cells["Grno"].Value); DataTable dt = Student_Methods.loadStudentDetails_Form(Grno); studadd = new StudentAdmission(LoadUpdateForm(dt), this); if (update_button.Text.Equals("View Student Details", StringComparison.OrdinalIgnoreCase)) { studadd.isReadOnly = true; } studadd.isUpdate = true; studadd.TopLevel = false; studadd.Parent = ClassCall.mainFormObj.masterpanel; studadd.Dock = DockStyle.Fill; studadd.BringToFront(); studadd.Focus(); studadd.Show(); this.Dispose(); } }
private void StudentAddmission_Click(object sender, EventArgs e) { StudentAdmission studadd = new StudentAdmission(); FormCall(studadd); }