Пример #1
0
        public void AddUserTestanowak()
        {
            login        = "******";
            password     = "******";
            password2    = "12345";
            firstName    = "Andrzej";
            surName      = "Nowak";
            departmentId = "IT";
            SuperVisorUsers superV = new SuperVisorUsers();

            actualstring   = superV.AddUser(login, password, password2, firstName, surName, departmentId);
            expectedstring = "userExists";

            Assert.AreEqual(expectedstring, actualstring);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string Login = ""; string Password = ""; string FirstName = ""; string SurName = ""; string DepartmentName = ""; string password2 = "";

            try
            {
                Login     = txtLogin.Text;
                Password  = txtPassword.Text;
                FirstName = txtLogin.Text;
                SurName   = txtNazwisko.Text;
                password2 = txtPassword2.Text;

                DepartmentName = cmbBoxUsersDepartment.SelectedItem.ToString();
            }
            catch
            {
            }
            SuperVisorUsers superV = new SuperVisorUsers();

            superV.AddUser(Login, Password, password2, FirstName, SurName, DepartmentName);
            refreshUserList();
        }