SlideShare a Scribd company logo
2014
Equipo-CODRED
15/05/2014
Conalep zacualpan 101
Elaboración y mantenimiento de sistemas de información
606
Anayenzi Perez Mena
Profesor:Ing.Agustin Hernández Delgado
Anayenzi Perez Mena-- 606
○Botón Consultar○
REM consultas
Dim mitabla As DataTable =
CODREP_________________________________DataSet.ALTAS
Dim cfilas As DataRowCollection = mitabla.Rows
Dim nuevafila As DataRow
Dim i As Integer
Dim n As String
n = ALTASBindingSource.Count()
Dim bandera As Boolean
bandera = True
Dim tamaño As Integer
tamaño = ALTASBindingSource.Count()
i = 1
If (tamaño = 0) Then
Else
Do
If (Trim(MATRICULATextBox.Text) = Trim(TextBox1.Text)) Then
bandera = False
Else
ALTASBindingSource.MoveNext()
i = i + 1
End If
Loop While (bandera = True And i <= tamaño)
End If
If (bandera = False) Then
MATRICULATextBox.Visible = False
NOMBRETextBox.Visible = False
APELLIDOTextBox.Visible = False
Anayenzi Perez Mena-- 606
ESPECIALIDADTextBox.Visible = False
GRUPOTextBox.Visible = False
TURNOTextBox.Visible = False
MATRICULATextBox.Enabled = False
NOMBRETextBox.Enabled = False
APELLIDOTextBox.Enabled = False
ESPECIALIDADTextBox.Enabled = False
GRUPOTextBox.Enabled = False
TURNOTextBox.Enabled = False
MsgBox("Ya existe")
TextBox1.Text = ""
TextBox1.Focus()
Else
MsgBox("Introduce datos")
nuevafila = mitabla.NewRow
cfilas.Add(nuevafila)
ALTASBindingSource.MoveLast()
MATRICULATextBox.Enabled = True
MATRICULATextBox.Visible = True
ID_ALTATextBox.Enabled = True
ID_ALTATextBox.Visible = True
NOMBRETextBox.Enabled = True
NOMBRETextBox.Visible = True
APELLIDOTextBox.Enabled = True
APELLIDOTextBox.Visible = True
ESPECIALIDADTextBox.Enabled = True
ESPECIALIDADTextBox.Visible = True
GRUPOTextBox.Enabled = True
GRUPOTextBox.Visible = True
GRUPOTextBox.Enabled = True
GRUPOTextBox.Visible = True
TURNOTextBox.Enabled = True
TURNOTextBox.Visible = True
nuevafila(1) = UCase(MATRICULATextBox.Text)
nuevafila(2) = UCase(ID_ALTATextBox.Text)
nuevafila(3) = UCase(TextBox1.Text)
nuevafila(4) = UCase(NOMBRETextBox.Text)
nuevafila(5) = UCase(APELLIDOTextBox.Text)
nuevafila(6) = UCase(ESPECIALIDADTextBox.Text)
nuevafila(7) = UCase(GRUPOTextBox.Text)
nuevafila(8) = UCase(TURNOTextBox.Text)
End If
End Sub
Anayenzi Perez Mena-- 606
○Botón eliminar○
Dim response As MsgBoxResult
Dim MSG As String
Dim TITULO As String
Dim ESTILO As MsgBoxStyle
Dim registroactual As DataRowView
ESTILO = MsgBoxStyle.YesNo
TITULO = "Borrando..."
MSG = " ¿Desea Borrar Los Datos.?"
Dim c1 As String
Dim c2 As String
Dim res As Boolean
Dim bandera As Boolean
bandera = True
Dim SI As Integer
SI = SI
Dim tam As Integer
tam = ALTASBindingSource.Count()
ALTASBindingSource.MoveFirst()
res = False
c1 = RTrim(TextBox1.Text)
c2 = RTrim(MATRICULATextBox.Text)
If (tam = 0) Then
MsgBox("tabla vacia")
Else
ALTASBindingSource.MoveFirst()
c1 = UCase(Trim(MATRICULATextBox.Text))
Do
Anayenzi Perez Mena-- 606
res = c1 Like c2
If (res = True) Then
bandera = False
Else
ALTASBindingSource.MoveNext()
c1 = UCase(Trim(MATRICULATextBox.Text))
SI += 1
End If
Loop While (bandera = True And SI <= tam)
End If
If (bandera = True) Then
MATRICULATextBox.Enabled = False
MATRICULATextBox.Visible = False
NOMBRETextBox.Enabled = False
NOMBRETextBox.Visible = False
APELLIDOTextBox.Enabled = False
APELLIDOTextBox.Visible = False
TURNOTextBox.Enabled = False
TURNOTextBox.Visible = False
GRUPOTextBox.Enabled = False
GRUPOTextBox.Visible = False
ESPECIALIDADTextBox.Enabled = False
ESPECIALIDADTextBox.Visible = False
TextBox1.Text = ""
TextBox1.Focus()
MsgBox("Alumno No Encontrado")
Else
MATRICULATextBox.Enabled = False
MATRICULATextBox.Visible = True
NOMBRETextBox.Enabled = False
NOMBRETextBox.Visible = True
APELLIDOTextBox.Enabled = False
APELLIDOTextBox.Visible = True
TURNOTextBox.Enabled = False
TURNOTextBox.Visible = True
GRUPOTextBox.Enabled = False
GRUPOTextBox.Visible = True
ESPECIALIDADTextBox.Enabled = False
ESPECIALIDADTextBox.Visible = True
TextBox1.Text = ""
TextBox1.Focus()
response = MsgBox(MSG, ESTILO, TITULO)
If (response = MsgBoxResult.Yes) Then
registroactual = ALTASBindingSource.Current
registroactual.Row.Delete()
Me.ALTASTableAdapter.Update(Me.CODREP_________________________________DataSet.ALTAS)
MsgBox("Se Borro EL Registro De la Tabla..")
MATRICULATextBox.Enabled = False
MATRICULATextBox.Visible = False
NOMBRETextBox.Enabled = False
Anayenzi Perez Mena-- 606
NOMBRETextBox.Visible = False
APELLIDOTextBox.Enabled = False
APELLIDOTextBox.Visible = False
TURNOTextBox.Enabled = False
TURNOTextBox.Visible = False
GRUPOTextBox.Enabled = False
GRUPOTextBox.Visible = False
ESPECIALIDADTextBox.Enabled = False
ESPECIALIDADTextBox.Visible = False
TextBox1.Text = ""
TextBox1.Focus()
Else
MATRICULATextBox.Enabled = False
MATRICULATextBox.Visible = False
NOMBRETextBox.Enabled = False
NOMBRETextBox.Visible = False
APELLIDOTextBox.Enabled = False
APELLIDOTextBox.Visible = False
TURNOTextBox.Enabled = False
TURNOTextBox.Visible = False
GRUPOTextBox.Enabled = False
GRUPOTextBox.Visible = False
ESPECIALIDADTextBox.Enabled = False
ESPECIALIDADTextBox.Visible = False
TextBox1.Text = ""
TextBox1.Focus()
MsgBox("NO SE HA BORRADO EL REGISTRO DE LA TABLA...")
End If
End If
End Sub
○Grabando Ahora○
If (CODREP_________________________________DataSet.HasChanges) Then
Me.Validate()
Me.ALTASBindingSource.EndEdit()
Me.ALTASTableAdapter.Update(Me.BaseCODREPDataSet.ALTAS)
MsgBox("Datos Grabando ahora")
TextBox1.Text = ""
TextBox1.Focus()
MATRICULATextBox.Enabled = False
NOMBRETextBox.Enabled = False
APELLIDOTextBox.Enabled = False
ESPECIALIDADTextBox.Enabled = False
GRUPOTextBox.Enabled = False
End If
End Sub

More Related Content

Recently uploaded

The Good News, newsletter for June 2024 is here
The Good News, newsletter for June 2024 is hereThe Good News, newsletter for June 2024 is here
The Good News, newsletter for June 2024 is here
NoHo FUMC
 
The Chakra System in our body - A Portal to Interdimensional Consciousness.pptx
The Chakra System in our body - A Portal to Interdimensional Consciousness.pptxThe Chakra System in our body - A Portal to Interdimensional Consciousness.pptx
The Chakra System in our body - A Portal to Interdimensional Consciousness.pptx
Bharat Technology
 
Lesson 9 - Resisting Temptation Along the Way.pptx
Lesson 9 - Resisting Temptation Along the Way.pptxLesson 9 - Resisting Temptation Along the Way.pptx
Lesson 9 - Resisting Temptation Along the Way.pptx
Celso Napoleon
 
St. John's Parish Magazine - June 2024 ..
St. John's Parish Magazine - June 2024 ..St. John's Parish Magazine - June 2024 ..
St. John's Parish Magazine - June 2024 ..
Chris Lyne
 
What Should be the Christian View of Anime?
What Should be the Christian View of Anime?What Should be the Christian View of Anime?
What Should be the Christian View of Anime?
Joe Muraguri
 
Homily: The Solemnity of the Most Holy Trinity Sunday 2024.docx
Homily: The Solemnity of the Most Holy Trinity Sunday 2024.docxHomily: The Solemnity of the Most Holy Trinity Sunday 2024.docx
Homily: The Solemnity of the Most Holy Trinity Sunday 2024.docx
James Knipper
 
Deerfoot Church of Christ Bulletin 6 2 24
Deerfoot Church of Christ Bulletin 6 2 24Deerfoot Church of Christ Bulletin 6 2 24
Deerfoot Church of Christ Bulletin 6 2 24
deerfootcoc
 
Kenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdf
Kenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdfKenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdf
Kenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdf
AlanBianch
 
Jesus Heals a Paralyzed Man for Children
Jesus Heals a Paralyzed Man for ChildrenJesus Heals a Paralyzed Man for Children
Jesus Heals a Paralyzed Man for Children
NelTorrente
 
English - The Book of Joshua the Son of Nun.pdf
English - The Book of Joshua the Son of Nun.pdfEnglish - The Book of Joshua the Son of Nun.pdf
English - The Book of Joshua the Son of Nun.pdf
Filipino Tracts and Literature Society Inc.
 
Hebrew Gospel of Matthew by George Howard
Hebrew Gospel of Matthew by George HowardHebrew Gospel of Matthew by George Howard
Hebrew Gospel of Matthew by George Howard
GiovanniZdeOliveira
 
TALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdf
TALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdfTALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdf
TALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdf
meharoof1
 
The PBHP DYC ~ Reflections on The Dhamma (English).pptx
The PBHP DYC ~ Reflections on The Dhamma (English).pptxThe PBHP DYC ~ Reflections on The Dhamma (English).pptx
The PBHP DYC ~ Reflections on The Dhamma (English).pptx
OH TEIK BIN
 
Qualifications in psychology _Dr.Navis.pdf
Qualifications in psychology _Dr.Navis.pdfQualifications in psychology _Dr.Navis.pdf
Qualifications in psychology _Dr.Navis.pdf
Oavis Or
 
Evangelization in the footsteps of Saint Vincent de Paul
Evangelization in the footsteps of Saint Vincent de PaulEvangelization in the footsteps of Saint Vincent de Paul
Evangelization in the footsteps of Saint Vincent de Paul
Famvin: the Worldwide Vincentian Family
 
Jude: Practical Exhortations_Jude 17-23.pptx
Jude: Practical Exhortations_Jude 17-23.pptxJude: Practical Exhortations_Jude 17-23.pptx
Jude: Practical Exhortations_Jude 17-23.pptx
Stephen Palm
 

Recently uploaded (16)

The Good News, newsletter for June 2024 is here
The Good News, newsletter for June 2024 is hereThe Good News, newsletter for June 2024 is here
The Good News, newsletter for June 2024 is here
 
The Chakra System in our body - A Portal to Interdimensional Consciousness.pptx
The Chakra System in our body - A Portal to Interdimensional Consciousness.pptxThe Chakra System in our body - A Portal to Interdimensional Consciousness.pptx
The Chakra System in our body - A Portal to Interdimensional Consciousness.pptx
 
Lesson 9 - Resisting Temptation Along the Way.pptx
Lesson 9 - Resisting Temptation Along the Way.pptxLesson 9 - Resisting Temptation Along the Way.pptx
Lesson 9 - Resisting Temptation Along the Way.pptx
 
St. John's Parish Magazine - June 2024 ..
St. John's Parish Magazine - June 2024 ..St. John's Parish Magazine - June 2024 ..
St. John's Parish Magazine - June 2024 ..
 
What Should be the Christian View of Anime?
What Should be the Christian View of Anime?What Should be the Christian View of Anime?
What Should be the Christian View of Anime?
 
Homily: The Solemnity of the Most Holy Trinity Sunday 2024.docx
Homily: The Solemnity of the Most Holy Trinity Sunday 2024.docxHomily: The Solemnity of the Most Holy Trinity Sunday 2024.docx
Homily: The Solemnity of the Most Holy Trinity Sunday 2024.docx
 
Deerfoot Church of Christ Bulletin 6 2 24
Deerfoot Church of Christ Bulletin 6 2 24Deerfoot Church of Christ Bulletin 6 2 24
Deerfoot Church of Christ Bulletin 6 2 24
 
Kenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdf
Kenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdfKenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdf
Kenneth Grant - Against the Light-Holmes Pub Grou Llc (1999).pdf
 
Jesus Heals a Paralyzed Man for Children
Jesus Heals a Paralyzed Man for ChildrenJesus Heals a Paralyzed Man for Children
Jesus Heals a Paralyzed Man for Children
 
English - The Book of Joshua the Son of Nun.pdf
English - The Book of Joshua the Son of Nun.pdfEnglish - The Book of Joshua the Son of Nun.pdf
English - The Book of Joshua the Son of Nun.pdf
 
Hebrew Gospel of Matthew by George Howard
Hebrew Gospel of Matthew by George HowardHebrew Gospel of Matthew by George Howard
Hebrew Gospel of Matthew by George Howard
 
TALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdf
TALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdfTALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdf
TALABALESHWARA TEMPLE AND KODAVA AIN MANE.pdf
 
The PBHP DYC ~ Reflections on The Dhamma (English).pptx
The PBHP DYC ~ Reflections on The Dhamma (English).pptxThe PBHP DYC ~ Reflections on The Dhamma (English).pptx
The PBHP DYC ~ Reflections on The Dhamma (English).pptx
 
Qualifications in psychology _Dr.Navis.pdf
Qualifications in psychology _Dr.Navis.pdfQualifications in psychology _Dr.Navis.pdf
Qualifications in psychology _Dr.Navis.pdf
 
Evangelization in the footsteps of Saint Vincent de Paul
Evangelization in the footsteps of Saint Vincent de PaulEvangelization in the footsteps of Saint Vincent de Paul
Evangelization in the footsteps of Saint Vincent de Paul
 
Jude: Practical Exhortations_Jude 17-23.pptx
Jude: Practical Exhortations_Jude 17-23.pptxJude: Practical Exhortations_Jude 17-23.pptx
Jude: Practical Exhortations_Jude 17-23.pptx
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Botón elimanr grabar etc

  • 1. 2014 Equipo-CODRED 15/05/2014 Conalep zacualpan 101 Elaboración y mantenimiento de sistemas de información 606 Anayenzi Perez Mena Profesor:Ing.Agustin Hernández Delgado
  • 2. Anayenzi Perez Mena-- 606 ○Botón Consultar○ REM consultas Dim mitabla As DataTable = CODREP_________________________________DataSet.ALTAS Dim cfilas As DataRowCollection = mitabla.Rows Dim nuevafila As DataRow Dim i As Integer Dim n As String n = ALTASBindingSource.Count() Dim bandera As Boolean bandera = True Dim tamaño As Integer tamaño = ALTASBindingSource.Count() i = 1 If (tamaño = 0) Then Else Do If (Trim(MATRICULATextBox.Text) = Trim(TextBox1.Text)) Then bandera = False Else ALTASBindingSource.MoveNext() i = i + 1 End If Loop While (bandera = True And i <= tamaño) End If If (bandera = False) Then MATRICULATextBox.Visible = False NOMBRETextBox.Visible = False APELLIDOTextBox.Visible = False
  • 3. Anayenzi Perez Mena-- 606 ESPECIALIDADTextBox.Visible = False GRUPOTextBox.Visible = False TURNOTextBox.Visible = False MATRICULATextBox.Enabled = False NOMBRETextBox.Enabled = False APELLIDOTextBox.Enabled = False ESPECIALIDADTextBox.Enabled = False GRUPOTextBox.Enabled = False TURNOTextBox.Enabled = False MsgBox("Ya existe") TextBox1.Text = "" TextBox1.Focus() Else MsgBox("Introduce datos") nuevafila = mitabla.NewRow cfilas.Add(nuevafila) ALTASBindingSource.MoveLast() MATRICULATextBox.Enabled = True MATRICULATextBox.Visible = True ID_ALTATextBox.Enabled = True ID_ALTATextBox.Visible = True NOMBRETextBox.Enabled = True NOMBRETextBox.Visible = True APELLIDOTextBox.Enabled = True APELLIDOTextBox.Visible = True ESPECIALIDADTextBox.Enabled = True ESPECIALIDADTextBox.Visible = True GRUPOTextBox.Enabled = True GRUPOTextBox.Visible = True GRUPOTextBox.Enabled = True GRUPOTextBox.Visible = True TURNOTextBox.Enabled = True TURNOTextBox.Visible = True nuevafila(1) = UCase(MATRICULATextBox.Text) nuevafila(2) = UCase(ID_ALTATextBox.Text) nuevafila(3) = UCase(TextBox1.Text) nuevafila(4) = UCase(NOMBRETextBox.Text) nuevafila(5) = UCase(APELLIDOTextBox.Text) nuevafila(6) = UCase(ESPECIALIDADTextBox.Text) nuevafila(7) = UCase(GRUPOTextBox.Text) nuevafila(8) = UCase(TURNOTextBox.Text) End If End Sub
  • 4. Anayenzi Perez Mena-- 606 ○Botón eliminar○ Dim response As MsgBoxResult Dim MSG As String Dim TITULO As String Dim ESTILO As MsgBoxStyle Dim registroactual As DataRowView ESTILO = MsgBoxStyle.YesNo TITULO = "Borrando..." MSG = " ¿Desea Borrar Los Datos.?" Dim c1 As String Dim c2 As String Dim res As Boolean Dim bandera As Boolean bandera = True Dim SI As Integer SI = SI Dim tam As Integer tam = ALTASBindingSource.Count() ALTASBindingSource.MoveFirst() res = False c1 = RTrim(TextBox1.Text) c2 = RTrim(MATRICULATextBox.Text) If (tam = 0) Then MsgBox("tabla vacia") Else ALTASBindingSource.MoveFirst() c1 = UCase(Trim(MATRICULATextBox.Text)) Do
  • 5. Anayenzi Perez Mena-- 606 res = c1 Like c2 If (res = True) Then bandera = False Else ALTASBindingSource.MoveNext() c1 = UCase(Trim(MATRICULATextBox.Text)) SI += 1 End If Loop While (bandera = True And SI <= tam) End If If (bandera = True) Then MATRICULATextBox.Enabled = False MATRICULATextBox.Visible = False NOMBRETextBox.Enabled = False NOMBRETextBox.Visible = False APELLIDOTextBox.Enabled = False APELLIDOTextBox.Visible = False TURNOTextBox.Enabled = False TURNOTextBox.Visible = False GRUPOTextBox.Enabled = False GRUPOTextBox.Visible = False ESPECIALIDADTextBox.Enabled = False ESPECIALIDADTextBox.Visible = False TextBox1.Text = "" TextBox1.Focus() MsgBox("Alumno No Encontrado") Else MATRICULATextBox.Enabled = False MATRICULATextBox.Visible = True NOMBRETextBox.Enabled = False NOMBRETextBox.Visible = True APELLIDOTextBox.Enabled = False APELLIDOTextBox.Visible = True TURNOTextBox.Enabled = False TURNOTextBox.Visible = True GRUPOTextBox.Enabled = False GRUPOTextBox.Visible = True ESPECIALIDADTextBox.Enabled = False ESPECIALIDADTextBox.Visible = True TextBox1.Text = "" TextBox1.Focus() response = MsgBox(MSG, ESTILO, TITULO) If (response = MsgBoxResult.Yes) Then registroactual = ALTASBindingSource.Current registroactual.Row.Delete() Me.ALTASTableAdapter.Update(Me.CODREP_________________________________DataSet.ALTAS) MsgBox("Se Borro EL Registro De la Tabla..") MATRICULATextBox.Enabled = False MATRICULATextBox.Visible = False NOMBRETextBox.Enabled = False
  • 6. Anayenzi Perez Mena-- 606 NOMBRETextBox.Visible = False APELLIDOTextBox.Enabled = False APELLIDOTextBox.Visible = False TURNOTextBox.Enabled = False TURNOTextBox.Visible = False GRUPOTextBox.Enabled = False GRUPOTextBox.Visible = False ESPECIALIDADTextBox.Enabled = False ESPECIALIDADTextBox.Visible = False TextBox1.Text = "" TextBox1.Focus() Else MATRICULATextBox.Enabled = False MATRICULATextBox.Visible = False NOMBRETextBox.Enabled = False NOMBRETextBox.Visible = False APELLIDOTextBox.Enabled = False APELLIDOTextBox.Visible = False TURNOTextBox.Enabled = False TURNOTextBox.Visible = False GRUPOTextBox.Enabled = False GRUPOTextBox.Visible = False ESPECIALIDADTextBox.Enabled = False ESPECIALIDADTextBox.Visible = False TextBox1.Text = "" TextBox1.Focus() MsgBox("NO SE HA BORRADO EL REGISTRO DE LA TABLA...") End If End If End Sub ○Grabando Ahora○ If (CODREP_________________________________DataSet.HasChanges) Then Me.Validate() Me.ALTASBindingSource.EndEdit() Me.ALTASTableAdapter.Update(Me.BaseCODREPDataSet.ALTAS) MsgBox("Datos Grabando ahora") TextBox1.Text = "" TextBox1.Focus() MATRICULATextBox.Enabled = False NOMBRETextBox.Enabled = False APELLIDOTextBox.Enabled = False ESPECIALIDADTextBox.Enabled = False GRUPOTextBox.Enabled = False End If End Sub