Ejemplo n.º 1
0
        public static int agregar(DateTime f_Asociacion, string identificacion, string nombres, string apellidos, string direccion,
                                  string telefono, string correo, bool activo)
        {
            int   res = -1;
            Socio so  = new Socio()
            {
                FechaAsociacion = f_Asociacion,
                Personas        = new Personas {
                    Identificacion = identificacion,
                    Nombres        = nombres,
                    Apellidos      = apellidos,
                    Direccion      = direccion,
                    Telefono       = telefono,
                    Correo         = correo,
                    Activo         = activo
                }
            };//finaliza la creacion del nuevo socio

            try
            {
                var db = new _Socio(so);
                res = db.agregar();
            }
            catch (Exception e)
            {
                Console.WriteLine("ERROR " + e.Message);
            }
            return(res);
        }//fin del metodo agregar