* Agrego GenerarHojaDeRuta (vista) que recupera de la DB los solicitante y permite armar
la hoja de ruta (no la guarda, pues no se como)
* Detalles
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">True</property>
+ <signal name="response" handler="OnDialogResponse" last_modification_time="Tue, 14 Jun 2005 04:13:22 GMT"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<child>
<widget class="GtkComboBox" id="promotores">
<property name="visible">True</property>
+ <property name="items" translatable="yes">
+</property>
+ <signal name="changed" handler="OnPromotorSelected" last_modification_time="Tue, 14 Jun 2005 04:29:59 GMT"/>
</widget>
</child>
</widget>
<property name="spacing">5</property>
<child>
- <widget class="GtkButton" id="button2">
+ <widget class="GtkButton" id="agregar">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnAgregarClicked" last_modification_time="Tue, 14 Jun 2005 04:15:22 GMT"/>
</widget>
</child>
<child>
- <widget class="GtkButton" id="button3">
+ <widget class="GtkButton" id="borrar">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnBorrarClicked" last_modification_time="Tue, 14 Jun 2005 04:16:01 GMT"/>
</widget>
</child>
</widget>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTreeView" id="horaderuta">
+ <widget class="GtkTreeView" id="hojaderuta">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<child>
<widget class="GtkToolButton" id="ConsultarAfiliado">
<property name="visible">True</property>
- <property name="label" translatable="yes">Consultar
-Afiliado</property>
+ <property name="label" translatable="yes">Ingresar
+Solicitud</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-open</property>
<property name="visible_horizontal">True</property>
</packing>
</child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Emitir Hoja
+ de Ruta</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-open</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="OnEmitirHojaDeRuta" last_modification_time="Tue, 14 Jun 2005 04:18:14 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
<child>
<widget class="GtkToolButton" id="toolbutton3">
<property name="visible">True</property>
return false;
}
- public ArrayList obtenerFamiliares (ETipoDocumento tipoDoc, int nroDoc)
+ public ArrayList ObtenerFamiliares (ETipoDocumento tipoDoc, int nroDoc)
{
ArrayList salida = new ArrayList ();
/* Afiliado a = GETAFILIADO(tipoDoc, nroDoc
public bool ExisteSolicitante (ETipoDocumento tipoDoc, int nroDoc)
{
- return false;
+ Solicitante c = new Solicitante (tipoDoc, nroDoc, null, null);
+
+ ObjectContainer db=Db4o.openFile("os.yap");
+ bool existe = false;
+ try {
+ //do something with db4o
+ ObjectSet result = db.get(c);
+ if (result.next() != null)
+ existe = true;
+ }
+ catch (Exception e) {
+ Console.WriteLine (e);
+ }
+ finally {
+ db.close();
+ }
+ return existe;
}
public void AgregarSolicitante (
try {
//do something with db4o
db.set (s);
- ObjectSet result = db.get(s);
- Console.WriteLine (result.next());
}
catch (Exception e) {
Console.WriteLine (e);
return true;
}
- private Afiliado Restore (int codigo)
+ private ArrayList GetSolicitantes (Solicitante s)
{
- /* restora de la db */
- return null;
+ ObjectContainer db=Db4o.openFile("os.yap");
+ ArrayList lst = new ArrayList ();
+ try {
+ ObjectSet result = db.get(s);
+ if (result == null)
+ return lst;
+
+ while ((s = (Solicitante)result.next ()) != null) {
+ lst.Add (s);
+ }
+ }
+ catch (Exception e) {
+ Console.WriteLine ("----- GetSolicitantes ------");
+ Console.WriteLine (e);
+ Console.WriteLine ("----------------------------");
+ }
+ finally {
+ db.close();
+ }
+ return lst;
}
+ public ArrayList ObtenerSolicitantesPendientes ()
+ {
+ Solicitante s = new Solicitante (0, 0, null, null);
+
+ Console.WriteLine ("Obtengo los pendientes ...");
+ return GetSolicitantes (s);
+ }
}
}
public enum ETipoDocumento
{
+ NONE=0,
DNI,
LC,
LE,
public class Persona
{
/* Private Members */
- private ETipoDocumento _tipoDocumento;
- private int _nroDocumento;
- private string _nombre;
- private string _apellido;
+ private ETipoDocumento _tipoDocumento = ETipoDocumento.NONE;
+ private int _nroDocumento = 0;
+ private string _nombre = null;
+ private string _apellido = null;
private string _eMail;
private DateTime _fechaNacimiento;
private ESexo _sexo;
v.Run ();
}
+ public void OnEmitirHojaDeRuta (object o, EventArgs args)
+ {
+ VEmitirHojaDeRuta v = new VEmitirHojaDeRuta ();
+ v.Run ();
+ }
+
public void OnConsultarAfiliadoClose (object o, EventArgs args)
{
wConsultarAfiliado.Destroy ();
GLADE= \
-res:../glade/main.glade \
-res:../glade/consultar_afiliado.glade \
- -res:../glade/ingresar_solicitud.glade
+ -res:../glade/ingresar_solicitud.glade \
+ -res:../glade/emitir_hoja_de_ruta.glade
all: