private void EditRecord() { if (listView.SelectedItem != null) { var item = listView.SelectedItem; Session["selectedObject"] = _Storage[_Store.Name].GetStoreGroup(item.Text.Trim()); var editStoreGroup = new Forms.Store.StoreGroupEdit(); editStoreGroup.FormClosed += StoreGroupEdit_FormClosed; editStoreGroup.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.StoreGroup; oExportStore.ShowDialog(); break; case "editstoregroup": var editStoreGroup = new Forms.Store.StoreGroupEdit(); editStoreGroup.ShowDialog(); break; } } }