private void InitializeMainGrid()
        {
            GetMyAccessRights();

            User user = new User();
            if (myAccessRights.CanAdd == true)
            {
                if (dropDownListDepartment.SelectedItem.Text == "All" && user.GetActiveUsersWithoutSupervisor().Count > 0)
                {
                    linkBtnAdd.Visible = true;
                }
                else if (user.GetActiveUsersWithoutSupervisor(Convert.ToInt32(dropDownListDepartment.SelectedItem.Value)).Count > 0)
                {
                    linkBtnAdd.Visible = true;
                }
                else
                    linkBtnAdd.Visible = false;
            }
            else
                linkBtnAdd.Visible = false;

            List<User> userlist = new List<User>();
            if (dropDownListDepartment.SelectedItem.Text == "All")
            {
                userlist = user.GetActiveUsersWithSupervisor();
            }
            else
            {
                userlist = user.GetActiveUsersWithSupervisor(Convert.ToInt32(dropDownListDepartment.SelectedItem.Value));
            }

            gridViewUser.DataSource = userlist;
            gridViewUser.DataBind();
        }
 protected void InitializeModalDropDownUsers(int userid = 0)
 {
     User user = new User();
     List<User> userlist = new List<User>();
     if (userid == 0)
     {
         if (dropDownListDepartment.SelectedItem.Text == "All")
         {
             userlist = user.GetActiveUsersWithoutSupervisor();
         }
         else
         {
             userlist = user.GetActiveUsersWithoutSupervisor(Convert.ToInt32(dropDownListDepartment.SelectedItem.Value));
         }
     }
     else
     {
         user = user.GetUser(userid);
         userlist.Add(user);
     }
     modalDropDownUsers.DataSource = userlist;
     modalDropDownUsers.DataTextField = "fullname";
     modalDropDownUsers.DataValueField = "Id";
     modalDropDownUsers.DataBind();
 }