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

                Session["selectedObject"] = app.GetItem(item.Text.Trim());
                var auth = new Forms.Authorization.ManageAuthorization();
                auth.ShowDialog();
                Session["selectedObject"] = app;
            }
        }
Exemplo n.º 2
0
        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 "manageauthorization":
                    var manageAuth = new Forms.Authorization.ManageAuthorization();
                    manageAuth.ShowDialog();
                    break;
                }
            }
        }