private void button1_Click(object sender, EventArgs e) { Manager.MainManager mm = new MainManager(user, conn); this.Hide(); mm.ShowDialog(); this.Close(); }
private void button1_Click(object sender, EventArgs e) { string user = textBox1.Text; string pass = textBox2.Text; MessageBox.Show(user + pass); //tolong ini nanti buat user admin ya win huehehehe if (user == pass && user.ToUpper() == "ADMIN") { this.Hide(); MainAdmin mm = new MainAdmin(); mm.ShowDialog(); this.Close(); } else { string role = ""; for (int i = 0; i < tabeluser.Rows.Count; i++) { Console.WriteLine(tabeluser.Rows[i].ItemArray[0].ToString() + tabeluser.Rows[i].ItemArray[1].ToString() + tabeluser.Rows[i].ItemArray[2].ToString()); if (user == tabeluser.Rows[i].ItemArray[0].ToString() && pass == tabeluser.Rows[i].ItemArray[1].ToString()) { role = tabeluser.Rows[i].ItemArray[2].ToString(); } } MessageBox.Show(role); if (role != "") { if (role == "CUSTOMER") { this.Hide(); MainClient mc = new MainClient(user.ToUpper()); mc.ShowDialog(); this.Close(); } else if (role == "FRONT OFFICE") { this.Hide(); Front_Office.FrontOfficeParent mf = new Front_Office.FrontOfficeParent(); mf.ShowDialog(); this.Close(); } else if (role == "MANAGER") { this.Hide(); Manager.MainManager mc = new Manager.MainManager(user.ToUpper(), conn); mc.ShowDialog(); this.Close(); }/* * if (role == "ADMIN") * { * this.Hide(); * MainClient mc = new MainClient(); * mc.ShowDialog(); * this.Close(); * }*/ } } }
private void ManagerKaryawan_Load(object sender, EventArgs e) { try { loadJabatan(); loadKaryawan(); } catch (Exception ex) { MessageBox.Show(ex.Message); Manager.MainManager mm = new MainManager(user, conn); this.Hide(); mm.ShowDialog(); this.Close(); } }
private void ManagerKamar_Load(object sender, EventArgs e) { numericUpDown1.Value = 0; try { refreshKamar(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); Manager.MainManager mm = new MainManager(user, conn); this.Hide(); mm.ShowDialog(); this.Close(); } }