Esempio n. 1
0
        private void Button_Atualizar(object sender, RoutedEventArgs e)
        {
            ModJogador x = new ModJogador();

            x.Nome       = nometxt.Text;
            x.Nascimento = DateTime.Parse(nasctxt.Text);
            x.Fone       = fonetxt.Text;
            x.Posicao    = posicaotxt.Text;
            x.NumCamisa  = int.Parse(numcatxt.Text);
            x.Email      = emailtxt.Text;
            x.Id         = int.Parse(idjog.Text);

            NegJogador y = new NegJogador();

            y.UpdateJogador(x);

            nometxt.Text    = "";
            emailtxt.Text   = "";
            fonetxt.Text    = "";
            idjog.Text      = "";
            nasctxt.Text    = "";
            posicaotxt.Text = "";
            numcatxt.Text   = "";

            SelectClick(sender, e);
        }
        private void Button_Atualizar(object sender, RoutedEventArgs e)
        {
            ModJogador x = new ModJogador();

            x.Id         = int.Parse(idjogtxt2.Text);
            x.Nome       = nometxt.Text;
            x.Fone       = fonetxt.Text;
            x.Email      = emailtxt.Text;
            x.NumCamisa  = int.Parse(numcatxt.Text);
            x.Fone       = fonetxt.Text;
            x.Nascimento = DateTime.Parse(nasctxt.Text);
            NegJogador n = new NegJogador();

            n.UpdateJogador(x);
            nometxt.Text          = "";
            emailtxt.Text         = "";
            fonetxt.Text          = "";
            senhatxt.Password     = "";
            posicaotxt.Text       = "";
            numcatxt.Text         = "";
            confsenhatxt.Password = "";
            foto           = string.Empty;
            idjogtxt2.Text = "";
            nasctxt.Text   = "";
        }