Exemplo n.º 1
0
        public int mtdRegistar(Publicaciones objpub)
        {
            clConexion objcone  = new clConexion();
            string     consulta = "insert into Publicacion(Nombre, Precio, Descripcion, Telefono, Estrato, Direccion, NumeroHabitaciones, IdUsuario, IdTipo, IdEstado, IdCiudad, IdCategoria) values('" + objpub.Nombre + "', " + objpub.Precio + ", '" + objpub.Descripcion + "', '" + objpub.Telefono + "', '" + objpub.Estrato + "', " + objpub.NumeroHabitaciones + ", " + objpub.IdUsuario + ", " + objpub.IdTipo + ", " + objpub.IdEstado + ", " + objpub.IdCiudad + ", " + objpub.IdCategoria + ")";
            int        res      = objcone.mtdConectado(consulta);

            return(res);
        }
Exemplo n.º 2
0
        public int mtdRegistrar()
        {
            string consulta = "insert into donante(Nombre,Apellido,Documento,TipoDocumento,FechaNacimiento,tipoSangre,Telefono,Email)" +
                              "values('" + Nombre + "','" + Apellido + "','" + Documento + "','" + TipoDocumento + "','" + FechaNacimiento + "','" +
                              "" + TipoSangre + "','" + Telefono + "','" + Email + ")";


            int registros = objConexion.mtdConectado(consulta);

            return(registros);
        }
Exemplo n.º 3
0
        public int mtdRegistrar()
        {
            string consulta = "insert into donante(Nombre,Apellido,Documento,Edad,FechaNacimiento,Peso,Genero,tipoSangre,RH,Telefono,Email)" +
                              "values('" + Nombre + "','" + Apellido + "','" + Documento + "','" + Edad + "','" + FechaNacimiento + "','" +
                              "" + Peso + "','" + Genero + "','" + TipoSangre + "','" + RH + "','" + Telefono + "','" + Email + ")";


            int registros = objConexion.mtdConectado(consulta);

            return(registros);

            DateTime fechaActual = DateTime.Now;
            string   fecha       = Convert.ToDateTime(fechaActual).ToString("yyyy-MM-dd,hh,mm,ss");
        }