private void EditRecord()
        {
            if (listView.SelectedItem != null)
            {
                var item    = listView.SelectedItem;
                var storage = (IAzManStorage)Session["storage"];
                var app     = (IAzManApplication)Session["selectedObject"];

                Session["selectedObject"] = app.GetApplicationGroup(item.Text.Trim());   // storage[store.Name][NetSqlAzManHelper.getName(pp.Label.Trim(), 0)].GetApplicationGroup(item.Text.Trim());
                var editag = new Forms.Application.ApplicationGroupEdit();
                editag.ShowDialog();
            }
        }
        private void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            if (!string.IsNullOrEmpty(e.Button.Name))
            {
                switch (e.Button.Name.ToLower())
                {
                case "columns":
                    ListViewColumnOptions objListViewColumnOptions = new ListViewColumnOptions(listView);
                    objListViewColumnOptions.ShowDialog();
                    break;

                case "sorting":
                    ListViewSortingOptions objListViewSortingOption = new ListViewSortingOptions(listView);
                    objListViewSortingOption.ShowDialog();
                    break;

                case "checkbox":
                    this.listView.CheckBoxes = !this.listView.CheckBoxes;

                    if (this.listView.CheckBoxes)
                    {
                        //this.ansList.Buttons[12].Visible = false;
                    }
                    break;

                case "multiselect":
                    this.listView.MultiSelect = !this.listView.MultiSelect;
                    e.Button.Pushed           = true;
                    break;

                case "refresh":
                    listView_Load();
                    break;

                case "export":
                    var oExportStore = new Forms.Export();
                    oExportStore.Type = Enums.AzManItemType.ApplicationGroup;
                    oExportStore.ShowDialog();
                    break;

                case "editapplicationgroup":
                    var editApplicationGroup = new Forms.Application.ApplicationGroupEdit();
                    editApplicationGroup.ShowDialog();
                    break;
                }
            }
        }