private void btnadd_Click(object sender, EventArgs e) { frmAdd fa = new frmAdd(); fa.txtid.Visible = false; fa.ShowDialog(); Form1_Load(null, null); }
private void btnThem_Click(object sender, EventArgs e) { var f = new frmAdd(student); var rs = f.ShowDialog(); if (rs == DialogResult.OK) { /* bdsQuaTrinhHocTap.DataSource = * LearningHistoryService.getHistoryLearningFromFile(pathHistory, student.Id); * dgvQuaTrinhHocTap.DataSource = bdsQuaTrinhHocTap;*/ updateTable(LearningHistoryService.getHistoryLearningFromFile(pathHistory, student.Id)); } }
private void btnedit_Click(object sender, EventArgs e) { string v = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString(); ticket tc = new ticket(); tc.id = Int32.Parse(v); DataTable dt = tc.selectone(); frmAdd fa = new frmAdd(); fa.txtid.Visible = true; fa.txtid.Text = dt.Rows[0]["id"].ToString(); fa.txtname.Text = dt.Rows[0]["name"].ToString(); fa.txtfamily.Text = dt.Rows[0]["family"].ToString(); fa.txttel.Text = dt.Rows[0]["tel"].ToString(); fa.txtborn.Text = dt.Rows[0]["born"].ToString(); fa.ShowDialog(); Form1_Load(null, null); }