public string personToXML(iPersonDAO dao) { string request = "<Persons>"; foreach (Person per in dao.read()) { request += ToXML(per); } request += "</Persons>"; return(request); }
public string read() { dao = DAO.ini(DaoName); list = dao.read(); string data = ""; foreach (Person p in list) { data += p.id + " " + p.fname + " " + p.lname + " " + p.age + " "; } return(data); }
protected void btnRefreshs(object sender, EventArgs e) { dao = DAO.ini(ListBox1.Text); rp.DataSource = dao.read(); rp.DataBind(); }
protected void btnCreate_Click(object sender, EventArgs e) { dao.create(targetPerson()); rp.DataSource = dao.read(); rp.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { dao = DAO.ini(ListBox1.Text); rp.DataSource = dao.read(); rp.DataBind(); }