Ejemplo n.º 1
0
        private void ListViewMenuSelectionChanged(object sender, SelectionChangedEventArgs selectionChangedEventArgs)
        {
            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ListViewItemHome":
                HomeEmployee home = new HomeEmployee();
                home.InitializeMenu();
                home.Show();
                Close();
                break;

            case "ListViewItemAccountEdit":
                AccountEdition accountEdition = new AccountEdition();
                accountEdition.InitializeMenu();
                accountEdition.Show();
                Close();
                break;

            case "ListViewItemBehind":
                ServiceOffered serviceOffered = new ServiceOffered();
                serviceOffered.InitializeMenu();
                serviceOffered.Show();
                Close();
                break;

            case "ListViewItemChat":
                ChatList chatList = new ChatList();
                chatList.InitializeMenu();
                chatList.Show();
                Close();
                break;

            case "ListViewItemRequest":
                RequestsReceivedList requestReceivedList = new RequestsReceivedList();
                requestReceivedList.InitializeMenu();
                requestReceivedList.Show();
                Close();
                break;

            case "ListViewItemServiceRegistration":
                ServiceRegistry serviceRegistry = new ServiceRegistry();
                serviceRegistry.InitializeMenu();
                serviceRegistry.Show();
                Close();
                break;

            case "ListViewItemCommentTracing":
                ReportGeneration reportGeneration = new ReportGeneration();
                reportGeneration.InitializeMenu();
                reportGeneration.Show();
                Close();
                break;

            default:
                break;
            }
        }
Ejemplo n.º 2
0
        private void ListViewMenuSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ListViewItemHome":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    HomeClient home = new HomeClient();
                    home.InitializeMenu();
                    home.Show();
                    Close();
                }
                else
                {
                    HomeEmployee home = new HomeEmployee();
                    home.InitializeMenu();
                    home.Show();
                    Close();
                }
                break;

            case "ListViewItemChat":
                ChatList chatList = new ChatList();
                chatList.InitializeMenu();
                chatList.Show();
                Close();
                break;

            case "ListViewItemRequest":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    RequestsMadeList requestsMadeList = new RequestsMadeList();
                    requestsMadeList.InitializeMenu();
                    requestsMadeList.Show();
                    Close();
                }
                else
                {
                    RequestsReceivedList requestReceivedList = new RequestsReceivedList();
                    requestReceivedList.InitializeMenu();
                    requestReceivedList.Show();
                    Close();
                }
                break;

            case "ListViewItemServiceRegistration":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    AccountActivate accountActivate = new AccountActivate();
                    accountActivate.InitializeMenu();
                    accountActivate.Show();
                    Close();
                }
                else
                {
                    ServiceRegistry serviceRegistry = new ServiceRegistry();
                    serviceRegistry.InitializeMenu();
                    serviceRegistry.Show();
                    Close();
                }
                break;

            case "ListViewItemCommentTracing":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    CommentClient commentClient = new CommentClient();
                    commentClient.InitializeMenu();
                    commentClient.Show();
                    Close();
                }
                else
                {
                    ReportGeneration reportGeneration = new ReportGeneration();
                    reportGeneration.InitializeMenu();
                    reportGeneration.Show();
                    Close();
                }
                break;

            default:
                break;
            }
        }