Beispiel #1
0
        public string personToXML(iPersonDAO dao)
        {
            string request = "<Persons>";

            foreach (Person per in dao.read())
            {
                request += ToXML(per);
            }
            request += "</Persons>";
            return(request);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 protected void btnRefreshs(object sender, EventArgs e)
 {
     dao           = DAO.ini(ListBox1.Text);
     rp.DataSource = dao.read();
     rp.DataBind();
 }
Beispiel #4
0
 protected void btnCreate_Click(object sender, EventArgs e)
 {
     dao.create(targetPerson());
     rp.DataSource = dao.read();
     rp.DataBind();
 }
Beispiel #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     dao           = DAO.ini(ListBox1.Text);
     rp.DataSource = dao.read();
     rp.DataBind();
 }