private void button2_Click(object sender, EventArgs e) { myConnection.entry(this.forum.Text); string Temp = textBox1.Text; Int64 IntTemp = Convert.ToInt64(Temp); if (myConnection.EmailConfirm(IntTemp, this.userName.Text)) { MessageBox.Show("ברכותי הינך חבר רשום ומאושר"); panel1.Visible = false; } else { MessageBox.Show("הקוד שגוי אנא נסה בשנית"); } }
private void button1_Click(object sender, EventArgs e) { int i; string myText = ""; for (i = 0; i < listBox2.Items.Count; i++) { if (listBox2.GetSelected(i)) { myText = (string)listBox2.Items[i]; break; } } if (myConnection.entry(myText)) { List <ForumInfo> ForumInfoList = myConnection.WatchAllForums(); CurrentState.myForum = ForumInfoList.ElementAt(i); panel1.Visible = true; } else { MessageBox.Show("cant connet to " + myText); } }
public void TestEntry() //need to return true only to value "test1" { Assert.IsTrue(forum.entry("test1")); Assert.IsFalse(forum.entry("test2")); }