private void EditUser_Load(object sender, EventArgs e)
        {
            HttpWebRequest  request;
            HttpWebResponse response;
            string          content;

            teamLeaders = UserRequsts.GetAllTeamLeaders();
            //fill comboBox with team leaders
            comboBoxTeamLeaderEdit.DataSource    = teamLeaders;
            comboBoxTeamLeaderEdit.ValueMember   = "UserId";
            comboBoxTeamLeaderEdit.DisplayMember = "UserName";


            //fill comboBox with userKinds
            usersKind = UsersKindRequst.GetAllUsersKind();
            comboBoxUserKindEdit.DataSource    = usersKind;
            comboBoxUserKindEdit.ValueMember   = "KindUserId";
            comboBoxUserKindEdit.DisplayMember = "KindUserName";

            //get all the workers and fill the combobox
            allUsers = UserRequsts.GetAllUsers();
            comboBoxAllUsers.SelectedIndexChanged -= new EventHandler(ComboBoxAllUsers_SelectedIndexChanged);
            comboBoxAllUsers.DataSource            = allUsers;
            comboBoxAllUsers.ValueMember           = "UserId";
            comboBoxAllUsers.DisplayMember         = "UserName";

            comboBoxAllUsers.SelectedIndexChanged += ComboBoxAllUsers_SelectedIndexChanged;
        }
        private void AddProject_Load(object sender, EventArgs e)
        {
            HttpWebRequest  request;
            HttpWebResponse response;
            string          content;

            //fill comboBox With teamLeaders
            teamLeaders = UserRequsts.GetAllTeamLeaders();
            comboBoxTeamLeader.DataSource    = teamLeaders;
            comboBoxTeamLeader.ValueMember   = "UserId";
            comboBoxTeamLeader.DisplayMember = "UserName";

            //get all the another workers
            allUsers = UserRequsts.GetAllUsers();
        }
Пример #3
0
        private void RemoveUser_Load(object sender, EventArgs e)
        {
            HttpWebRequest  request;
            HttpWebResponse response;
            string          content;

            teamLeaders = UserRequsts.GetAllTeamLeaders();


            //fill comboBox with userKinds
            usersKind = UsersKindRequst.GetAllUsersKind();


            //get all the workers and fill the combobox
            allUsers = UserRequsts.GetAllUsers();

            comboBox1.DataSource    = allUsers;
            comboBox1.ValueMember   = "UserId";
            comboBox1.DisplayMember = "UserName";
        }