private void inputPassword_Click(object sender, EventArgs e) { String password = Password.Text.ToString(); String password1 = CfPassword.Text.ToString(); if (CheckNullPassword(password, password1)) { MessageBox.Show("Success"); } else { if (checkMatch(password, password1)) { if (checkLength(password)) { user.Password = Password.Text.ToString(); EditUserService edt = new EditUserService(); edt.editUser(user); MessageBox.Show("Success"); } else { MessageBox.Show("กรุณากรอก Password ให้อยู่ในระหว่าง 8-16 ตัว"); } } else { MessageBox.Show("กรุณากรอก Password ให้ตรงกัน"); } } }
private void inputName_Click(object sender, EventArgs e) { String Name = name.Text.ToString(); if (checkNullName(Name)) { MessageBox.Show("กรุณากรอก Name"); } else { user.Username = name.Text.ToString(); EditUserService edt = new EditUserService(); edt.editUser(user); MessageBox.Show("Success"); } }