Пример #1
0
        public Details(SzwalniaEntities db, String employeeLastName)
        {
            InitializeComponent();
            Pracownicy employee = db.Pracownicy.Where(pracownik => pracownik.Nazwisko == employeeLastName).First();

            lblTitle.Text    = employee.Imie.TrimEnd() + " " + employee.Nazwisko;
            txtName.Text     = employee.Imie;
            txtLastName.Text = employee.Nazwisko;
            txtPesel.Text    = employee.Pesel;
            txtAddress.Text  = employee.Adres;

            dgvRecordsList.DataSource = db.vZatrudnienie.Where(employment => employment.ID_Pracownika == employee.ID_Pracownika).ToList();
        }
Пример #2
0
 public Form1()
 {
     InitializeComponent();
     btnChange.Enabled = false;
     db = new SzwalniaEntities();
 }