]> git.llucax.com Git - z.facultad/75.10/miklolife.git/blobdiff - demo/src/Dominio/Prestacion.cs
(no commit message)
[z.facultad/75.10/miklolife.git] / demo / src / Dominio / Prestacion.cs
index 2fc922b913f7fa06a98e2d8efd5e4218a36b81e6..03fb51dc4196bd99e8eb5f0f1a7e0c84dcd2c88f 100644 (file)
@@ -23,6 +23,7 @@ namespace Dominio
                        
                        public Prestacion()
                        {
                        
                        public Prestacion()
                        {
+                               _prestadores = new ArrayList ();
                        }
 
                        public Prestacion( string codigo )
                        }
 
                        public Prestacion( string codigo )
@@ -30,6 +31,12 @@ namespace Dominio
                                this.Codigo = codigo;
                        }
 
                                this.Codigo = codigo;
                        }
 
+                       public Prestacion( string codigo, string nombre )
+                       {
+                               this.Codigo = codigo;
+                               this.Nombre = nombre;
+                       }
+
                        #endregion Constructores
 
                        public bool AgregarPrestador (Prestador p)
                        #endregion Constructores
 
                        public bool AgregarPrestador (Prestador p)
@@ -37,7 +44,17 @@ namespace Dominio
                                _prestadores.Add (p);
                                return true;
                        }
                                _prestadores.Add (p);
                                return true;
                        }
-                       
+
+                       public bool ExistePrestador (Prestador p)
+                       {
+                               if (_prestadores == null) return false;
+
+                               foreach (Prestador p1 in _prestadores) {
+                                       if (p1.Cuit.Equals (p.Cuit))
+                                               return true;
+                               }
+                               return false;
+                       }                       
                }
 
        }
                }
 
        }