package com.example.test;

import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

public class Edit extends AppCompatActivity {


    Bundle arg;
    DataModal dataModal;
    EditText N,S,P,Sub;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_edit);

        arg = getIntent().getExtras();
        dataModal = arg.getParcelable(DataModal.class.getSimpleName());

        N = findViewById(R.id.N);
        N.setText(dataModal.getName());
        S = findViewById(R.id.S);
        S.setText(dataModal.getSurname());
        P = findViewById(R.id.P);
        P.setText(dataModal.getPatronymic());
        Sub = findViewById(R.id.Sub);
        Sub.setText(dataModal.getSubject());


    }

    public  void btnBack()
    {
        Intent intent = new Intent(Edit.this, MainActivity.class);
        startActivity(intent);
    }

}