Beispiel #1
0
        public void AtualizaTela()
        {
            if (modotela =="consulta")
            {
                groupCadastra.Visible = false;
                groupPesquisa.Visible = true;
                groupDetalhe.Visible = false;
            }

            else if (modotela =="alteracao")
            {
                groupCadastra.Visible = true;
                groupPesquisa.Visible = false;
                groupDetalhe.Visible = false;

                if (codCLienteJogar != 0)
                {
                    pClienteJogar cliente = new pClienteJogar();
                    DataSet retorno;

                    retorno = cliente.GetClientByCod(codCLienteJogar);

                    txtNome.Text = retorno.Tables[0].Rows[0]["Nome"].ToString();
                    txtRG.Text = retorno.Tables[0].Rows[0]["RG"].ToString();
                    txtEmail.Text = retorno.Tables[0].Rows[0]["Email"].ToString();
                    txtPSN.Text = retorno.Tables[0].Rows[0]["PSN"].ToString();
                    txtSenha.Text = retorno.Tables[0].Rows[0]["Senha"].ToString();
                    txtTelefone.Text = retorno.Tables[0].Rows[0]["Telefone"].ToString();
                    txtObs.Text = retorno.Tables[0].Rows[0]["Obs"].ToString();

                }
            }
            else if (modotela == "detalhe")
            {
                groupDetalhe.Visible = true;
                groupCadastra.Visible = false;
                groupPesquisa.Visible = false;

                DataSet retorno;
                pClienteJogarDivida _pdivida = new pClienteJogarDivida();

                retorno = _pdivida.GetDivida(codCLienteJogar);
                lblDivida.Text = retorno.Tables[0].Rows[0]["divida"].ToString();
            }
            else if (modotela == "cadastra")
            {
                groupCadastra.Visible = true;
                groupPesquisa.Visible = false;
            }
        }
Beispiel #2
0
        private void button6_Click(object sender, EventArgs e)
        {
            pClienteJogar pClienteLocacao = new pClienteJogar();

            DataSet set = pClienteLocacao.GridCLiente();

            lvPesquisa.CarregaLv(set);
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Model.ClienteJogar _cli = new Model.ClienteJogar();

                _cli.Nome = txtNome.Text;
                _cli.RG = txtRG.Text;
                _cli.Email = txtEmail.Text;
                _cli.PSN = txtPSN.Text;
                _cli.Senha = txtSenha.Text;
                _cli.Telefone = txtTelefone.Text;
                _cli.Obs = txtObs.Text;

                pClienteJogar locacao = new pClienteJogar();

                locacao.CadastrarCliente(_cli);
            }
            catch (Exception)
            {
                    
                throw;
            }
        }