private void btnOk_Click(object sender, EventArgs e) { string errors = ""; if (txtUsuario.Text.ToString() == "") { errors += " - Preencha o campo \"Usuário\"\n"; } if (txtSenha.Text.ToString() == "") { errors += " - Preencha o campo \"Senha\"\n"; } if (errors.ToString() != "") { MessageBox.Show("Ocorreram os seguintes erros:\n\n" + errors.ToString(), "Erro"); } else { if (Session.Session.Auth(txtUsuario.Text.ToString(), txtSenha.Text.ToString())) { mdiPrincipal Frm = new mdiPrincipal(); Frm.Show(); this.Visible = false; } else { MSGLOGINERRO(); } } }
public static frmRelatorios GetChild(mdiPrincipal parent = null) { if (_childInstance == null) { _childInstance = new frmRelatorios(); _childInstance.MdiParent = parent; } return(_childInstance); }
public static frmPesagem GetChild(mdiPrincipal parent = null) { if (_childInstance == null) { _childInstance = new frmPesagem(); _childInstance.MdiParent = parent; } return(_childInstance); }