Exemplo n.º 1
0
        /// <summary>
        /// Open add form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddCollection_Click(object sender, RoutedEventArgs e)
        {
            var addFrom = new frmAddEditCollection(_collectionManager, _user.User);
            var result  = addFrom.ShowDialog();

            if (result == true)
            {
                refreshCollectionList(_user.User.UserID);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Open edit form and perform edit functionality
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEditCollection_Click(object sender, RoutedEventArgs e)
 {
     if (this.dgCollection.SelectedItems.Count > 0)
     {
         var editForm = new frmAddEditCollection(_collectionManager, (Collection)this.dgCollection.SelectedItem, CollectionForm.Edit);
         var result   = editForm.ShowDialog();
         if (result == true)
         {
             refreshCollectionList(_user.User.UserID);
         }
     }
     else
     {
         MessageBox.Show("You must select something!");
     }
 }