private void AddMaintenanceRecord() { var selected = (VehicleInfo)vehicleListBindingSource.Current; var dialog = new MaintenanceEdit(); dialog.ShowObject(selected); dialog.ShowDialog(); }
private void OpenRecord(Maintanance item) { var form = new MaintenanceEdit(); var obj = context.MaintenanceInfoes.FirstOrDefault(i => i.MaintenanceId == item.MaintenanceId); form.MdiParent = this.MdiParent; form.ShowObject(obj); form.Show(); }
public void OpenSelectedItem() { var selected = maintenanceListBindingSource.Current as MaintenanceInfo; if (null != selected) { var form = new MaintenanceEdit(); form.MdiParent = this.MdiParent; form.ShowObject(selected); form.Show(); } }
private void AddMaintenance() { var record = new Maintanance() { VehicleId = this.vehicle.VehicleId }; var dialog = new MaintenanceEdit(); var result = dialog.ShowDialog(); //if (result == DialogResult.OK) //{ // this.vehicle.InsuranceHistory.Add(dialog.Current); //} }