Example #1
0
 public void xoanxb(ClassTT nxb)
 {
     doc.Load(tep);
     XmlNode goc = doc.DocumentElement;
     XmlNode cu = goc.SelectSingleNode("/danhmucnxb/nxb[@manxb='" + nxb.Manxb + "']");
     goc.RemoveChild(cu);
     doc.Save(tep);
 }
Example #2
0
        public void xoanxb(ClassTT nxb)
        {
            doc.Load(tep);
            XmlNode goc = doc.DocumentElement;
            XmlNode cu  = goc.SelectSingleNode("/danhmucnxb/nxb[@manxb='" + nxb.Manxb + "']");

            goc.RemoveChild(cu);
            doc.Save(tep);
        }
Example #3
0
 private void btnxoa_Click(object sender, EventArgs e)
 {
     ClassTT sach = new ClassTT();
     sach.Manxb = txtmanxb.Text;
     sach.Tennxb = txttennxb.Text;
     sach.Diachi = txtdiachi.Text;
     xl.xoanxb(sach);
     Form1_Load(sender, e);
 }
Example #4
0
        private void btnxoa_Click(object sender, EventArgs e)
        {
            ClassTT sach = new ClassTT();

            sach.Manxb  = txtmanxb.Text;
            sach.Tennxb = txttennxb.Text;
            sach.Diachi = txtdiachi.Text;
            xl.xoanxb(sach);
            Form1_Load(sender, e);
        }
Example #5
0
 public void themnxb(ClassTT nxb)
 {
     doc.Load(tep);
     XmlElement goc = doc.DocumentElement;
     XmlElement nhaxb = doc.CreateElement("nxb");
     XmlAttribute manxb = doc.CreateAttribute("manxb");
     XmlElement tennxb = doc.CreateElement("tennxb");
     XmlElement diachi = doc.CreateElement("diachi");
     manxb.InnerText = nxb.Manxb;
     tennxb.InnerText = nxb.Tennxb;
     diachi.InnerText = nxb.Diachi;
     nhaxb.Attributes.Append(manxb);
     nhaxb.AppendChild(tennxb);
     nhaxb.AppendChild(diachi);
     goc.AppendChild(nhaxb);
     doc.Save(tep);
 }
Example #6
0
 public void suanxb(ClassTT nxb)
 {
     doc.Load(tep);
     XmlElement goc = doc.DocumentElement;
     XmlNode cu=goc.SelectSingleNode("/danhmucnxb/nxb[@manxb='"+nxb.Manxb+"']");
     XmlElement moi = doc.CreateElement("nxb");
     XmlAttribute manxb = doc.CreateAttribute("manxb");
     XmlElement tennxb = doc.CreateElement("tennxb");
     XmlElement diachi = doc.CreateElement("diachi");
     manxb.InnerText = nxb.Manxb;
     tennxb.InnerText = nxb.Tennxb;
     diachi.InnerText = nxb.Diachi;
     moi.Attributes.Append(manxb);
     moi.AppendChild(tennxb);
     moi.AppendChild(diachi);
     goc.ReplaceChild(moi, cu);
     doc.Save(tep);
 }
Example #7
0
        public void themnxb(ClassTT nxb)
        {
            doc.Load(tep);
            XmlElement   goc    = doc.DocumentElement;
            XmlElement   nhaxb  = doc.CreateElement("nxb");
            XmlAttribute manxb  = doc.CreateAttribute("manxb");
            XmlElement   tennxb = doc.CreateElement("tennxb");
            XmlElement   diachi = doc.CreateElement("diachi");

            manxb.InnerText  = nxb.Manxb;
            tennxb.InnerText = nxb.Tennxb;
            diachi.InnerText = nxb.Diachi;
            nhaxb.Attributes.Append(manxb);
            nhaxb.AppendChild(tennxb);
            nhaxb.AppendChild(diachi);
            goc.AppendChild(nhaxb);
            doc.Save(tep);
        }
Example #8
0
        public void suanxb(ClassTT nxb)
        {
            doc.Load(tep);
            XmlElement   goc    = doc.DocumentElement;
            XmlNode      cu     = goc.SelectSingleNode("/danhmucnxb/nxb[@manxb='" + nxb.Manxb + "']");
            XmlElement   moi    = doc.CreateElement("nxb");
            XmlAttribute manxb  = doc.CreateAttribute("manxb");
            XmlElement   tennxb = doc.CreateElement("tennxb");
            XmlElement   diachi = doc.CreateElement("diachi");

            manxb.InnerText  = nxb.Manxb;
            tennxb.InnerText = nxb.Tennxb;
            diachi.InnerText = nxb.Diachi;
            moi.Attributes.Append(manxb);
            moi.AppendChild(tennxb);
            moi.AppendChild(diachi);
            goc.ReplaceChild(moi, cu);
            doc.Save(tep);
        }