private bool valid() { bool x = true; string pass = Db.SingleString( "SELECT Pass FROM USERNAME WHERE UserID = '" + Act.UserID + "'"); if (passbaru.Text == Cf.NullMD5() || passbaru.Text != passconfirm.Text || passbaru.Text == pass) { x = false; } if (!x) { string scr = ""; if (dariLogin.Checked) { scr = "document.getElementById('passbaru').focus();"; } Js.Alert( this , "Input Tidak Valid.\\n\\n" + "Aturan Pengisian :\\n" + "1. Password Baru tidak boleh kosong.\\n" + "2. Password Baru dan Confirm Password Baru harus sama.\\n" + "3. Password Baru tidak boleh sama dengan Password Lama.\\n" , scr ); } return(x); }