Ejemplo n.º 1
0
 private void EditRecord()
 {
     if (listView.SelectedItem != null)
     {
         var item    = listView.SelectedItem;
         var storage = (IAzManStorage)Session["storage"];
         Session["selectedObject"] = storage[item.Text.Trim()];
         var oEditStore = new Forms.Store.Store();
         oEditStore.ShowDialog();
     }
 }
Ejemplo 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 "export":
                    var oExport = new Forms.Export();
                    oExport.Type = Enums.AzManItemType.Storage;
                    oExport.ShowDialog();
                    break;

                case "import":
                    var oImport = new Forms.Import();
                    oImport.Type = Enums.AzManItemType.Storage;
                    oImport.ShowDialog();
                    break;

                case "editstore":
                    #region Edit selected store
                    EditRecord();
                    break;

                    #endregion
                case "newstore":
                    #region New store
                    Session["selectedObject"] = null;
                    var oNewStore = new Forms.Store.Store();
                    oNewStore.ShowDialog();
                    break;
                    #endregion
                }
            }
        }
Ejemplo n.º 3
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":
                    #region Refresh
                    listView_Load();
                    Update();
                    break;

                    #endregion
                case "hierarchyview":
                    var oHierarchyView = new Forms.Store.HierarchyView();
                    oHierarchyView.ShowDialog();
                    break;

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

                case "import":
                    var oImport = new Forms.Import();
                    oImport.Type = Enums.AzManItemType.Store;
                    oImport.ShowDialog();
                    break;

                case "storeproperties":
                    #region Edit Store properties
                    var oEditStore = new Forms.Store.Store();
                    oEditStore.ShowDialog();
                    break;

                    #endregion
                case "editapplication":
                    #region Edit application
                    EditRecord();
                    break;

                    #endregion
                case "newapplication":
                    #region New application
                    var oNewApplication = new Forms.Application.Application();
                    oNewApplication.FormClosed += Application_FormClosed;
                    oNewApplication.ShowDialog();
                    break;
                    #endregion
                }
            }
        }