From: Ricardo Markiewicz Date: Tue, 28 Jun 2005 17:03:12 +0000 (+0000) Subject: * Un poco de Mantener Planes, para ir sacando shots X-Git-Tag: svn_import~183 X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/commitdiff_plain/e826fb5076f847072bfe16584c36e3b2da8a442d?ds=inline * Un poco de Mantener Planes, para ir sacando shots --- diff --git a/carpeta/disenio_grafico/shots/alta_cobertura.png b/carpeta/disenio_grafico/shots/alta_cobertura.png new file mode 100644 index 0000000..4f33714 Binary files /dev/null and b/carpeta/disenio_grafico/shots/alta_cobertura.png differ diff --git a/demo/glade/main.glade b/demo/glade/main.glade index b59b932..7555ae5 100644 --- a/demo/glade/main.glade +++ b/demo/glade/main.glade @@ -92,6 +92,28 @@ + + + + True + Mantenimiento + True + + + + + + + True + Planes + True + + + + + + + 0 diff --git a/demo/glade/mantener_planes.glade b/demo/glade/mantener_planes.glade index fdecc04..f9b681c 100644 --- a/demo/glade/mantener_planes.glade +++ b/demo/glade/mantener_planes.glade @@ -40,7 +40,6 @@ GTK_RELIEF_NORMAL True -7 - @@ -88,7 +87,7 @@ GTK_CORNER_TOP_LEFT - + True True True @@ -151,6 +150,7 @@ True GTK_RELIEF_NORMAL True + @@ -163,6 +163,7 @@ True GTK_RELIEF_NORMAL True + @@ -175,6 +176,7 @@ True GTK_RELIEF_NORMAL True + @@ -211,6 +213,7 @@ GDK_GRAVITY_NORTH_WEST True True + @@ -232,7 +235,7 @@ True GTK_RELIEF_NORMAL True - -6 + 0 @@ -245,7 +248,7 @@ True GTK_RELIEF_NORMAL True - -5 + 1 @@ -377,7 +380,7 @@ - + True True True @@ -398,7 +401,7 @@ - + True True 1 @@ -419,7 +422,7 @@ - + True True 1 @@ -509,7 +512,7 @@ GTK_CORNER_TOP_LEFT - + True True True @@ -545,6 +548,7 @@ True GTK_RELIEF_NORMAL True + @@ -728,7 +732,7 @@ 0 - + True True True @@ -890,7 +894,7 @@ 0 - + True True Manual @@ -919,7 +923,7 @@ False False True - radiobutton1 + tipo_auth 0 @@ -939,7 +943,7 @@ - + True True True @@ -960,7 +964,7 @@ - + True True 1 @@ -981,7 +985,7 @@ - + True True 1 diff --git a/demo/src/Main.cs b/demo/src/Main.cs index 3a89f71..aa083cc 100644 --- a/demo/src/Main.cs +++ b/demo/src/Main.cs @@ -80,13 +80,19 @@ public class App v.Run (); } + public void OnMantenerPlanes (object o, EventArgs args) + { + VMantenerPlanes v = new VMantenerPlanes (); + v.Run (); + } + public void OnRegistrarVisitas (object o, EventArgs args) { - /*ABMGenerico g = new ABMGenerico (typeof(Plan)); + ABMGenerico g = new ABMGenerico (typeof(Plan)); g.Run (); - return;*/ - VRegistrarVisitas v = new VRegistrarVisitas (); - v.Run (); + return; + /*VRegistrarVisitas v = new VRegistrarVisitas (); + v.Run ();*/ } } diff --git a/demo/src/Vistas/MantenerPlanes.cs b/demo/src/Vistas/MantenerPlanes.cs new file mode 100644 index 0000000..d0f5257 --- /dev/null +++ b/demo/src/Vistas/MantenerPlanes.cs @@ -0,0 +1,100 @@ + +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 (); + } +} +