Public NotInheritable Class SplashScreen1

Embed Size (px)

Citation preview

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    1/12

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    2/12

    PublicNotInheritableClass SplashScreen1

    'TODO: This form can easily be set as the splash screen for theapplication by going to the "Application" tab

    ' of the Project Designer ("Properties" under the "Project" menu).

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    3/12

    PrivateSub SplashScreen1_Load(ByVal sender AsObject, ByVal e As

    System.EventArgs) HandlesMe.Load

    'Set up the dialog text at runtime according to the application'sassembly information.

    'TODO: Customize the application's assembly information in the

    "Application" pane of the project' properties dialog (under the "Project" menu).

    'Application title

    IfMy.Application.Info.Title ""ThenApplicationTitle.Text = My.Application.Info.Title

    Else 'If the application title is missing, use the application name,

    without the extension

    ApplicationTitle.Text =

    System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName) EndIf

    'Format the version information using the text set into the Version

    control at design time as the ' formatting string. This allows for effective localization if

    desired.

    ' Build and revision information could be included by using the

    following code and changing the' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}"

    or something similar. See ' String.Format() in Help for more information.

    '

    ' Version.Text = System.String.Format(Version.Text,

    My.Application.Info.Version.Major, My.Application.Info.Version.Minor,My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

    Version.Text = System.String.Format(Version.Text,

    My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

    'Copyright info

    Copyright.Text = My.Application.Info.Copyright

    EndSub

    PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Timer1.Tick

    EndSub

    PrivateSub ApplicationTitle_Click(ByVal sender As System.Object, ByVal e

    As System.EventArgs) Handles ApplicationTitle.Click

    EndSubEndClass

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    4/12

    PublicClass Form1

    PrivateSub ExitToolStripMenuItem_Click(ByVal sender As System.Object,

    ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Me.Close()

    EndSub

    PrivateSub FormToolStripMenuItem_Click(ByVal sender As System.Object,

    ByVal e As System.EventArgs) Handles FormToolStripMenuItem.Clickform2.Show() EndSub

    PrivateSub FeeToolStripMenuItem_Click(ByVal sender As System.Object,

    ByVal e As System.EventArgs) Handles FeeToolStripMenuItem.ClickForm3.Show()

    EndSub

    PrivateSub MenupulationToolStripMenuItem_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles

    MenupulationToolStripMenuItem.Click

    Form4.Show()

    EndSub

    PrivateSub NavigationToolStripMenuItem_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles

    NavigationToolStripMenuItem.Click

    Form5.Show()

    EndSub

    PrivateSub SearchToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles SearchToolStripMenuItem.Click

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    5/12

    EndSub

    PrivateSub SerchReportToolStripMenuItem_Click(ByVal sender As

    System.Object, ByVal e As System.EventArgs) HandlesSerchReportToolStripMenuItem.Click

    Form7.Show()

    EndSub

    PrivateSub VToolStripMenuItem_Click(ByVal sender As System.Object, ByVale As System.EventArgs) Handles VToolStripMenuItem.Click

    Form8.Show() EndSub

    PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As

    System.EventArgs) HandlesMyBase.Load

    EndSubEndClass

    Imports System.Data

    Imports System.Data.SqlClient

    PublicClass Form2

    PrivateSub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles TextBox4.TextChanged

    EndSub

    Dim cmd As SqlCommand Dim con As SqlConnection

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    6/12

    PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As

    System.EventArgs) Handles Button1.Click

    con = New SqlConnection("Server=(local); database=rishi; user =user;password=user123;")

    con.Open()cmd = New SqlCommand("insert into p1 ([cusid],[cusname],[age],[date],

    [addr]) values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" &TextBox3.Text & "','" & TextBox4.Text & "','" & RichTextBox1.Text & "')", con)

    cmd.ExecuteNonQuery()

    MessageBox.Show("One Rows iserted succesfully")

    con.Close()

    EndSub

    PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As

    System.EventArgs) Handles Button2.Click

    TextBox1.Text = ""TextBox2.Text = ""

    TextBox3.Text = ""TextBox4.Text = ""

    RichTextBox1.Text = ""TextBox1.Focus()

    EndSub

    PrivateSub Form2_Load(ByVal sender As System.Object, ByVal e As

    System.EventArgs) HandlesMyBase.Load

    EndSub

    EndClass

    Imports System.Data

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    7/12

    Imports System.Data.SqlClient

    PublicClass Form4

    Dim con As SqlConnection Dim cmd As SqlCommand

    Dim dr As SqlDataReader Dim dr1 As SqlDataReader

    Dim ra AsInteger PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As

    System.EventArgs) Handles Button1.Click

    con = New

    SqlConnection("server=(local);uid=user;pwd=user123;database=rishi")con.Open()

    cmd = New SqlCommand("insert into test([cusid],[testtype],[refer],[fee]) values (" & TextBox1.Text & ",'" & TextBox2.Text & "','" &

    TextBox3.Text & "'," & TextBox4.Text & ")", con)

    cmd.ExecuteNonQuery()

    MessageBox.Show("New Row Inserted")con.Close()

    EndSub

    PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As

    System.EventArgs) Handles Button2.Click

    con = NewSqlConnection("server=(local);uid=user;pwd=user123;database=rishi")

    con.Open()cmd = New SqlCommand("Delete from test where cusid= 123", con)

    cmd.ExecuteNonQuery()

    MessageBox.Show("one Row deleted")

    con.Close() EndSub

    PrivateSub Button3_Click(ByVal sender As System.Object, ByVal e As

    System.EventArgs) Handles Button3.Clickcon = New

    SqlConnection("server=(local);uid=user;pwd=user123;database=rishi")

    con.Open()

    cmd = New SqlCommand("Update test Set cusid=222 where refer='drdaddu'", con)

    ra = cmd.ExecuteNonQuery()MessageBox.Show("Records affected" & ra)

    EndSub

    PrivateSub Button4_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button4.Click

    TextBox1.Text = ""

    TextBox2.Text = ""TextBox3.Text = ""TextBox4.Text = ""

    TextBox1.Focus()

    EndSub

    PrivateSub Form4_Load(ByVal sender As System.Object, ByVal e As

    System.EventArgs) HandlesMyBase.Load

    EndSub

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    8/12

    EndClass

    PublicClass Form5

    PrivateSub Form5_Load(ByVal sender As System.Object, ByVal e As

    System.EventArgs) HandlesMyBase.Load

    EndSubEndClass

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    9/12

    Imports System.DataImports System.Data.SqlClient

    PublicClass Form6

    Dim cmd As SqlCommand Dim con As SqlConnection

    Dim dr As SqlDataReader

    Dim p, q AsInteger

    Dim x, y AsInteger

    PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click

    x = TextBox1.Text

    y = TextBox2.Text

    con = New SqlConnection("Server=(local); database=rishi; user =user;password=user123;")

    con.Open()cmd = New SqlCommand("select * from login where cusid='" &

    TextBox1.Text & "'", con)

    cmd.ExecuteNonQuery()

    dr = cmd.ExecuteReader If dr.HasRows Then While dr.Read

    'MsgBox("cusid is Available")

    p = dr.GetValue(0)q = dr.GetValue(1)

    EndWhile

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    10/12

    Else

    ' MsgBox("cusid not available")

    EndIf

    If TextBox1.Text = p And TextBox2.Text = q ThenForm1.Show()

    MessageBox.Show("Welcome you are loged in ")

    TextBox1.Text = ""

    TextBox2.Text = ""TextBox1.Focus()

    ElseMessageBox.Show("retry")

    TextBox1.Text = ""

    TextBox2.Text = ""

    TextBox1.Focus() EndIf

    con.Close()

    EndSub

    PrivateSub Form6_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) HandlesMyBase.Load

    EndSub

    EndClass

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    11/12

    Imports System.Data

    Imports System.Data.SqlClient

    PublicClass Form7 Dim myconnection As SqlConnection

    Dim mycommand As SqlCommand Dim dr As SqlDataReader

    PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click

    myconnection = New

    SqlConnection("server=(local);uid=user;pwd=user123;database=rishi")

    myconnection.Open()mycommand = New SqlCommand("(select * from test where cusid =" &

    TextBox1.Text & ")", myconnection)mycommand.ExecuteNonQuery()

    dr = mycommand.ExecuteReader

    If dr.HasRows Then

    While dr.ReadMsgBox("id is Available")

    TextBox1.Text = dr.GetValue(0)TextBox2.Text = dr.GetValue(1)

    TextBox3.Text = dr.GetValue(2)TextBox4.Text = dr.GetValue(3)

    EndWhile

    Else

    MsgBox("id not available") EndIf

    myconnection.Close() ' MessageBox.Show("Records deleted")

    myconnection.Close()

    EndSub

    PrivateSub Form7_Load(ByVal sender As System.Object, ByVal e As

    System.EventArgs) HandlesMyBase.Load

    EndSubEndClass

  • 7/28/2019 Public NotInheritable Class SplashScreen1

    12/12

    PublicClass Form8

    PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click

    EndSub

    PrivateSub Form8_Load(ByVal sender As System.Object, ByVal e As

    System.EventArgs) HandlesMyBase.Load

    EndSubEndClass