Пример #1
0
 private void OpenInsuranceDetail()
 {
     if (InsuranceListBindingSource.Current != null)
     {
         var inv  = new InsuranceView();
         var data = InsuranceListBindingSource.Current as EquipmentInsurance;
         inv.ShowObject(data);
         inv.ShowDialog();
     }
 }
Пример #2
0
        private void newToolStripButton_Click(object sender, EventArgs e)
        {
            var iv   = new InsuranceView();
            var data = new EquipmentInsurance();

            iv.ShowObject(data);
            var result = iv.ShowDialog();

            if (result == DialogResult.OK)
            {
                _equipment.Insurance.Add(iv.CurrentObject);
            }
        }