private void EditPersonBtn_Click(object sender, EventArgs e) { dynamic det_item = KAgentPersonsGridView.GetFocusedRow(); if (det_item == null) { return; } xtraTabControl1.SelectedTabPageIndex = 8; PersonBS.DataSource = _db.KAgentPersons.Find(det_item.PersonId); DirTreeList.FocusedNode = DirTreeList.FindNodeByFieldValue("DataSetId", det_item.PersonId); }
private void DelPersonBtn_Click(object sender, EventArgs e) { dynamic det_item = KAgentPersonsGridView.GetFocusedRow(); if (det_item == null) { return; } var a = _db.KAgentPersons.Find(det_item.PersonId); _db.KAgentPersons.Remove(a); _db.SaveChanges(); xtraTabControl1.SelectedTabPageIndex = 6; GetPersons(); }