finished db3

This commit is contained in:
EggMan20339 2024-02-15 12:04:47 -05:00
parent d9dcf41695
commit e96d4459e3
2 changed files with 7 additions and 4 deletions

View File

@ -7,15 +7,18 @@ namespace Database3
{
public partial class frmEdit : Form
{
public frmEdit()
private frmSearch forminstance;
public frmEdit(frmSearch there)
{
InitializeComponent();
forminstance = there;
}
private void Form_Closing(object sender, FormClosingEventArgs e)
{
frmSearch.btnSearch_Click(sender, e);
forminstance.btnSearch_Click(sender, e);
}

View File

@ -28,7 +28,7 @@ namespace Database3
if (dgvStudents.Rows.Count > 0)
{
DataGridViewRow row = dgvStudents.SelectedRows[0];
frmEdit aform = new frmEdit();
frmEdit aform = new frmEdit(this);
studentid = row.Cells[0].Value.ToString().Trim();
myID = studentid;
@ -40,7 +40,7 @@ namespace Database3
public void btnSearch_Click(object sender, EventArgs e)
public void btnSearch_Click(object sender, EventArgs e)
{
string studentid = "9999999999";
string lname = "9999999999";