]> git.llucax.com Git - z.facultad/75.10/miklolife.git/commitdiff
Se cargan los datos de la autorizacion para que el auditor los pueda ver y decidir
authorRicardo Markiewicz <gazer.arg@gmail.com>
Thu, 7 Jul 2005 03:44:27 +0000 (03:44 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Thu, 7 Jul 2005 03:44:27 +0000 (03:44 +0000)
demo/glade/actualizar_autorizacion_manual.glade
demo/src/Vistas/RevisarAutorizacionManual.cs

index 49e540bc71300a979c9ab6db7ba426db5c401f38..dc99f42dab07ebf54babf28dcec715bfa6325287 100644 (file)
   <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="OnRevisarResponse" last_modification_time="Thu, 07 Jul 2005 02:56:51 GMT"/>
 
   <child internal-child="vbox">
     <widget class="GtkVBox" id="dialog-vbox2">
              <property name="can_focus">True</property>
              <property name="relief">GTK_RELIEF_NORMAL</property>
              <property name="focus_on_click">True</property>
-             <property name="response_id">0</property>
+             <property name="response_id">1</property>
 
              <child>
                <widget class="GtkAlignment" id="alignment6">
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry1">
+                           <widget class="GtkEntry" id="codigo">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry2">
+                           <widget class="GtkEntry" id="fechaSolicitud">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry4">
+                           <widget class="GtkEntry" id="prestacion_codigo">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry5">
+                           <widget class="GtkEntry" id="prestacion_nombre">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry6">
+                           <widget class="GtkEntry" id="prestador_cuit">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry7">
+                           <widget class="GtkEntry" id="prestador_nombre">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry8">
+                           <widget class="GtkEntry" id="prestador_email">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
                            </packing>
                          </child>
 
-                         <child>
-                           <widget class="GtkLabel" id="label12">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">Sexo : </property>
-                             <property name="use_underline">False</property>
-                             <property name="use_markup">False</property>
-                             <property name="justify">GTK_JUSTIFY_LEFT</property>
-                             <property name="wrap">False</property>
-                             <property name="selectable">False</property>
-                             <property name="xalign">0</property>
-                             <property name="yalign">0.5</property>
-                             <property name="xpad">0</property>
-                             <property name="ypad">0</property>
-                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                             <property name="width_chars">-1</property>
-                             <property name="single_line_mode">False</property>
-                             <property name="angle">0</property>
-                           </widget>
-                           <packing>
-                             <property name="left_attach">0</property>
-                             <property name="right_attach">1</property>
-                             <property name="top_attach">3</property>
-                             <property name="bottom_attach">4</property>
-                             <property name="x_options">fill</property>
-                             <property name="y_options"></property>
-                           </packing>
-                         </child>
-
                          <child>
                            <widget class="GtkHBox" id="hbox2">
                              <property name="visible">True</property>
                              <property name="spacing">0</property>
 
                              <child>
-                               <widget class="GtkRadioButton" id="sexom">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="label" translatable="yes">Masculino</property>
-                                 <property name="use_underline">True</property>
-                                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                                 <property name="focus_on_click">True</property>
-                                 <property name="active">False</property>
-                                 <property name="inconsistent">False</property>
-                                 <property name="draw_indicator">True</property>
-                               </widget>
-                               <packing>
-                                 <property name="padding">0</property>
-                                 <property name="expand">True</property>
-                                 <property name="fill">True</property>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkRadioButton" id="sexof">
+                               <widget class="GtkEntry" id="afiliado_codigo">
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
-                                 <property name="label" translatable="yes">Femenino</property>
-                                 <property name="use_underline">True</property>
-                                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                                 <property name="focus_on_click">True</property>
-                                 <property name="active">False</property>
-                                 <property name="inconsistent">False</property>
-                                 <property name="draw_indicator">True</property>
-                                 <property name="group">sexom</property>
+                                 <property name="editable">True</property>
+                                 <property name="visibility">True</property>
+                                 <property name="max_length">0</property>
+                                 <property name="text" translatable="yes"></property>
+                                 <property name="has_frame">True</property>
+                                 <property name="invisible_char">*</property>
+                                 <property name="activates_default">False</property>
                                </widget>
                                <packing>
                                  <property name="padding">0</property>
                              <property name="spacing">0</property>
 
                              <child>
-                               <widget class="GtkComboBox" id="tipoDoc">
-                                 <property name="visible">True</property>
-                                 <property name="items" translatable="yes">DNI
-LC
-LE
-CI</property>
-                                 <property name="add_tearoffs">False</property>
-                                 <property name="focus_on_click">True</property>
-                               </widget>
-                               <packing>
-                                 <property name="padding">0</property>
-                                 <property name="expand">False</property>
-                                 <property name="fill">True</property>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkEntry" id="nroDoc">
+                               <widget class="GtkEntry" id="afiliado_documento">
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="editable">False</property>
@@ -1259,7 +1195,7 @@ CI</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="apellido">
+                           <widget class="GtkEntry" id="afiliado_apellido">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
@@ -1281,7 +1217,7 @@ CI</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="nombre">
+                           <widget class="GtkEntry" id="afiliado_nombre">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">False</property>
@@ -1300,6 +1236,34 @@ CI</property>
                              <property name="y_options"></property>
                            </packing>
                          </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label30">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Código : </property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">0</property>
+                             <property name="right_attach">1</property>
+                             <property name="top_attach">3</property>
+                             <property name="bottom_attach">4</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
                        </widget>
                      </child>
                    </widget>
@@ -1355,7 +1319,7 @@ CI</property>
                      <property name="right_padding">0</property>
 
                      <child>
-                       <widget class="GtkLabel" id="label24">
+                       <widget class="GtkLabel" id="estado_cuenta">
                          <property name="visible">True</property>
                          <property name="label" translatable="yes">El afiliado [no]  presenta deuda </property>
                          <property name="use_underline">False</property>
@@ -1432,7 +1396,7 @@ CI</property>
                          <property name="spacing">8</property>
 
                          <child>
-                           <widget class="GtkLabel" id="label22">
+                           <widget class="GtkLabel" id="cobertura">
                              <property name="visible">True</property>
                              <property name="label" translatable="yes">El plan [Cubre/NoCubre] la Prestacion</property>
                              <property name="use_underline">False</property>
@@ -1563,7 +1527,7 @@ CI</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry9">
+                           <widget class="GtkEntry" id="consumo_actual">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">True</property>
@@ -1631,7 +1595,7 @@ CI</property>
                          </child>
 
                          <child>
-                           <widget class="GtkEntry" id="entry10">
+                           <widget class="GtkEntry" id="consumo_limite">
                              <property name="visible">True</property>
                              <property name="can_focus">True</property>
                              <property name="editable">True</property>
index f6d0ff4881958508c760f4434ff5cd97a6c1618b..029cef981f6ded5371a1efe4ac8be405fa5665ff 100644 (file)
@@ -14,9 +14,27 @@ using Dominio;
 public class VRevisarAutorizacionManual
 {
        Glade.XML xml;
+       Glade.XML xml_revisar;
 
        [Widget] TreeView lista;
 
+       /* Revisar Widgets */
+       [Widget] Entry codigo;
+       [Widget] Entry fechaSolicitud;
+       [Widget] Entry prestacion_nombre;
+       [Widget] Entry prestacion_codigo;
+       [Widget] Entry prestador_nombre;
+       [Widget] Entry prestador_cuit;
+       [Widget] Entry prestador_email;
+       [Widget] Entry afiliado_nombre;
+       [Widget] Entry afiliado_apellido;
+       [Widget] Entry afiliado_documento;
+       [Widget] Entry afiliado_codigo;
+       [Widget] Label estado_cuenta;
+       [Widget] Label cobertura;
+       [Widget] Entry consumo_actual;
+       [Widget] Entry consumo_limite;
+
        public VRevisarAutorizacionManual ()
        {
                xml = new Glade.XML (null, "actualizar_autorizacion_manual.glade", "autorizaciones_pendientes", null);
@@ -37,6 +55,62 @@ public class VRevisarAutorizacionManual
 
        public void OnRevisar (object o, EventArgs args)
        {
+               xml_revisar = new Glade.XML (null, "actualizar_autorizacion_manual.glade", "revisar_autorizacion", null);
+               xml_revisar.Autoconnect (this);
+       
+               TreeSelection sel = lista.Selection;
+               TreeModel model;
+               TreeIter iter;
+
+               sel.GetSelected (out model, out iter);
+               int cod = (int)model.GetValue (iter, 0);
+       
+               AutorizacionController c = new AutorizacionController (DateTime.MinValue);
+               AutorizacionManual a = (AutorizacionManual)c.obtener (cod);
+               
+               codigo.Text = String.Format ("{0}", a.Codigo);
+               fechaSolicitud.Text = a.FechaSolicitud.ToString ();
+               prestacion_nombre.Text = a.Prestacion.Nombre;
+               prestacion_codigo.Text = a.Prestacion.Codigo;
+               prestador_nombre.Text = a.Prestador.Nombre;
+               prestador_cuit.Text = a.Prestador.Cuit;
+               prestador_email.Text = a.Prestador.Email;
+               afiliado_nombre.Text = a.Afiliado.Nombre;
+               afiliado_apellido.Text = a.Afiliado.Apellido;
+               afiliado_documento.Text = String.Format ("{0} {1}", a.Afiliado.TipoDocumento, a.Afiliado.NroDocumento);
+               afiliado_codigo.Text = String.Format ("{0}", a.Afiliado.Codigo);
+               if (a.Afiliado.Moroso == 0)
+                       estado_cuenta.Text = "No se registra deuda del Afiliado";
+               else
+                       estado_cuenta.Text = String.Format ("El afiliado debe {0} meses.", a.Afiliado.Moroso);
+               
+               cobertura.Text = "La prestacion esta cubierta";
+               /* Necesitariamos un query que cuente este dato */
+               consumo_actual.Text = "1";
+               /* Necesitariamos un metodo que busque la Cobertura para este Prestador y esta Prestacion 
+                * del Plan del cliente
+                */
+               consumo_limite.Text = "2"; 
+
+               Dialog v = (Dialog)xml_revisar.GetWidget ("revisar_autorizacion");
+               v.Run ();
+               v.Destroy ();
+
+               c.Dispose ();
+       }
+
+       public void OnRevisarResponse (object o, ResponseArgs args)
+       {
+               if (args.ResponseId == ResponseType.Close) {
+                       Console.WriteLine ("Cerrando");
+                       return; 
+               }
+               if (((int)args.ResponseId) == 0) {
+                       Console.WriteLine ("Aprobado");
+               }
+               if (((int)args.ResponseId) == 1) {
+                       Console.WriteLine ("Rechazado");
+               }
        }
 
        private void CargarAutorizaciones ()