private void Log() { Menu_Opciones menu = new Menu_Opciones(); Menú_Coordinador mc = new Menú_Coordinador(); Metodos log = new Metodos(); if (string.IsNullOrWhiteSpace(textBox1.Text) == false && string.IsNullOrWhiteSpace(textBox2.Text) == false) { if (log.login(textBox1.Text, textBox2.Text) == "Administrador") { cargo = "Administrador"; this.Hide(); menu.ShowDialog(); textBox1.Clear(); textBox2.Clear(); this.Show(); textBox1.Focus(); } } else { MessageBox.Show("Espacios Vacios", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Warning); } if (string.IsNullOrWhiteSpace(textBox1.Text) == false && string.IsNullOrWhiteSpace(textBox2.Text) == false) { if (log.login(textBox1.Text, textBox2.Text) == "Coordinador") { cargo = "Coordinador"; this.Hide(); mc.ShowDialog(); textBox1.Clear(); textBox2.Clear(); this.Show(); textBox1.Focus(); } } if (string.IsNullOrWhiteSpace(textBox1.Text) == false && string.IsNullOrWhiteSpace(textBox2.Text) == false) { if (log.login(textBox1.Text, textBox2.Text) == string.Empty) { MessageBox.Show("Datos incorrectos", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error); textBox1.Clear(); textBox2.Clear(); textBox1.Focus(); } } }