SlideShare a Scribd company logo
Imports MySql.Data.MySqlClient
Imports System.Net.Mail
Public Class cash
Inherits System.Web.UI.Page
Dim conn As MySqlConnection = New MySqlConnection(" Server = localhost; uid = root ;
password = ;database = shabanie")
Public Function stil() As String
Dim sReturn As String = ""
Randomize()
Dim iRandom1 = CInt(9999 * Rnd())
Dim iRandom2 = CInt(9999 * Rnd())
Dim iRandom3 = CInt(9999 * Rnd())
Const Alphabet As String = "QWERTYUIOPLKJHGFDSAZXCVBNM"
Dim s4 As String = iRandom1.ToString.Substring(0, 1)
Dim s5 As String = iRandom2.ToString.Substring(0, 1)
Dim s6 As String = iRandom3.ToString.Substring(0, 1)
Dim s7 As String = Alphabet.ToString.Substring(0, 1)
Dim s8 As String = Alphabet.ToString.Substring(0, 1)
Return s4 & s5 & s6 & s7 & s8
End Function
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
ListBox1 = Session(" LIST")
ListBox1 = Session(" MARE")
End Sub
Protected Sub Button5_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim cmd As MySqlCommand = New MySqlCommand("INSERT into ontransaction
values(@Name,@surname,@idnum,@company,@address,@phone,@email,@accountnum,@bankname,@total
cost,@refnum,@items)", conn)
For i As Integer = 0 To Me.ListBox1.Items.Count - 1
With cmd.Parameters
.AddWithValue("@name", TextBox1.Text)
.AddWithValue("@surname", TextBox2.Text)
.AddWithValue("@company", TextBox3.Text)
.AddWithValue("idnum", TextBox4.Text)
.AddWithValue("@address", TextBox5.Text)
.AddWithValue("@phone", TextBox6.Text)
.AddWithValue("@email", TextBox7.Text)
.AddWithValue("@accountnum", TextBox8.Text)
.AddWithValue("@bankname", TextBox9.Text)
.AddWithValue("totalcost", TextBox10.Text)
.AddWithValue("@refnum", TextBox11.Text)
.AddWithValue("@items", ListBox1.Items(i))
End With
conn.Open()
cmd.ExecuteNonQuery()
' Label3.Show()
'TextBox3.Enabled = False
'TextBox3.Show()
MsgBox("Operation Successful")
conn.Close()
TextBox11.Text = stil()
Next
Dim EmailMessage As New MailMessage
Try
EmailMessage.From = New MailAddress(" obiegaps@gmail.com")
EmailMessage.To.Add(TextBox7.Text)
EmailMessage.Subject = "credentials"
EmailMessage.Body = " YOUR PAID ##" & TextBox10.Text & "REFERENCE NUMBER IS##
" & TextBox11.Text & " "
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("obiegaps@gmail.com",
"KOMECHYKG9")
SMTP.Port = "587"
SMTP.Send(EmailMessage)
MsgBox("Email Sent")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class

More Related Content

What's hot (17)

TXT
New text document
Tam Ngo
 
TXT
Code
mimidas
 
PPTX
Windows power shell and active directory
Dan Morrill
 
PDF
React Spotlight 2018
Phong Huynh
 
PDF
Nginx cache api delete
Yuki Iwamoto
 
PDF
Introduction kot iin
Jedsada Tiwongvokul
 
PDF
The Ring programming language version 1.2 book - Part 13 of 84
Mahmoud Samir Fayed
 
PDF
Visual Studio.Net - Sql Server
Darwin Durand
 
PDF
The Ring programming language version 1.5.4 book - Part 23 of 185
Mahmoud Samir Fayed
 
DOCX
Public class form1
Sandra Aguirre
 
PPTX
Codable routing
Pushkar Kulkarni
 
PDF
ReactiveMongo - non blocking and asynchronous I/O operations
David Pichsenmeister
 
PPTX
Asynchronous programming from Xamarin Hakcday in Melbourne
Filip Ekberg
 
PDF
Pivorak Clojure by Dmytro Bignyak
Pivorak MeetUp
 
PPTX
"Query Execution: Expectation - Reality (Level 300)" Денис Резник
Fwdays
 
PDF
Miracle of std lib
Jedsada Tiwongvokul
 
PPT
Qtp Scripts
G.C Reddy
 
New text document
Tam Ngo
 
Code
mimidas
 
Windows power shell and active directory
Dan Morrill
 
React Spotlight 2018
Phong Huynh
 
Nginx cache api delete
Yuki Iwamoto
 
Introduction kot iin
Jedsada Tiwongvokul
 
The Ring programming language version 1.2 book - Part 13 of 84
Mahmoud Samir Fayed
 
Visual Studio.Net - Sql Server
Darwin Durand
 
The Ring programming language version 1.5.4 book - Part 23 of 185
Mahmoud Samir Fayed
 
Public class form1
Sandra Aguirre
 
Codable routing
Pushkar Kulkarni
 
ReactiveMongo - non blocking and asynchronous I/O operations
David Pichsenmeister
 
Asynchronous programming from Xamarin Hakcday in Melbourne
Filip Ekberg
 
Pivorak Clojure by Dmytro Bignyak
Pivorak MeetUp
 
"Query Execution: Expectation - Reality (Level 300)" Денис Резник
Fwdays
 
Miracle of std lib
Jedsada Tiwongvokul
 
Qtp Scripts
G.C Reddy
 

Similar to Imports my sql (7)

DOCX
โครงการ 5 บท
MareenaHahngeh
 
DOCX
โครงการ 5 บท
MareenaHahngeh
 
PDF
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
GOKUL SREE
 
PDF
Sachin Foujdar , BCA Third Year
Dezyneecole
 
PDF
OOP - PREFINAL ACTIVITY - ACLC
Marlo Tinio
 
PDF
Sistema de ventas
DAYANA RETO
 
PDF
Sistemadeventas 100707084319-phpapp01
mafv1976
 
โครงการ 5 บท
MareenaHahngeh
 
โครงการ 5 บท
MareenaHahngeh
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
GOKUL SREE
 
Sachin Foujdar , BCA Third Year
Dezyneecole
 
OOP - PREFINAL ACTIVITY - ACLC
Marlo Tinio
 
Sistema de ventas
DAYANA RETO
 
Sistemadeventas 100707084319-phpapp01
mafv1976
 
Ad

Recently uploaded (20)

PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Ad

Imports my sql

  • 1. Imports MySql.Data.MySqlClient Imports System.Net.Mail Public Class cash Inherits System.Web.UI.Page Dim conn As MySqlConnection = New MySqlConnection(" Server = localhost; uid = root ; password = ;database = shabanie") Public Function stil() As String Dim sReturn As String = "" Randomize() Dim iRandom1 = CInt(9999 * Rnd()) Dim iRandom2 = CInt(9999 * Rnd()) Dim iRandom3 = CInt(9999 * Rnd()) Const Alphabet As String = "QWERTYUIOPLKJHGFDSAZXCVBNM" Dim s4 As String = iRandom1.ToString.Substring(0, 1) Dim s5 As String = iRandom2.ToString.Substring(0, 1) Dim s6 As String = iRandom3.ToString.Substring(0, 1) Dim s7 As String = Alphabet.ToString.Substring(0, 1) Dim s8 As String = Alphabet.ToString.Substring(0, 1) Return s4 & s5 & s6 & s7 & s8 End Function Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ListBox1 = Session(" LIST") ListBox1 = Session(" MARE") End Sub Protected Sub Button5_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim cmd As MySqlCommand = New MySqlCommand("INSERT into ontransaction values(@Name,@surname,@idnum,@company,@address,@phone,@email,@accountnum,@bankname,@total cost,@refnum,@items)", conn) For i As Integer = 0 To Me.ListBox1.Items.Count - 1 With cmd.Parameters .AddWithValue("@name", TextBox1.Text) .AddWithValue("@surname", TextBox2.Text) .AddWithValue("@company", TextBox3.Text) .AddWithValue("idnum", TextBox4.Text) .AddWithValue("@address", TextBox5.Text) .AddWithValue("@phone", TextBox6.Text) .AddWithValue("@email", TextBox7.Text) .AddWithValue("@accountnum", TextBox8.Text) .AddWithValue("@bankname", TextBox9.Text) .AddWithValue("totalcost", TextBox10.Text) .AddWithValue("@refnum", TextBox11.Text) .AddWithValue("@items", ListBox1.Items(i)) End With conn.Open() cmd.ExecuteNonQuery() ' Label3.Show() 'TextBox3.Enabled = False 'TextBox3.Show() MsgBox("Operation Successful")
  • 2. conn.Close() TextBox11.Text = stil() Next Dim EmailMessage As New MailMessage Try EmailMessage.From = New MailAddress(" [email protected]") EmailMessage.To.Add(TextBox7.Text) EmailMessage.Subject = "credentials" EmailMessage.Body = " YOUR PAID ##" & TextBox10.Text & "REFERENCE NUMBER IS## " & TextBox11.Text & " " Dim SMTP As New SmtpClient("smtp.gmail.com") SMTP.EnableSsl = True SMTP.Credentials = New System.Net.NetworkCredential("[email protected]", "KOMECHYKG9") SMTP.Port = "587" SMTP.Send(EmailMessage) MsgBox("Email Sent") Catch ex As Exception MsgBox(ex.Message) End Try End Sub End Class