private void btnTimDocGia_Click(object sender, EventArgs e) { FormTimDocGia form = new FormTimDocGia(); form.Show(); this.Visible = false; form.Disposed += FormTimDG_Disposed; }
private void FormTimDG_Disposed(object sender, EventArgs e) { FormTimDocGia form = sender as FormTimDocGia; this.Visible = true; idDocGia = form.IdDocGiaChon; if (idDocGia != -1) { LoadDocGia(); } else { txtIDDocGia.Text = ""; txtTenDocGia.Text = ""; txtTongNo.Text = ""; } }
private void FormTimDG_Disposed(object sender, EventArgs e) { FormTimDocGia form = sender as FormTimDocGia; this.Visible = true; idDocGia = form.IdDocGiaChon; if (idDocGia != -1) { LoadDocGia(); } else { txtIDDocGia.Text = ""; txtTenDocGia.Text = ""; cbbSachMuonQuaHan.DataSource = null; txtSoLuongSachMuon.Text = ""; dtPickerNgayLapThe.Value = DateTime.Now; } }