Example #1
0
        // Edit Record
        public void editPropMail(PropMailsModels Images)
        {
            XElement node = propMailsData.Root.Elements("property").Where(i => (string)i.Element("name") == Images.name).FirstOrDefault();

            node.SetElementValue("email", Images.email);
            node.SetElementValue("pass", Images.pass);

            propMailsData.Save(HttpContext.Current.Server.MapPath("~/App_Data/PropMails.xml"));
        }
Example #2
0
        public void savePropMail(PropMailsModels Propmail)
        {
            propMailsData.Root.Add(new XElement("property",
                                                new XElement("name", Propmail.name),
                                                new XElement("email", Propmail.email),
                                                new XElement("pass", Propmail.pass))
                                   );

            propMailsData.Save(HttpContext.Current.Server.MapPath("~/App_Data/PropMails.xml"));
        }