private void LoadGUI(Permision p) { this.UIConfirmMedia.IsChecked = p.confirm_media; this.UIManaUser.IsChecked = p.mana_user; this.UISchedule.IsChecked = p.mana_schedule; this.UIViewAllMedia.IsChecked = p.view_all_media; this.UIDEvice.IsChecked = p.mana_device; }
public static string Write(Permision overview) { if (overview==null) throw new Exception("File Not Empty"); System.Xml.Serialization.XmlSerializer writer = new System.Xml.Serialization.XmlSerializer(typeof(Permision)); System.Xml.XmlWriterSettings setting = new System.Xml.XmlWriterSettings(); setting.Encoding = Encoding.UTF8; setting.CloseOutput = true; using (var sw = new StringWriter()) { using (var xw = System.Xml.XmlWriter.Create(sw, setting)) { writer.Serialize(xw, overview); } return sw.ToString(); } }
public static string Write(Permision overview) { if (overview == null) { throw new Exception("File Not Empty"); } System.Xml.Serialization.XmlSerializer writer = new System.Xml.Serialization.XmlSerializer(typeof(Permision)); System.Xml.XmlWriterSettings setting = new System.Xml.XmlWriterSettings(); setting.Encoding = Encoding.UTF8; setting.CloseOutput = true; using (var sw = new StringWriter()) { using (var xw = System.Xml.XmlWriter.Create(sw, setting)) { writer.Serialize(xw, overview); } return(sw.ToString()); } }