private void button2_Click(object sender, EventArgs e) { label25.Size = new System.Drawing.Size(797, 450); label25.Visible = true; dedomena.log(); label25.Visible = false; label25.Size = new System.Drawing.Size(50, 50); int i = 0; do { if (textBox1.Text == dedomena.pertable[i, 3] && textBox2.Text == dedomena.pertable[i, 4] & dedomena.pertable[i, 5] == "1") { th = new Thread(opennewform); MessageBox.Show("WELCOME ADMINISTRATOR"); this.Close(); th.SetApartmentState(ApartmentState.STA); th.Start(); break; } else if (textBox1.Text == dedomena.pertable[i, 3] && textBox2.Text == dedomena.pertable[i, 4] & dedomena.pertable[i, 5] == "0") { th = new Thread(opennewform1); MessageBox.Show("WELCOME USER"); this.Close(); th.SetApartmentState(ApartmentState.STA); th.Start(); break; } i++; } while (i < dedomena.perlen); MessageBox.Show("Invalid Username or Password"); }
public Form2() { InitializeComponent(); listView1.Columns.Add("Id", +50, HorizontalAlignment.Left); listView1.Columns.Add("Name", +100, HorizontalAlignment.Left); listView1.Columns.Add("PRICE", +100, HorizontalAlignment.Left); listView1.Columns.Add("CODE", +100, HorizontalAlignment.Left); listView1.Columns.Add("POSITION", +100, HorizontalAlignment.Left); listView1.Columns.Add("AVAILABLE", +100, HorizontalAlignment.Left); listView3.Columns.Add("UID", +50, HorizontalAlignment.Left); listView3.Columns.Add("NAME", +100, HorizontalAlignment.Left); listView3.Columns.Add("LASTNAME", +100, HorizontalAlignment.Left); listView3.Columns.Add("USERNAME", +100, HorizontalAlignment.Left); label25.Visible = false; label25.SendToBack(); label25.Size = new System.Drawing.Size(50, 50); dedomena.scan(); dedomena.store(); dedomena.log(); }
public void logTest() { Classlistvi dataretes = new Classlistvi(); Assert.ReferenceEquals(1, dataretes.log()); }