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)); }
public void Eliminar() { ArtistasDisqueraBO artD = InterfaceToData(); if (artD.idAD > 0) { objdao.Delete(artD); Facade("Select"); } }
public void Modificar() { ArtistasDisqueraBO artD = InterfaceToData(); if (artD.idAD != 0) { objdao.Update(artD); } Facade("Select"); }
protected void Page_Load(object sender, EventArgs e) { obj = new ArtistasDisqueraBO(); objdao = new ArtistasDisqueraDAO(); if (!Page.IsPostBack) { Facade("Select"); Facade("Combos"); } }
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)); }
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)); }