private void EditOrganization_Click(object sender, RoutedEventArgs e) { using (var Db = new ResourceModel()) { MessageBox.Show(Db.EditDepartmentOrOrganization(Db.ConvertorObjectInInt(DGR.SelectedValue), TB_Title.Text, "Organization")); Update(); } }