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;
        }
Пример #2
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";
        }