+
+using System;
+using System.Collections;
+using Gtk;
+using Glade;
+
+using Controlador.Afiliacion;
+using Dominio.Afiliados;
+using Dominio;
+
+public class VAgregarAfiliado
+{
+ Glade.XML xml;
+ [Widget] TreeView lista;
+
+ public VAgregarAfiliado ()
+ {
+ xml = new Glade.XML (null, "agregar_afiliado.glade", "agregar_afiliado", null);
+ xml.Autoconnect (this);
+
+ ListStore store = new ListStore (typeof(string), typeof(int), typeof (string), typeof (string));
+ lista.Model = store;
+
+ /* Columnas */
+ lista.HeadersVisible = true;
+ lista.AppendColumn ("Tipo Doc.", new CellRendererText (), "text", 0);
+ lista.AppendColumn ("Nro Doc.", new CellRendererText (), "text", 1);
+ lista.AppendColumn ("Apellido", new CellRendererText (), "text", 2);
+ lista.AppendColumn ("Nombre", new CellRendererText (), "text", 3);
+
+ ArrayList afiliados;
+ AfiliadoSolicitanteController c = new AfiliadoSolicitanteController ();
+ afiliados = c.ObtenerSolicitantesAfiliar ();
+
+ foreach (Solicitante s in afiliados) {
+ TreeIter iter = store.AppendValues (s.TipoDocumento.ToString (), s.NroDocumento, s.Nombre, s.Apellido);
+ }
+
+ c.Dispose ();
+ }
+
+ public void OnAfiliar (object o, EventArgs args)
+ {
+
+ }
+
+ public void Run ()
+ {
+ Dialog w = (Dialog)xml.GetWidget ("agregar_afiliado");
+ w.Run ();
+ w.Destroy ();
+ }
+}
+