public void updatePeople(People p,string surname, string firstname, string password, string comment) { p.Firstname = firstname; p.Surname = surname; p.Password = password; p.Comment = comment; }
private void btnDeletePeople_Click(object sender, EventArgs e) { if (this.dgvPeople.SelectedRows.Count > 0) { _target = (People)this.dgvPeople.SelectedRows[0].DataBoundItem; _controler.Peoples.Remove(_target); _target = null; } }
public People addPeople(string surname, string firstname, string password, string comment) { People p = new People(surname, firstname, password, comment); _peoples.Add(p); return p; }
private void btnUpdate_Click(object sender, EventArgs e) { if (this.dgvPeople.SelectedRows.Count > 0) { _target = (People)this.dgvPeople.SelectedRows[0].DataBoundItem; PeopleForm f = new PeopleForm("WTF you are ?", this, true, _target.Surname, _target.Firstname, _target.Password, _target.Comment); f.ShowDialog(); } }