コード例 #1
0
        private void AddMaintenanceRecord()
        {
            var selected = (VehicleInfo)vehicleListBindingSource.Current;
            var dialog   = new MaintenanceEdit();

            dialog.ShowObject(selected);
            dialog.ShowDialog();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
 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);
     //}
 }