コード例 #1
0
        private void barButtonItemAddNewDep_ItemClick(object sender, ItemClickEventArgs e)
        {
            XtraFormDepartment form = new XtraFormDepartment();

            form.ShowDialog();
            RefreshData(1);
        }
コード例 #2
0
        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);
        }