示例#1
0
        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();
                }
            }
        }
示例#2
0
        public static frmRelatorios GetChild(mdiPrincipal parent = null)
        {
            if (_childInstance == null)
            {
                _childInstance           = new frmRelatorios();
                _childInstance.MdiParent = parent;
            }

            return(_childInstance);
        }
示例#3
0
文件: frmPesagem.cs 项目: intxx0/SGP
        public static frmPesagem GetChild(mdiPrincipal parent = null)
        {
            if (_childInstance == null)
            {
                _childInstance           = new frmPesagem();
                _childInstance.MdiParent = parent;
            }

            return(_childInstance);
        }