private void Backbtn_Click(object sender, EventArgs e) { this.Hide(); ManagerMain sm = new ManagerMain(); sm.Show(); }
private void button1_Click(object sender, EventArgs e) { this.Hide(); ManagerMain f4 = new ManagerMain(); f4.Show(); }
private void back_btn_Click(object sender, EventArgs e) { this.Hide(); ManagerMain f1 = new ManagerMain(); f1.Show(); }
private void button1_Click(object sender, EventArgs e) { studentMain st = new studentMain(); InstructorMain ins = new InstructorMain(); ManagerMain ma = new ManagerMain(); string path; int flag = 0; string un = textBoxun.Text; string ps = textBoxps.Text; path = "student.txt"; if (FindUser(un, ps, path)) { st.Show(); flag = 1; } path = "instructor.txt"; if (FindUser(un, ps, path)) { ins.Show(); flag = 1; } path = "manager.txt"; if (FindUser(un, ps, path)) { ma.Show(); flag = 1; } if (flag == 0) { ERE.Text = "Wrong password or ID"; } }
private void Back_Click(object sender, EventArgs e) { this.Hide(); ManagerMain f = new ManagerMain(); f.Show(); }
private void backBTN_Click(object sender, EventArgs e) { this.Hide(); ManagerMain b = new ManagerMain(); b.Show(); }
private void sendBTN_Click(object sender, EventArgs e) { studentMain st = new studentMain(); InstructorMain ins = new InstructorMain(); ManagerMain ma = new ManagerMain(); int flag = 0; string un = textBoxun.Text; if (un != "") { if (FindUser(un, "student.txt")) { flag = 1; } else if (FindUser(un, "instructor.txt")) { flag = 1; } else if (FindUser(un, "manager.txt")) { flag = 1; } if (flag == 1) { char s = ' '; StreamReader mi = new StreamReader("user.txt"); string line = mi.ReadLine(); string[] details = line.Split(' '); string idM = details[0]; mi.Close(); string message = un + s + idM + s + textBoxMessage.Text + "\r\nEOMessage"; StreamWriter mw = new StreamWriter("messages.txt", true); mw.WriteLine(message); mw.Close(); messageLBL.Text = "Message sent"; } else { messageLBL.Text = "Wrong password or ID"; } } else { messageLBL.Text = "Fill in the ID or message"; } }
private void button1_Click(object sender, EventArgs e) { studentMain st = new studentMain(); InstructorMain ins = new InstructorMain(); ManagerMain ma = new ManagerMain(); string un = textBoxun.Text; string ps = textBoxps.Text; if (!(string.IsNullOrWhiteSpace(un) && string.IsNullOrWhiteSpace(ps))) { checkUsernamePassword(un, ps); if (FindUser(un, ps, "student.txt")) { this.Hide(); st.Show(); } else if (FindUser(un, ps, "instructor.txt")) { this.Hide(); Task.Delay(1000); ins.Show(); } else if (FindUser(un, ps, "manager.txt")) { this.Hide(); Task.Delay(1000); ma.Show(); } else { ERE.Text = "Wrong password or ID"; } } else { ERE.Text = "Fill in the password and ID"; } }