public bool UpdatePerson(Person person) { using (PersonsDAL personsDAL = new PersonsDAL()) { return(personsDAL.UpdatePerson(person)); } }
protected void btn_Update_Click(object sender, EventArgs e) { Person p = new Person(); p.FirstName = tb_firstName.Text; p.LastName = tb_lastName.Text; p.PersonID = Convert.ToInt32(Request.QueryString["id"]); p.Address = tb_Address.Text; PersonsDAL.UpdatePerson(p); Response.Redirect(UrlConstants.PHONEBOOK); }