Ejemplo n.º 1
0
        private void ShowPanel(PanelType type)
        {
            HidePanels();

            if (type == PanelType.LOGIN)
            {
                pnlLogin.Show();
            }
            else if (type == PanelType.FORGOT)
            {
                pnl_ForgotPassword.Show();
                FORGOT_pnlCode.Hide();
                FORGOT_pnlChange.Hide();
            }
            else if (type == PanelType.USERSETTINGS)
            {
                pnl_Menu.Show();
                pnl_UserSettings.Show();
            }
            else if (type == PanelType.DASHBOARD)
            {
                InitDashBoard();

                pnl_Menu.Show();
                pnl_Dashboard.Show();
            }
            else if (type == PanelType.USERMANAGEMENT)
            {
                // Clean or add filter text
                USER_txtFilter.Text       = "Filter by choice";
                USER_txtFilter.GotFocus  += new EventHandler(RemoveText);
                USER_txtFilter.LostFocus += new EventHandler(AddText);

                // Start filtering selection at 1 aka Email
                USER_cbFilter.SelectedIndex = 1;

                // Init listview
                InitUserListView();

                pnl_Menu.Show();
                pnlUser.Show();
            }
            else if (type == PanelType.INCIDENTMANAGEMENT)
            {
                // Clean or add filter text
                TICKETS_txtFilter.Text       = "Filter by email";
                TICKETS_txtFilter.GotFocus  += new EventHandler(RemoveTextEmail);
                TICKETS_txtFilter.LostFocus += new EventHandler(AddTextEmail);

                // Start filtering selection at 2 aka User
                TICKETS_comboFilter.SelectedIndex = 2;

                // Init listview
                InitTicketOverview();

                // Show remove button if employee level access
                if (authenticationService.GetCurrentUser().Type == UserType.Employee)
                {
                    TICKET_btnRemove.Visible = true;
                }
                else
                {
                    TICKET_btnRemove.Visible = false;
                }

                pnl_Menu.Show();
                pnlTicketOverview.Show();
            }
        }
Ejemplo n.º 2
0
 private void FORGOT_btnNewCode_Click(object sender, EventArgs e)
 {
     FORGOT_pnlUsername.Show();
     FORGOT_pnlCode.Hide();
     FORGOT_pnlChange.Hide();
 }