Пример #1
0
        private void partsGridControl_DoubleClick(object sender, EventArgs e)
        {
            var selected = maintenancePartsBindingSource.Current as MaintenancePart;
            var dialog   = new MaintenancePartEdit();

            dialog.ShowObject(selected);
            dialog.ShowDialog(this);
        }
Пример #2
0
        private void addPartBarButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var dialog = new MaintenancePartEdit();

            dialog.ShowObject(null);
            var result = dialog.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                var item = dialog.GetCurrentObject();
                this.maintenance.MaintenanceParts.Add(item);
            }
        }