<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-7</property>
- <signal name="clicked" handler="OnConsultarAfiliadoClose" last_modification_time="Thu, 09 Jun 2005 04:57:08 GMT"/>
</widget>
</child>
</widget>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTreeView" id="treeview1">
+ <widget class="GtkTreeView" id="lista">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">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="OnAdd" last_modification_time="Tue, 28 Jun 2005 15:55:41 GMT"/>
</widget>
</child>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnProperties" last_modification_time="Tue, 28 Jun 2005 15:55:51 GMT"/>
</widget>
</child>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnDelete" last_modification_time="Tue, 28 Jun 2005 15:55:58 GMT"/>
</widget>
</child>
</widget>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="has_separator">True</property>
+ <signal name="response" handler="OnAltaPlan" last_modification_time="Tue, 28 Jun 2005 16:04:15 GMT"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
+ <property name="response_id">0</property>
</widget>
</child>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <property name="response_id">-5</property>
+ <property name="response_id">1</property>
</widget>
</child>
</widget>
</child>
<child>
- <widget class="GtkEntry" id="entry1">
+ <widget class="GtkEntry" id="descripcion">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
</child>
<child>
- <widget class="GtkSpinButton" id="spinbutton1">
+ <widget class="GtkSpinButton" id="permanencia_minima">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
</child>
<child>
- <widget class="GtkSpinButton" id="spinbutton4">
+ <widget class="GtkSpinButton" id="categoria">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTreeView" id="treeview2">
+ <widget class="GtkTreeView" id="coberturas">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">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="OnAddCobertura" last_modification_time="Tue, 28 Jun 2005 16:29:30 GMT"/>
</widget>
</child>
<property name="spacing">0</property>
<child>
- <widget class="GtkEntry" id="entry2">
+ <widget class="GtkEntry" id="codigo_prestacion">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="spacing">0</property>
<child>
- <widget class="GtkRadioButton" id="radiobutton1">
+ <widget class="GtkRadioButton" id="tipo_auth">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Manual</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <property name="group">radiobutton1</property>
+ <property name="group">tipo_auth</property>
</widget>
<packing>
<property name="padding">0</property>
</child>
<child>
- <widget class="GtkEntry" id="entry3">
+ <widget class="GtkEntry" id="carencia">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
</child>
<child>
- <widget class="GtkSpinButton" id="spinbutton2">
+ <widget class="GtkSpinButton" id="cobertura">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
</child>
<child>
- <widget class="GtkSpinButton" id="spinbutton3">
+ <widget class="GtkSpinButton" id="limite_anual">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
--- /dev/null
+
+using System;
+using System.Collections;
+using Gtk;
+using Glade;
+
+using Controlador.Afiliacion;
+using Dominio.Afiliados;
+using Dominio;
+
+public class VMantenerPlanes
+{
+ Dialog wIngresarSolicitud;
+ Glade.XML xml;
+ Glade.XML alta_plan_xml;
+
+ [Widget] TreeView lista;
+
+ /* Alta Plan Window */
+ [Widget] Entry descripcion;
+ [Widget] SpinButton categoria;
+ [Widget] SpinButton permanencia_minima;
+ [Widget] TreeView coberturas;
+
+ /* Alta Cobertura */
+ [Widget] Entry codigo_prestacion;
+ [Widget] Entry carencia;
+ [Widget] SpinButton cobertura;
+ [Widget] SpinButton limite_anual;
+ [Widget] RadioButton tipo_auth;
+
+ public VMantenerPlanes ()
+ {
+ xml = new Glade.XML (null, "mantener_planes.glade", "mantener_planes", null);
+ xml.Autoconnect (this);
+ }
+
+ public void OnDialogResponse (object o, ResponseArgs args)
+ {
+ }
+
+ public void OnAdd (object o, EventArgs args)
+ {
+ alta_plan_xml = new Glade.XML (null, "mantener_planes.glade", "alta_plan", null);
+ alta_plan_xml.Autoconnect (this);
+
+ coberturas.Model = new ListStore (typeof(int), typeof(float), typeof (string), typeof (float));
+ coberturas.HeadersVisible = true;
+ coberturas.AppendColumn ("Prestacion", new CellRendererText (), "text", 0);
+ coberturas.AppendColumn ("Carencia", new CellRendererText (), "text", 1);
+ coberturas.AppendColumn ("Cobertura", new CellRendererText (), "text", 2);
+ coberturas.AppendColumn ("Limite Anual", new CellRendererText (), "text", 3);
+
+ Dialog w = (Dialog)alta_plan_xml.GetWidget ("alta_plan");
+ w.Run ();
+ w.Destroy ();
+ }
+
+ public void OnAltaPlan (object o, ResponseArgs args)
+ {
+ if (args.ResponseId == ResponseType.Cancel)
+ return;
+
+
+ }
+
+ public void OnProperties (object o, EventArgs args)
+ {
+ }
+
+ public void OnDelete (object o, EventArgs args)
+ {
+ }
+
+ public void OnAddCobertura (object o, EventArgs args)
+ {
+ alta_plan_xml = new Glade.XML (null, "mantener_planes.glade", "alta_cobertura", null);
+ alta_plan_xml.Autoconnect (this);
+
+ Dialog w = (Dialog)alta_plan_xml.GetWidget ("alta_cobertura");
+ if (w.Run () != -6) {
+ ListStore store = (ListStore)coberturas.Model;
+ TreeIter nuevo = store.Append ();
+
+ store.SetValue (nuevo, 0, Int32.Parse (codigo_prestacion.Text));
+ store.SetValue (nuevo, 1, (float)Double.Parse (categoria.Text));
+ store.SetValue (nuevo, 2, descripcion.Text));
+ store.SetValue (nuevo, 3, Int32.Parse (codigo_prestacion.Text));
+ }
+ w.Destroy ();
+ }
+
+ public void Run ()
+ {
+ Dialog w = (Dialog)xml.GetWidget ("mantener_planes");
+ w.Run ();
+ w.Destroy ();
+ }
+}
+