<property name="spacing">0</property>
<child>
- <widget class="GtkComboBox" id="tipoDoc">
- <property name="visible">True</property>
- <property name="items" translatable="yes">DNI
-LC
-LE
-CI</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="nroDoc">
+ <widget class="GtkEntry" id="documento">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</packing>
</child>
- <child>
- <widget class="GtkComboBox" id="provincia">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Rio Negro
-Neuquen</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
<child>
<widget class="GtkLabel" id="label22">
<property name="visible">True</property>
<property name="y_options"></property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkEntry" id="provincia">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
[Widget] TreeView lista;
/* Busqueda */
- [Widget] Entry codigo;
[Widget] ComboBox s_tipoDocumento;
[Widget] Entry s_nroDocument;
[Widget] Entry s_apellido;
[Widget] Entry s_codigo;
+ /* Campos de datos */
+ [Widget] Entry documento;
+ [Widget] Entry nombre;
+ [Widget] Entry apellido;
+ [Widget] Entry email;
+ [Widget] RadioButton sexom;
+ [Widget] RadioButton sexof;
+ [Widget] Entry fechaNac;
+ [Widget] Entry calle;
+ [Widget] Entry numero;
+ [Widget] Entry piso;
+ [Widget] Entry dpto;
+ [Widget] Entry provincia;
+ [Widget] Entry codigopostal;
+ [Widget] Entry telefono;
+ [Widget] Entry deuda;
+ [Widget] Entry codigo;
+
public VConsultarAfiliado ()
{
xml = new Glade.XML (null, "consultar_afiliado.glade", "consultar_afiliado", null);
public void OnVerAfiliado (object o, EventArgs args)
{
+ TreeIter iter;
+ TreeModel model;
+ TreeSelection sel = lista.Selection;
+
+
+ if (sel.GetSelected(out model, out iter) == true) {
+ ETipoDocumento tipoDoc = (ETipoDocumento)Enum.Parse (typeof (ETipoDocumento), (string)model.GetValue (iter, 1), true);
+ int nroDoc = (int)model.GetValue (iter, 0);
+
+ AfiliadoSolicitanteController c = new AfiliadoSolicitanteController ();
+ Afiliado a = c.ExisteAfiliado (nroDoc);
+
+ Console.WriteLine ("{0}",nroDoc);
+ Console.WriteLine (a);
+ documento.Text = String.Format ("{0} {1}", a.TipoDocumento.ToString(), a.NroDocumento);
+ nombre.Text = a.Nombre;
+ apellido.Text = a.Apellido;
+ codigo.Text = String.Format ("{0}", a.Codigo);
+ email.Text = a.EMail;
+ fechaNac.Text = a.FechaNacimiento.ToString ();
+ calle.Text = a.Direccion.Calle;
+ numero.Text = String.Format ("{0}", a.Direccion.Numero);
+ piso.Text = String.Format ("{0}", a.Direccion.Piso);
+ dpto.Text = String.Format ("{0}", a.Direccion.Departamento);
+ provincia.Text = a.Direccion.Provincia.ToString ();
+ codigopostal.Text = a.Direccion.CodigoPostal;
+ if (a.Moroso == 0)
+ deuda.Text = "El Afiliado está al día con la cuota";
+ else
+ deuda.Text = String.Format ("El Afiliado debe {0} meses");
+
+ c.Dispose ();
+ }
}
public void OnBuscarAfiliado (object o, EventArgs args)