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 (float), typeof (int), typeof(string));
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);
53 coberturas.AppendColumn ("Tipo", new CellRendererText (), "text", 4);
55 Dialog w = (Dialog)alta_plan_xml.GetWidget ("alta_plan");
60 public void OnAltaPlan (object o, ResponseArgs args)
62 if (args.ResponseId == ResponseType.Cancel)
68 public void OnProperties (object o, EventArgs args)
72 public void OnDelete (object o, EventArgs args)
76 public void OnAddCobertura (object o, EventArgs args)
78 alta_plan_xml = new Glade.XML (null, "mantener_planes.glade", "alta_cobertura", null);
79 alta_plan_xml.Autoconnect (this);
81 Dialog w = (Dialog)alta_plan_xml.GetWidget ("alta_cobertura");
83 ListStore store = (ListStore)coberturas.Model;
84 TreeIter nuevo = store.Append ();
86 store.SetValue (nuevo, 0, Int32.Parse (codigo_prestacion.Text));
87 store.SetValue (nuevo, 1, (float)Double.Parse (carencia.Text));
88 store.SetValue (nuevo, 2, (float)cobertura.Value);
89 store.SetValue (nuevo, 3, limite_anual.ValueAsInt);
90 if (tipo_auth.Active == true)
91 store.SetValue (nuevo, 4, "Manual");
93 store.SetValue (nuevo, 4, "Automatica");
100 Dialog w = (Dialog)xml.GetWidget ("mantener_planes");