private void rellenarCampos(Reclamacion reclamacion)
 {
     label_Asunto.Text = reclamacion.asunto;
     textarea_Mensaje.Text = reclamacion.mensaje;
     label_Nombre.Text = reclamacion.nombre;
     label_DNI.Text = reclamacion.dni;
     label_Email.Text = reclamacion.email;
     label_Telefono.Text = reclamacion.telefono;
     label_Provincia.Text = reclamacion.provincia;
     label_Localidad.Text = reclamacion.localidad;
     label_CP.Text = reclamacion.cp;
     label_Domicilio.Text = reclamacion.tipoVia + "  " + reclamacion.nombreVia + "  " + reclamacion.numero;
     label_Mayor14.Text = reclamacion.mayor14;
     label_Info.Text = reclamacion.informacion;
     label_Firma.Text = reclamacion.firma;
 }
Beispiel #2
0
 private void rellenarReclamacion()
 {
     string asunto = Request.Params["ctl00$contentPanel_body$asunto"].Split('_')[1];
     string mensaje = Request.Params["ctl00$contentPanel_body$textarea_Mensaje"];
     string nombre = Request.Params["ctl00$contentPanel_body$text_Nombre"];
     string dni = Request.Params["ctl00$contentPanel_body$text_Dni"];
     string apellido1 = Request.Params["ctl00$contentPanel_body$text_Apellido1"];
     string apellido2 = Request.Params["ctl00$contentPanel_body$text_Apellido2"];
     string provincia = Request.Params["ctl00$contentPanel_body$text_Provincia"];
     string localidad = Request.Params["ctl00$contentPanel_body$text_Localidad"];
     string cp = Request.Params["ctl00$contentPanel_body$text_Cp"];
     string tipoVia = Request.Params["ctl00$contentPanel_body$text_TipoVia"];
     string nombreVia = Request.Params["ctl00$contentPanel_body$text_NombreVia"];
     string numero = Request.Params["ctl00$contentPanel_body$text_Numero"];
     string telefono = Request.Params["ctl00$contentPanel_body$text_Telefono"];
     string email = Request.Params["ctl00$contentPanel_body$text_Email"];
     bool mayor14 = Request.Params["ctl00$contentPanel_body$check_Edad"] == "on" ? true : false ;
     bool info = Request.Params["ctl00$contentPanel_body$check_Autorizacion"] == "on" ? true : false;
     bool firma = Request.Params["ctl00$contentPanel_body$check_Firma"] == "on" ? true : false;
     Reclamacion reclamacion = new Reclamacion(asunto, mensaje, nombre, dni, apellido1, apellido2, provincia, localidad, cp, tipoVia, nombreVia, numero, telefono, email, mayor14, info, firma);
     new CXml().añadirReclamacion(Server.MapPath("~/ficheros/Reclamaciones.xml"), reclamacion);
 }
Beispiel #3
0
 public void cerrarReclamacion(string path, Reclamacion reclamacion)
 {
     XmlDocument xDoc = new XmlDocument();
     xDoc.Load(path);
     foreach (XmlNode xNode in xDoc.DocumentElement.SelectNodes("/Reclamaciones/Reclamacion"))
     {
         if (xNode.SelectSingleNode("Leido").InnerText == reclamacion.leido && xNode.SelectSingleNode("Nombre").InnerText == reclamacion.nombre && xNode.SelectSingleNode("Email").InnerText == reclamacion.email )
         {
             xNode.SelectSingleNode("Leido").InnerText = "Si";
             xDoc.Save(path);
             break;
         }
     }
 }
Beispiel #4
0
 public List<Reclamacion> reclamacionesNoLeidas(string path)
 {
     List<Reclamacion> ret = new List<Reclamacion>();
     Reclamacion reclamacion;
     XmlDocument xDoc = new XmlDocument();
     xDoc.Load(path);
     foreach ( XmlNode xNode in xDoc.DocumentElement.SelectNodes("/Reclamaciones/Reclamacion")){
         if (xNode.SelectSingleNode("Leido").InnerText == "No")
         {
             reclamacion = new Reclamacion();
             reclamacion.leido = xNode.SelectSingleNode("Leido").InnerText;
             reclamacion.asunto = xNode.SelectSingleNode("Asunto").InnerText;
             reclamacion.nombre = xNode.SelectSingleNode("Nombre").InnerText;
             reclamacion.dni = xNode.SelectSingleNode("DNI").InnerText;
             reclamacion.telefono = xNode.SelectSingleNode("Telefono").InnerText;
             reclamacion.email = xNode.SelectSingleNode("Email").InnerText;
             reclamacion.provincia = xNode.SelectSingleNode("Provincia").InnerText;
             reclamacion.localidad = xNode.SelectSingleNode("Localidad").InnerText;
             reclamacion.cp = xNode.SelectSingleNode("CP").InnerText;
             reclamacion.tipoVia = xNode.SelectSingleNode("TipoVia").InnerText;
             reclamacion.nombreVia = xNode.SelectSingleNode("NombreVia").InnerText;
             reclamacion.numero = xNode.SelectSingleNode("Numero").InnerText;
             reclamacion.mayor14 = xNode.SelectSingleNode("Mayor14").InnerText;
             reclamacion.informacion = xNode.SelectSingleNode("Informacion").InnerText;
             reclamacion.firma = xNode.SelectSingleNode("Firma").InnerText;
             reclamacion.mensaje = xNode.SelectSingleNode("Mensaje").InnerText;
             ret.Add(reclamacion);
         }
     }
     return ret;
 }
Beispiel #5
0
        public void añadirReclamacion(string path, Reclamacion reclamacion)
        {
            XmlDocument xDoc = new XmlDocument();
            xDoc.Load(path);
            XmlNode padre = xDoc.FirstChild;
            XmlNode hijo = xDoc.CreateNode(XmlNodeType.Element, "Reclamacion", null);

            XmlNode nuevo = xDoc.CreateNode(XmlNodeType.Element, "Leido", null);
            nuevo.InnerText = reclamacion.leido;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Asunto", null);
            nuevo.InnerText = reclamacion.asunto;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Nombre", null);
            nuevo.InnerText = reclamacion.nombre;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "DNI", null);
            nuevo.InnerText = reclamacion.dni;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Telefono", null);
            nuevo.InnerText = reclamacion.telefono;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Email", null);
            nuevo.InnerText = reclamacion.email;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Provincia", null);
            nuevo.InnerText = reclamacion.provincia;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Localidad", null);
            nuevo.InnerText = reclamacion.localidad;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "CP", null);
            nuevo.InnerText = reclamacion.cp;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "TipoVia", null);
            nuevo.InnerText = reclamacion.tipoVia;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "NombreVia", null);
            nuevo.InnerText = reclamacion.nombreVia;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Numero", null);
            nuevo.InnerText = reclamacion.numero;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Mayor14", null);
            nuevo.InnerText = reclamacion.mayor14;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Informacion", null);
            nuevo.InnerText = reclamacion.informacion;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Firma", null);
            nuevo.InnerText = reclamacion.firma;
            hijo.AppendChild(nuevo);

            nuevo = xDoc.CreateNode(XmlNodeType.Element, "Mensaje", null);
            nuevo.InnerText = reclamacion.mensaje;
            hijo.AppendChild(nuevo);

            padre.AppendChild(hijo);

            xDoc.Save(path);
        }