コード例 #1
0
ファイル: MenuForm.cs プロジェクト: tesqie/RestaurantPOSApp
 //On login Click, checks if the emplyee username and password are in the DB
 private void button2_Click(object sender, EventArgs e)
 {
     Get_Data();
     DataRow[] dr = ds.Employees.Select();
     foreach (DataRow d in dr)
     {
         if (d[2].ToString() == textBox4.Text && d[3].ToString() == textBox5.Text)
         {
             employeeId   = d[0].ToString();
             this.Visible = false;
             panel6.Hide();
             if (!tableFormInit)
             {
                 tablesForm = new Tables(this);
                 tablesForm.Show(this);
                 tableFormInit = true;
             }
             else
             {
                 tablesForm.Show(this);
             }
             return;
         }
     }
     MessageBox.Show("Invalid Username/Password combination");
 }
コード例 #2
0
 private void tableToolStripMenuItem_Click(object sender, EventArgs e)
 {
     tableForm.Show();
     this.Close();
 }