Topic: Information

Date 04/10/2011

By wala magawa

Subject c# code

Reply

https://www.dreamincode.net/code/snippet2601.htm

Date 04/10/2011

By den

Subject all about webmatrix,as.net

Reply

https://trainingkit.webcamps.ms/WebMatrix.htm

Date 05/09/2011

By den

Subject convert money value in words sites

Reply

https://a1vbcode.com/app-4713.asp

Date 18/08/2011

By den

Subject vbhtml page

Reply

https://www.asp.net/webmatrix/tutorials/asp-net-web-pages-visual-basic

Date 26/08/2011

By the who

Subject Re: vbhtml page

Reply

https://www.digitalcoding.com/Code-Snippets/C-Sharp/C-Code-Snippet-Insert-Update-Image-To-SQL-Server.html

Date 14/03/2011

By den

Subject autofill in vb.net

Reply

https://www.dreamincode.net/forums/topic/187433-autofill-textbox/

Date 10/03/2011

By den

Subject Design Pattern - Singleton

Reply

Public Class Singleton
Private Shared SP As Singleton
Private InnerList as New Collections.ArrayList()

Private Sub New()
End Sub

Public Shared Function Create() As Singleton
If SP is Nothing Then SP = New Singleton()
Return SP
End Function

Public ReadOnly Property List As Collections.ArrayList
Get
Return InnerList
End Get
End Property
End Class

Module SingletonExample
Sub Main
Dim CountValue as Integer
Dim SP As Singleton = Singleton.Create()
Dim SP2 As Singleton = Singleton.Create()

SP.List.Add("First")
SP.List.Add("Second")
SP.List.Add("Third")

For CountValue = 0 To SP2.List.Count - 1
Console.WriteLine(SP2.List.Item(CountValue).ToString())
Next
End Sub
End Module

Date 10/03/2011

By den

Subject Inputs only numeric in Textbox

Reply

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If (Microsoft.VisualBasic.Asc(e.KeyChar) < 48) _
Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 57) Then
e.Handled = True
End If
If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) Then
e.Handled = False
End If
End Sub

c#
private void TextBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if ((Strings.Asc(e.KeyChar) < 48) | (Strings.Asc(e.KeyChar) > 57)) {
e.Handled = true;
}
if ((Strings.Asc(e.KeyChar) == 8)) {
e.Handled = false;
}
}

Date 08/03/2011

By den

Subject tutorials

Reply


Imports MySql.Data.MySqlClient
Imports System.Data
Public Class form_examination_search
Dim conn As New MySqlConnection
Dim mycommand As New MySqlCommand
Dim S As String
Dim dr As MySqlDataReader
Dim myAdapter As New MySqlDataAdapter
Dim mydata As New DataTable
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If TextBox61.Text = "" Then
MsgBox("Empty String", MsgBoxStyle.Information, "Medical Information Technology")
Else
search()

End If

End Sub
Public Sub search()
ListBox1.SelectedItems.Clear()
Dim theList As Long

Dim textToSearch As String

Dim theListText As String

textToSearch = LCase(TextBox61.Text)

For theList = 0 To ListBox1.Items.Count - 1

theListText = LCase(ListBox1.Items.Item(theList))

If theListText = textToSearch Then ListBox1.Text = textToSearch

Next
If ListBox1.SelectedItems.Count = 0 Then
MsgBox("record not found")
End If
End Sub
Public Sub textboxsearch()
conn.ConnectionString = "server=localhost;username=root;password=root;database=dbmis"
conn.Open()
S = "select * from examination_info where Name='" & ListBox1.Text & "'"
mycommand.Connection = conn
mycommand.CommandText = S
dr = mycommand.ExecuteReader()
While dr.Read()
MaskedTextBox1.Text = dr("Date")
TextBox1.Text = dr("Name")
TextBox3.Text = dr("Position")
ComboBox4.Text = dr("Department")
TextBox2.Text = dr("Year_Course")
MaskedTextBox2.Text = dr("DateofBirth")
ComboBox3.Text = dr("Age")
ComboBox1.Text = dr("Sex")
ComboBox2.Text = dr("CivilStatus")
TextBox5.Text = dr("Home_Address")
TextBox6.Text = dr("Boarding_Address")
TextBox7.Text = dr("Father_Name")
TextBox14.Text = dr("Father_Occupation")
TextBox10.Text = dr("Father_Tel")
TextBox8.Text = dr("Mother_Name")
TextBox15.Text = dr("Mother_Occupation")
TextBox17.Text = dr("Mother_Tel")
TextBox9.Text = dr("HusbandWife")
TextBox16.Text = dr("HusbandWife_Occupation")
TextBox18.Text = dr("HusbandWife_Tel")
TextBox12.Text = dr("LandladyLandlord")
TextBox19.Text = dr("LandladyLandlord_Tel")



End While
conn.Close()
End Sub

Private Sub form_examination_search_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
For i = 1 To 150
ComboBox3.Items.Add(i)
Next

conn.ConnectionString = "server=localhost;username=root;password=root;database=dbmis"
conn.Open()
S = "select Name from examination_info"
mycommand.Connection = conn
mycommand.CommandText = S
dr = mycommand.ExecuteReader()
While dr.Read()
ListBox1.Items.Add(dr("Name"))
End While
conn.Close()


End Sub

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
textboxsearch()
conn.ConnectionString = "server=localhost;username=root;password=root;database=dbmis"
conn.Open()
S = "select Date,Height,Weight,HistoryandPhysical_exam,Physician_Direction from examination_exam where Name='" & ListBox1.Text & "'"
mycommand.Connection = conn
mycommand.CommandText = S
mycommand.Connection = conn
myAdapter.SelectCommand = mycommand
mydata.Clear()
myAdapter.Fill(mydata)

DataGridView1.DataSource = mydata
conn.Close()


End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

End Sub
Public Sub loadlist()
ListBox1.Items.Clear()

conn.ConnectionString = "server=localhost;username=root;password=root;database=dbmis"
conn.Open()
S = "select Name from examination_info"
mycommand.Connection = conn
mycommand.CommandText = S
dr = mycommand.ExecuteReader()
While dr.Read()
ListBox1.Items.Add(dr("Name"))
End While
conn.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If ListBox1.SelectedItems.Count = 0 Then
MsgBox("There's no selected item...", MsgBoxStyle.Information, "Medical information System")
Else
MsgBox("Are you sure you want to delete the record?", MsgBoxStyle.OkCancel, "Medical Information System")
If MsgBoxResult.Ok Then
conn.ConnectionString = "server=localhost;username=root;password=root;database=dbmis"
conn.Open()
S = "delete from examination_exam where Name='" & ListBox1.SelectedItem & "' "

mycommand.Connection = conn
mycommand.CommandText = S
dr = mycommand.ExecuteReader()
While dr.Read()
TextBox61.Text = dr("Name")
End While


conn.Close()
conn.ConnectionString = "server=localhost;username=root;password=root;database=dbmis"
conn.Open()
S = "delete from examination_info where Name='" & ListBox1.SelectedItem & "' "

mycommand.Connection = conn
mycommand.CommandText = S
dr = mycommand.ExecuteReader()
While dr.Read()
TextBox61.Text = dr("Name")
End While


conn.Close()
Call loadlist()
MsgBox("Record is Deleted...", MsgBoxStyle.Information, "Medical Information System")
Else

End If

End If

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim checkup As New form_examination_menu

main_form.Panel1.Controls.Clear()
main_form.Panel1.Controls.Add(checkup)
checkup.Dock = DockStyle.Fill

End Sub
End Class

Date 21/02/2011

By den

Subject software engineering design pattern site

Reply

https://www.oodesign.com/

Poll

What is you favorite Programming Languages?

Total votes: 541