예제 #1
0
    //**********************************************
    //*  Name: GetCurrentUser()
    //*  Description: Locates currently logged in user, and displays his/her name in
    //*              "Presenter" dropdownlist
    private void GetCurrentUser()
    {
        var loggedUserProvider = new LoggedUserProvider();
        var loggedUser         = loggedUserProvider.GetLoggedUserFromNetworkId();

        txtPresenter.Text            = loggedUser.NameDisplay;
        Session["currentUser_empID"] = loggedUser.Employee_ID;
    }
예제 #2
0
    /// <summary>
    /// Gets the currently logged in user's customer ID and stores it within a session variable.
    /// </summary>
    /// <remarks>The Employee ID for the currently logged in user is stored in a session variable
    /// called "currentUser_empID".</remarks>
    private void GetCurrentUser()
    {
        var loggedUserProvider = new LoggedUserProvider();
        var loggedUser         = loggedUserProvider.GetLoggedUserFromNetworkId();
        var currentUserID      = loggedUser.Employee_ID;

        Session["currentUser_empID"] = currentUserID;
    }
예제 #3
0
    //**********************************************
    //*  Name: GetCurrentUser()
    //*  Description: Locates currently logged in user, and displays his/her name in
    //*              "Presenter" dropdownlist
    //****VARIABLES****
    //*  txtPresent      -local handle of txtPresenter
    //*  myConnection    -connection to sql database
    //*  ds              -dataset that holds all data
    //*  table           -a table used for searching through dataset for name
    //*  row             -a row used for searching through dataset for name
    //*  dataAdapter     -a data adapter used to find current user name in dropdownlist
    //*  i               -integer used for sorting
    //*  tempUser        -a temporary string used for various functions regarding the user name
    //*  currentUser     -a string variable for holding current user's name
    //*********************************************
    private void GetCurrentUser()
    {
        var loggedUserProvider = new LoggedUserProvider();
        var loggedUser         = loggedUserProvider.GetLoggedUserFromNetworkId();

        if (loggedUser != null)
        {
            txtPresenter.Text              = loggedUser.NameDisplay;
            Session["currentUser_empID"]   = loggedUser.Employee_ID;
            Session["currentUserIsLeader"] = loggedUser.IsSupervisor;

            GetPresenterTeam();
        }
        else
        {
            Session["currentUser_empID"]   = -99999999;
            Session["currentUserIsLeader"] = false;
        }
    }