3 using System.Collections;
7 using Controlador.Afiliacion;
8 using Dominio.Afiliados;
11 public class VAgregarAfiliado
14 [Widget] TreeView lista;
16 public VAgregarAfiliado ()
18 xml = new Glade.XML (null, "agregar_afiliado.glade", "agregar_afiliado", null);
19 xml.Autoconnect (this);
21 ListStore store = new ListStore (typeof(string), typeof(int), typeof (string), typeof (string));
25 lista.HeadersVisible = true;
26 lista.AppendColumn ("Tipo Doc.", new CellRendererText (), "text", 0);
27 lista.AppendColumn ("Nro Doc.", new CellRendererText (), "text", 1);
28 lista.AppendColumn ("Apellido", new CellRendererText (), "text", 2);
29 lista.AppendColumn ("Nombre", new CellRendererText (), "text", 3);
34 private void CargarParaAfiliar ()
36 ListStore store = (ListStore)lista.Model;
38 AfiliadoSolicitanteController c = new AfiliadoSolicitanteController ();
39 afiliados = c.ObtenerSolicitantesAfiliar ();
41 foreach (Solicitante s in afiliados) {
42 TreeIter iter = store.AppendValues (s.TipoDocumento.ToString (), s.NroDocumento, s.Nombre, s.Apellido);
48 public void OnAfiliar (object o, EventArgs args)
55 Dialog w = (Dialog)xml.GetWidget ("agregar_afiliado");