private void barButtonItemAddNewDep_ItemClick(object sender, ItemClickEventArgs e) { XtraFormDepartment form = new XtraFormDepartment(); form.ShowDialog(); RefreshData(1); }
private void barButtonItemEditDep_ItemClick(object sender, ItemClickEventArgs e) { Department selectedDepartment = bindingSourceDepartment.Current as Department; if (selectedDepartment.IsNull()) { Extensions.Extensions.ObjectNotSelectedForEdit(); return; } XtraFormDepartment formDepartment = new XtraFormDepartment(selectedDepartment); formDepartment.ShowDialog(); RefreshData(1); }