Beispiel #1
0
        private void DeleteItem(int entryId)
        {
            try
            {
                ListController ctlLists = new ListController();

                // If this is the last entry of the list, delete list
                if (SelectedList.Count > 1)
                {
                    ctlLists.DeleteListEntryByID(entryId, true);
                    EnableView(true);
                    InitList();
                    BindListInfo();
                    BindTree();
                    BindGrid();
                }
                else
                {
                    ctlLists.DeleteListEntryByID(entryId, true);
                    BindTree();
                    this.rowListdetails.Visible = false;
                    this.rowEntryGrid.Visible   = false;
                    this.rowEntryEdit.Visible   = false;
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
 private void DeleteItem(int entryId)
 {
     if (SelectedListItems.Any())
     {
         try
         {
             var ctlLists = new ListController();
             ctlLists.DeleteListEntryByID(entryId, true);
             DataBind();
         }
         catch (Exception exc)                 //Module failed to load
         {
             Exceptions.ProcessModuleLoadException(this, exc);
         }
     }
     else
     {
         DeleteList();
     }
 }
 private void DeleteItem(int entryId)
 {
     if (SelectedListItems.Any())
     {
         try
         {
             var ctlLists = new ListController();
             ctlLists.DeleteListEntryByID(entryId, true);
             DataBind();
         }
         catch (Exception exc) //Module failed to load
         {
             Exceptions.ProcessModuleLoadException(this, exc);
         }
     }
     else
     {
         DeleteList();
     }
 }
        private void DeleteItem( int entryId )
        {
            try
            {
                ListController ctlLists = new ListController();

                // If this is the last entry of the list, delete list
                if (SelectedList.Count > 1)
                {
                    ctlLists.DeleteListEntryByID(entryId, true);
                    EnableView(true);
                    InitList();
                    BindListInfo();
                    BindTree();
                    BindGrid();
                }
                else
                {
                    ctlLists.DeleteListEntryByID(entryId, true);
                    BindTree();
                    this.rowListdetails.Visible = false;
                    this.rowEntryGrid.Visible = false;
                    this.rowEntryEdit.Visible = false;
                }

            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }

        }