Пример #1
0
        private void NewItem()
        {
            var form = new ItemDetail();

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

            if (result == DialogResult.OK)
            {
                RefreshList();
            }
        }
Пример #2
0
 private void LoadSelectedItem()
 {
     try
     {
         var item = itemListBindingSource.Current as ItemInfo;
         var form = new ItemDetail();
         form.ShowObject(item);
         var result = form.ShowDialog(this);
         if (result == DialogResult.OK)
         {
             RefreshList();
         }
     }
     catch (Exception exception)
     {
         ViewHelper.ShowErrorMessage("Error loading Item information", exception);
     }
 }