xml = new Glade.XML (null, "consultar_afiliado.glade", "consultar_afiliado", null);
xml.Autoconnect (this);
- lista.Model = new ListStore (typeof(int), typeof(string), typeof(string), typeof (string), typeof(string));
+ lista.Model = new ListStore (typeof(int), typeof(string), typeof(int), typeof (string), typeof(string));
/* Columnas */
lista.HeadersVisible = true;
lista.AppendColumn ("Codigo", new CellRendererText (), "text", 0);
- lista.AppendColumn ("Nombre", new CellRendererText (), "text", 1);
- lista.AppendColumn ("Apellido", new CellRendererText (), "text", 2);
- lista.AppendColumn ("Tipo Doc.", new CellRendererText (), "text", 3);
- lista.AppendColumn ("Número Doc.", new CellRendererText (), "text", 4);
+ lista.AppendColumn ("Tipo Doc.", new CellRendererText (), "text", 1);
+ lista.AppendColumn ("Número Doc.", new CellRendererText (), "text", 2);
+ lista.AppendColumn ("Nombre", new CellRendererText (), "text", 3);
+ lista.AppendColumn ("Apellido", new CellRendererText (), "text", 4);
}
public void OnVerAfiliado (object o, EventArgs args)
AfiliadoSolicitanteController c = new AfiliadoSolicitanteController ();
ListStore store = (ListStore)lista.Model;
store.Clear ();
- ArrayList lst = new ArrayList ();
- foreach (Prestacion p in lst) {
+ ArrayList lst = c.BuscarAfiliados (tipoDoc, nroDoc, 0, null);
+ foreach (Afiliado p in lst) {
TreeIter i = store.Append ();
store.SetValue (i, 0, p.Codigo);
- store.SetValue (i, 1, p.Nombre);
+ store.SetValue (i, 1, p.TipoDocumento.ToString ());
+ store.SetValue (i, 2, p.NroDocumento);
+ store.SetValue (i, 3, p.Nombre);
+ store.SetValue (i, 4, p.Apellido);
}
c.Dispose ();