private void btn_add_Click(object sender, EventArgs e) { var form = new AddContact(); this.Hide(); form.ShowDialog(); this.Show(); this.Focus(); }
private void dataGV_person_MouseDoubleClick(object sender, MouseEventArgs e) { if (dataGV_person.SelectedRows.Count == 1) { this.Hide(); int cotacatid; int.TryParse(dataGV_person.SelectedRows[0].Cells[0].Value.ToString(), out cotacatid); var form = new AddContact(cotacatid); form.ShowDialog(); this.Show(); this.Focus(); ContactsEntities db = new ContactsEntities(); _allperson = db.ContactPerson.ToList(); Search(); } }