SlideShare a Scribd company logo
1 of 8
borrar CLIENTE PROVEEDOR PRODUCTO VENTAS
private void Form20_Load(object sender, EventArgs e)         {             DataSet TABLA;             SqlDataAdapter ORDEN;             con = new SqlConnection();             con.ConnectionString = vgloba.liga;             string q = "select * from PRODUCTOS";             ORDEN = new SqlDataAdapter(q, con);             // Creando el dataset y cargandolo             TABLA = new DataSet();             ORDEN.Fill(TABLA, "PRODUCTOS");             // Cargando el datagridview             dataGridView1.DataSource = TABLA;             dataGridView1.DataMember = "PRODUCTOS";         }
ESTE CODIGO VA DENTRO DEL BOTON. private void button3_Click(object sender, EventArgs e)         {             con = new SqlConnection();             con.ConnectionString = vgloba.liga;             try             { con.Open();                 con = new SqlConnection();                 con.ConnectionString = vgloba.liga;                 string buscar = "SELECT * from PRODUCTOS where ID_PRODUCTO= '" + textBox1.Text + "'"; SqlCommand ORDEN = new SqlCommand(buscar, con); ORDEN.Connection.Open(); ORDEN.ExecuteNonQuery(); SqlDataReaderreader = ORDEN.ExecuteReader(); reader.Read(); if (reader.HasRows) {
 //SqlCommand ORDER;                     con = new SqlConnection();                     con.ConnectionString = vgloba.liga; if (MessageBox.Show("¿Eliminar el PRODUCTO" + textBox1.Text + "?", "Confirmar", MessageBoxButtons.YesNo) == DialogResult.Yes)                     {                         string eliminar = "DELETE FROM PRODUCTOS WHERE ID_PRODUCTO='" + textBox1.Text + "'"; SqlCommand ORDEN2 = new SqlCommand(eliminar, con);                         ORDEN2.Connection.Open();                         ORDEN2.ExecuteNonQuery(); MessageBox.Show("PRODUCTO ELIMINADO");                         textBox1.Text = "";                     } else                     { MessageBox.Show("No se puede eliminar el PRODUCTO");                     }                 } else                 { MessageBox.Show("El ID proporcionado no existe");                     textBox1.Text = "";                 }             }             catch             { MessageBox.Show("Conexion fallida");             }             Form18 ventana = new Form18(); ventana.Show(); this.Close();         }     }
ESTE MISMO CODIGO SE UTILIZA EN LAS DEMAS VENTANAS PERO CON SU RESPECTIVOS DATOS DE LA BASE DE DATOS.
Borrar
Borrar

More Related Content

What's hot

MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMatteo Pagani
 
The Ring programming language version 1.6 book - Part 22 of 189
The Ring programming language version 1.6 book - Part 22 of 189The Ring programming language version 1.6 book - Part 22 of 189
The Ring programming language version 1.6 book - Part 22 of 189Mahmoud Samir Fayed
 
Cross platform Objective-C Strategy
Cross platform Objective-C StrategyCross platform Objective-C Strategy
Cross platform Objective-C StrategyGraham Lee
 
Java script frame history
Java script frame historyJava script frame history
Java script frame historyH K
 
2018年のXamarinの概要と活用方法
2018年のXamarinの概要と活用方法2018年のXamarinの概要と活用方法
2018年のXamarinの概要と活用方法Yoshito Tabuchi
 
Opa presentation at GamesJs
Opa presentation at GamesJsOpa presentation at GamesJs
Opa presentation at GamesJsHenri Binsztok
 
Single linked list
Single linked listSingle linked list
Single linked listSayantan Sur
 
Circular linked list
Circular linked listCircular linked list
Circular linked listSayantan Sur
 
The Ring programming language version 1.2 book - Part 10 of 84
The Ring programming language version 1.2 book - Part 10 of 84The Ring programming language version 1.2 book - Part 10 of 84
The Ring programming language version 1.2 book - Part 10 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 11 of 84
The Ring programming language version 1.2 book - Part 11 of 84The Ring programming language version 1.2 book - Part 11 of 84
The Ring programming language version 1.2 book - Part 11 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 9 of 84
The Ring programming language version 1.2 book - Part 9 of 84The Ring programming language version 1.2 book - Part 9 of 84
The Ring programming language version 1.2 book - Part 9 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84Mahmoud Samir Fayed
 
How to send a mail from utl smtp or from back end
How to send a mail from utl smtp or from back endHow to send a mail from utl smtp or from back end
How to send a mail from utl smtp or from back endManju Nath
 

What's hot (20)

MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applications
 
final project for C#
final project for C#final project for C#
final project for C#
 
The Ring programming language version 1.6 book - Part 22 of 189
The Ring programming language version 1.6 book - Part 22 of 189The Ring programming language version 1.6 book - Part 22 of 189
The Ring programming language version 1.6 book - Part 22 of 189
 
Cross platform Objective-C Strategy
Cross platform Objective-C StrategyCross platform Objective-C Strategy
Cross platform Objective-C Strategy
 
Java script frame history
Java script frame historyJava script frame history
Java script frame history
 
2018年のXamarinの概要と活用方法
2018年のXamarinの概要と活用方法2018年のXamarinの概要と活用方法
2018年のXamarinの概要と活用方法
 
Opa presentation at GamesJs
Opa presentation at GamesJsOpa presentation at GamesJs
Opa presentation at GamesJs
 
yazılı
yazılıyazılı
yazılı
 
Single linked list
Single linked listSingle linked list
Single linked list
 
Know your errors
Know your errorsKnow your errors
Know your errors
 
Juego
JuegoJuego
Juego
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
 
C programming
C programmingC programming
C programming
 
The Ring programming language version 1.2 book - Part 10 of 84
The Ring programming language version 1.2 book - Part 10 of 84The Ring programming language version 1.2 book - Part 10 of 84
The Ring programming language version 1.2 book - Part 10 of 84
 
Event
EventEvent
Event
 
The Ring programming language version 1.2 book - Part 11 of 84
The Ring programming language version 1.2 book - Part 11 of 84The Ring programming language version 1.2 book - Part 11 of 84
The Ring programming language version 1.2 book - Part 11 of 84
 
Spring Transaction
Spring TransactionSpring Transaction
Spring Transaction
 
The Ring programming language version 1.2 book - Part 9 of 84
The Ring programming language version 1.2 book - Part 9 of 84The Ring programming language version 1.2 book - Part 9 of 84
The Ring programming language version 1.2 book - Part 9 of 84
 
The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84
 
How to send a mail from utl smtp or from back end
How to send a mail from utl smtp or from back endHow to send a mail from utl smtp or from back end
How to send a mail from utl smtp or from back end
 

Similar to Borrar

DAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docx
DAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docxDAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docx
DAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docxtheodorelove43763
 
Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012Sandeep Joshi
 
sdasdqwe.pptx
sdasdqwe.pptxsdasdqwe.pptx
sdasdqwe.pptxhgkj2
 
2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avancees2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avanceesNathaniel Richand
 
Sumsem2014 15 cp0399-13-jun-2015_rm01_programs
Sumsem2014 15 cp0399-13-jun-2015_rm01_programsSumsem2014 15 cp0399-13-jun-2015_rm01_programs
Sumsem2014 15 cp0399-13-jun-2015_rm01_programsAbhijit Borah
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"epamspb
 
Dompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code CompletionDompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code CompletionSALT Lab @ UBC
 
bai giai de LTWINForm.docx
bai giai de LTWINForm.docxbai giai de LTWINForm.docx
bai giai de LTWINForm.docxVnThanh292761
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84Mahmoud Samir Fayed
 

Similar to Borrar (20)

DAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docx
DAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docxDAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docx
DAOFactory.javaDAOFactory.javapublicclassDAOFactory{ this .docx
 
Ditec esoft C# project
Ditec esoft C# projectDitec esoft C# project
Ditec esoft C# project
 
Ditec esoft C# project
Ditec esoft C# project Ditec esoft C# project
Ditec esoft C# project
 
Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
syed
syedsyed
syed
 
Quanlycanbo
QuanlycanboQuanlycanbo
Quanlycanbo
 
sdasdqwe.pptx
sdasdqwe.pptxsdasdqwe.pptx
sdasdqwe.pptx
 
C++ practical
C++ practicalC++ practical
C++ practical
 
2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avancees2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avancees
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
Sumsem2014 15 cp0399-13-jun-2015_rm01_programs
Sumsem2014 15 cp0399-13-jun-2015_rm01_programsSumsem2014 15 cp0399-13-jun-2015_rm01_programs
Sumsem2014 15 cp0399-13-jun-2015_rm01_programs
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
 
Dompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code CompletionDompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code Completion
 
MaintainStaffTable
MaintainStaffTableMaintainStaffTable
MaintainStaffTable
 
bai giai de LTWINForm.docx
bai giai de LTWINForm.docxbai giai de LTWINForm.docx
bai giai de LTWINForm.docx
 
Writing Good Tests
Writing Good TestsWriting Good Tests
Writing Good Tests
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84
 
Soa lab
Soa lab   Soa lab
Soa lab
 

More from ilian patricia bocanegra alfaro (20)

Edi
EdiEdi
Edi
 
EDI
EDIEDI
EDI
 
Diseño de almacen de datos
Diseño de almacen de datos Diseño de almacen de datos
Diseño de almacen de datos
 
Diseño de almacen de datos
Diseño de almacen de datosDiseño de almacen de datos
Diseño de almacen de datos
 
Diseño de almacen de datos
Diseño de almacen de datosDiseño de almacen de datos
Diseño de almacen de datos
 
Sgbdoo
SgbdooSgbdoo
Sgbdoo
 
ODMG
ODMGODMG
ODMG
 
Diseño orientado a flujo de datos
Diseño orientado a flujo de datosDiseño orientado a flujo de datos
Diseño orientado a flujo de datos
 
F:\diseño orientado a flujo de datos
F:\diseño orientado a flujo de datosF:\diseño orientado a flujo de datos
F:\diseño orientado a flujo de datos
 
Acceder
AccederAcceder
Acceder
 
Acceder
AccederAcceder
Acceder
 
Modificar
ModificarModificar
Modificar
 
Añadir
AñadirAñadir
Añadir
 
Añadir
AñadirAñadir
Añadir
 
GEOMETRIC COMPUTER PROGRAMA DE BD
GEOMETRIC COMPUTER PROGRAMA DE BDGEOMETRIC COMPUTER PROGRAMA DE BD
GEOMETRIC COMPUTER PROGRAMA DE BD
 
I:\pantallas
I:\pantallasI:\pantallas
I:\pantallas
 
Pantallas
PantallasPantallas
Pantallas
 
Pantallas
PantallasPantallas
Pantallas
 
Procesamientos Almacenados
Procesamientos AlmacenadosProcesamientos Almacenados
Procesamientos Almacenados
 
Disparadores
DisparadoresDisparadores
Disparadores
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Borrar

  • 1. borrar CLIENTE PROVEEDOR PRODUCTO VENTAS
  • 2.
  • 3. private void Form20_Load(object sender, EventArgs e) { DataSet TABLA; SqlDataAdapter ORDEN; con = new SqlConnection(); con.ConnectionString = vgloba.liga; string q = "select * from PRODUCTOS"; ORDEN = new SqlDataAdapter(q, con); // Creando el dataset y cargandolo TABLA = new DataSet(); ORDEN.Fill(TABLA, "PRODUCTOS"); // Cargando el datagridview dataGridView1.DataSource = TABLA; dataGridView1.DataMember = "PRODUCTOS"; }
  • 4. ESTE CODIGO VA DENTRO DEL BOTON. private void button3_Click(object sender, EventArgs e) { con = new SqlConnection(); con.ConnectionString = vgloba.liga; try { con.Open(); con = new SqlConnection(); con.ConnectionString = vgloba.liga; string buscar = "SELECT * from PRODUCTOS where ID_PRODUCTO= '" + textBox1.Text + "'"; SqlCommand ORDEN = new SqlCommand(buscar, con); ORDEN.Connection.Open(); ORDEN.ExecuteNonQuery(); SqlDataReaderreader = ORDEN.ExecuteReader(); reader.Read(); if (reader.HasRows) {
  • 5. //SqlCommand ORDER; con = new SqlConnection(); con.ConnectionString = vgloba.liga; if (MessageBox.Show("¿Eliminar el PRODUCTO" + textBox1.Text + "?", "Confirmar", MessageBoxButtons.YesNo) == DialogResult.Yes) { string eliminar = "DELETE FROM PRODUCTOS WHERE ID_PRODUCTO='" + textBox1.Text + "'"; SqlCommand ORDEN2 = new SqlCommand(eliminar, con); ORDEN2.Connection.Open(); ORDEN2.ExecuteNonQuery(); MessageBox.Show("PRODUCTO ELIMINADO"); textBox1.Text = ""; } else { MessageBox.Show("No se puede eliminar el PRODUCTO"); } } else { MessageBox.Show("El ID proporcionado no existe"); textBox1.Text = ""; } } catch { MessageBox.Show("Conexion fallida"); } Form18 ventana = new Form18(); ventana.Show(); this.Close(); } }
  • 6. ESTE MISMO CODIGO SE UTILIZA EN LAS DEMAS VENTANAS PERO CON SU RESPECTIVOS DATOS DE LA BASE DE DATOS.