public void Modify(ClienteEN cliente)
        {
            try
            {
                SessionInitializeTransaction ();
                ClienteEN clienteEN = (ClienteEN)session.Load (typeof(ClienteEN), cliente.Dni);

                clienteEN.Nombre = cliente.Nombre;

                clienteEN.Apellido = cliente.Apellido;

                clienteEN.Sexo = cliente.Sexo;

                clienteEN.Telefono = cliente.Telefono;

                clienteEN.Direccion = cliente.Direccion;

                session.Update (clienteEN);
                SessionCommit ();
            }

            catch (Exception ex) {
                SessionRollBack ();
                if (ex is VeterinaryManagerGenNHibernate.Exceptions.ModelException)
                        throw ex;
                throw new VeterinaryManagerGenNHibernate.Exceptions.DataLayerException ("Error in ClienteCAD.", ex);
            }

            finally
            {
                SessionClose ();
            }
        }
        public void Modify(string p_Cliente_OID, string p_nombre, string p_apellido, string p_sexo, string p_telefono, string p_direccion)
        {
            ClienteEN clienteEN = null;

            //Initialized ClienteEN
            clienteEN = new ClienteEN ();
            clienteEN.Dni = p_Cliente_OID;
            clienteEN.Nombre = p_nombre;
            clienteEN.Apellido = p_apellido;
            clienteEN.Sexo = p_sexo;
            clienteEN.Telefono = p_telefono;
            clienteEN.Direccion = p_direccion;
            //Call to ClienteCAD

            _IClienteCAD.Modify (clienteEN);
        }
        public string New_(string p_nombre, string p_apellido, string p_sexo, string p_telefono, string p_direccion, string p_dni)
        {
            ClienteEN clienteEN = null;
            string oid;

            //Initialized ClienteEN
            clienteEN = new ClienteEN ();
            clienteEN.Nombre = p_nombre;

            clienteEN.Apellido = p_apellido;

            clienteEN.Sexo = p_sexo;

            clienteEN.Telefono = p_telefono;

            clienteEN.Direccion = p_direccion;

            clienteEN.Dni = p_dni;

            //Call to ClienteCAD

            oid = _IClienteCAD.New_ (clienteEN);
            return oid;
        }
 public ClienteEN(ClienteEN cliente)
 {
     this.init (cliente.Dni, cliente.Nombre, cliente.Apellido, cliente.Sexo, cliente.Telefono, cliente.Direccion);
 }
        public string New_(ClienteEN cliente)
        {
            try
            {
                SessionInitializeTransaction ();

                session.Save (cliente);
                SessionCommit ();
            }

            catch (Exception ex) {
                SessionRollBack ();
                if (ex is VeterinaryManagerGenNHibernate.Exceptions.ModelException)
                        throw ex;
                throw new VeterinaryManagerGenNHibernate.Exceptions.DataLayerException ("Error in ClienteCAD.", ex);
            }

            finally
            {
                SessionClose ();
            }

            return cliente.Dni;
        }