3 using System.Collections;
7 using Controlador.Afiliacion;
8 using Dominio.Afiliados;
11 public class VMantenerPlanes
13 Dialog wIngresarSolicitud;
15 Glade.XML alta_plan_xml;
17 [Widget] TreeView lista;
19 /* Alta Plan Window */
20 [Widget] Entry descripcion;
21 [Widget] SpinButton categoria;
22 [Widget] SpinButton permanencia_minima;
23 [Widget] TreeView coberturas;
26 [Widget] Entry codigo_prestacion;
27 [Widget] Entry carencia;
28 [Widget] SpinButton cobertura;
29 [Widget] SpinButton limite_anual;
30 [Widget] RadioButton tipo_auth;
32 public VMantenerPlanes ()
34 xml = new Glade.XML (null, "mantener_planes.glade", "mantener_planes", null);
35 xml.Autoconnect (this);
38 public void OnDialogResponse (object o, ResponseArgs args)
42 public void OnAdd (object o, EventArgs args)
44 alta_plan_xml = new Glade.XML (null, "mantener_planes.glade", "alta_plan", null);
45 alta_plan_xml.Autoconnect (this);
47 coberturas.Model = new ListStore (typeof(int), typeof(float), typeof (string), typeof (float));
48 coberturas.HeadersVisible = true;
49 coberturas.AppendColumn ("Prestacion", new CellRendererText (), "text", 0);
50 coberturas.AppendColumn ("Carencia", new CellRendererText (), "text", 1);
51 coberturas.AppendColumn ("Cobertura", new CellRendererText (), "text", 2);
52 coberturas.AppendColumn ("Limite Anual", new CellRendererText (), "text", 3);
54 Dialog w = (Dialog)alta_plan_xml.GetWidget ("alta_plan");
59 public void OnAltaPlan (object o, ResponseArgs args)
61 if (args.ResponseId == ResponseType.Cancel)
67 public void OnProperties (object o, EventArgs args)
71 public void OnDelete (object o, EventArgs args)
75 public void OnAddCobertura (object o, EventArgs args)
77 alta_plan_xml = new Glade.XML (null, "mantener_planes.glade", "alta_cobertura", null);
78 alta_plan_xml.Autoconnect (this);
80 Dialog w = (Dialog)alta_plan_xml.GetWidget ("alta_cobertura");
82 ListStore store = (ListStore)coberturas.Model;
83 TreeIter nuevo = store.Append ();
85 store.SetValue (nuevo, 0, Int32.Parse (codigo_prestacion.Text));
86 store.SetValue (nuevo, 1, (float)Double.Parse (categoria.Text));
87 store.SetValue (nuevo, 2, descripcion.Text));
88 store.SetValue (nuevo, 3, Int32.Parse (codigo_prestacion.Text));
95 Dialog w = (Dialog)xml.GetWidget ("mantener_planes");