Example #1
0
        private void gridControl3_DoubleClick(object sender, EventArgs e)
        {
            var record = insuranceHistoryBindingSource.Current as InsurancePolicy;
            var dialog = new InsuranceEdit();

            dialog.ShowObject(record);
            dialog.ShowDialog();
        }
Example #2
0
        private void AddInsuranceRecord()
        {
            var record = new InsurancePolicy()
            {
                VehicleId = this.vehicle.VehicleId
            };
            var dialog = new InsuranceEdit();

            dialog.ShowObject(record);
            var result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                this.vehicle.InsuranceHistory.Add(dialog.Current);
            }
        }