public void updateBookingRights(AdvancedBookingRight right) { XmlDocument doc = new XmlDocument(); doc.Load(HttpContext.Current.Server.MapPath("~/App_Data/abr.xml")); XmlNode node = doc.SelectSingleNode("/ABR/Right[@user='******']"); node.Attributes["bookingsperweek"].Value = right.Numperweek.ToString(); node.Attributes["weeksinadvanced"].Value = right.Weeksahead.ToString(); doc.Save(HttpContext.Current.Server.MapPath("~/App_Data/abr.xml")); HttpContext.Current.Cache.Remove("abr"); }
public void addBookingRights(AdvancedBookingRight right) { XmlDocument doc = new XmlDocument(); doc.Load(HttpContext.Current.Server.MapPath("~/App_Data/abr.xml")); XmlNode bookings = doc.SelectSingleNode("/ABR"); XmlNode node = doc.CreateElement("Right"); XmlAttribute at = doc.CreateAttribute("user"); at.Value = right.Username; node.Attributes.Append(at); at = doc.CreateAttribute("weeksinadvanced"); at.Value = right.Weeksahead.ToString(); node.Attributes.Append(at); at = doc.CreateAttribute("bookingsperweek"); at.Value = right.Numperweek.ToString(); node.Attributes.Append(at); bookings.AppendChild(node); doc.Save(HttpContext.Current.Server.MapPath("~/App_Data/abr.xml")); HttpContext.Current.Cache.Remove("abr"); }
public void deleteBookingRights(AdvancedBookingRight right) { }