Esempio n. 1
0
        public int Delete(ArtistasDisqueraBO obj)
        {
            string     delete = "delete from ArtistasPorDisquera where idArtistaD = @idArtistaD";
            SqlCommand cmd    = new SqlCommand(delete, conn);

            cmd.Parameters.Add(new SqlParameter("@idArtistaD", SqlDbType.Int)).Value = obj.idAD;

            return(EjecutarSQL(cmd));
        }
Esempio n. 2
0
        public void Eliminar()
        {
            ArtistasDisqueraBO artD = InterfaceToData();

            if (artD.idAD > 0)
            {
                objdao.Delete(artD);
                Facade("Select");
            }
        }
Esempio n. 3
0
        public void Modificar()
        {
            ArtistasDisqueraBO artD = InterfaceToData();

            if (artD.idAD != 0)
            {
                objdao.Update(artD);
            }
            Facade("Select");
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            obj    = new ArtistasDisqueraBO();
            objdao = new ArtistasDisqueraDAO();

            if (!Page.IsPostBack)
            {
                Facade("Select");
                Facade("Combos");
            }
        }
Esempio n. 5
0
        public int Insert(ArtistasDisqueraBO obj)
        {
            string     insert = "insert into ArtistasPorDisquera(idArtista, idDisquera) values(@idArtista,@idDisquera)";
            SqlCommand cmd    = new SqlCommand(insert, conn);

            cmd.Parameters.Add(new SqlParameter("@idArtista", SqlDbType.Int));
            cmd.Parameters.Add(new SqlParameter("@idDisquera", SqlDbType.Int));

            cmd.Parameters["@idArtista"].Value  = obj.idArtista;
            cmd.Parameters["@idDisquera"].Value = obj.idDisquera;
            return(EjecutarSQL(cmd));
        }
Esempio n. 6
0
        public int Update(ArtistasDisqueraBO obj)
        {
            string     update = "update ArtistasPorDisquera set idArtista = @idArtista, idDisquera = @idDisquera where idAD = @idArtistaD";
            SqlCommand cmd    = new SqlCommand(update, conn);

            cmd.Parameters.Add(new SqlParameter("@idArtista", SqlDbType.Int));
            cmd.Parameters.Add(new SqlParameter("@idDisquera", SqlDbType.Int));
            cmd.Parameters.Add(new SqlParameter("@idArtistaD", SqlDbType.Int));

            cmd.Parameters["@idArtista"].Value  = obj.idArtista;
            cmd.Parameters["@idDisquera"].Value = obj.idDisquera;
            cmd.Parameters["@idArtistaD"].Value = obj.idAD;
            return(EjecutarSQL(cmd));
        }