vb.net code for searching

May 19, 2009

i have used a textbox in the key up event this is wat i did :

i have also used add modules where i stored my codes for functions that i would use through out this project

Dim SQLString As String
Dim dtdbEmp As New DataTable
Dim DataAdapter1 As New OleDb.OleDbDataAdapter

Dim ConnectString As OleDb.OleDbConnection = New OleDb.OleDbConnection
DbConnect(ConnectString)
Try
Dim params_to_search As String = txtParam.Text

If rbtnempID.Checked = True Then
SQLString = “SELECT * FROM tblEmployee_Users WHERE ID=”
SQLString = SQLString & Trim(txtParam.Text)

Else
SQLString = “SELECT * FROM tblEmployee_Users WHERE Lastname LIKE “
SQLString = SQLString & “‘” & txtParam.Text & “%’”
End If

If params_to_search.Length > 0 Then
DataAdapter1 = New OleDb.OleDbDataAdapter(SQLString, ConnectString)
DataAdapter1.Fill(dtdbEmp)
DataGridView1.DataSource = dtdbEmp

End If
Catch ex As Exception
MsgBox(ex.Message)
End Try

DbDisconnect(ConnectString)


Some Vb.net Codes for My Login

May 19, 2009

If login_attempts = 2 Then
MsgBox(“You have exceeded the Number of Attempts allowed”, MsgBoxStyle.Critical, “Invalid Login Attempts”)
End
End If

Dim qryString, acc_ative, admin_type As String

Dim connection As OleDb.OleDbConnection = New OleDb.OleDbConnection

qryString = “SELECT * FROM tblEmployee_Users WHERE Emp_Username=”
qryString = qryString & “‘” & txtUsername.Text & “‘”
qryString = qryString & ” AND Emp_password=” & “‘” & txtPassword.Text & “‘”

DbConnect(connection) ‘connecting to database

Dim Command1 As OleDb.OleDbCommand = New OleDb.OleDbCommand(qryString)
Command1.CommandType = CommandType.Text
Command1.Connection = connection

Dim Reader1 As OleDb.OleDbDataReader = Command1.ExecuteReader()

Dim user_type As String

If Reader1.HasRows Then

While (Reader1.Read())
admin_type = Reader1(“Emp_Is_Admin”).ToString
acc_ative = Reader1(“Emp_Acct_Active”).ToString

user_type = admin_type

If admin_type.Equals(“True”) Then
usertype_admin = True

Else
usertype_admin = False

End If
If acc_ative.Equals(“True”) Then
loged_on = txtUsername.Text
txtUsername.Text = “”
txtPassword.Text = “”
frmMenu.Show()
Me.Hide()
End If
End While

Else
txtUsername.BackColor = Color.Red
txtPassword.BackColor = Color.Red
txtUsername.Focus()
login_attempts = login_attempts + 1
End If

DbDisconnect(connection)


Script to enable vrml model by maya to load in artoolkit

May 17, 2009

Guys we had a lot of trouble to import our model which we designed in maya ,so we designed a script which removed parts which didnt allow it to be displayed in vrml and also improved its display in bright shine same as bee model provided with artoolkit , feel free to use the scripts and at Your Own risk , n please leave a little thanks if it was useful for you.__version__ = “1.0″
__author__ = “Sydney Yvan Moutia/Rajub Atish Koomar”

import re, sys

PATT_DIFFUSE = ‘diffuseColor’
PATT_EMISSIVE = ‘emissiveColor’
PATT_CONVEX = ‘convex FALSE’
PATT_INFO = ‘VRML2.0 created with Version 1.3, from Alias Maya 8.5′
PATT_SUB_INFO = ‘8.5′
PATT_SUB_INFO_REP = ‘8.5 and improved by Sydney Yvan Moutia and Atish Rajub’

if __name__ == ‘__main__’:
if len(sys.argv) is not 4:
print ‘vrml_maya input.wrl output.wrl scale’
else:
strInput = sys.argv[1]
strOutput = sys.argv[2]

input = open(strInput, ‘r’)
output = open(strOutput, ‘w’)

scale = sys.argv[3]
lines = input.readlines()

tmp = ”
for line in lines:
if re.search(PATT_INFO, line) is not None:
output.write(re.sub(PATT_SUB_INFO, PATT_SUB_INFO_REP, line))
continue

if re.search(PATT_DIFFUSE, line) is not None:
tmp = line

if re.search(PATT_EMISSIVE, line) is not None:
output.write(re.sub(PATT_DIFFUSE, PATT_EMISSIVE, tmp))
elif re.search(PATT_CONVEX, line) is None:
output.write(line)

input.close()
output.close()

datFile = open(re.sub(‘wrl’, ‘dat’, strOutput), ‘w’)
datFile.write(strOutput + ‘\n’)
datFile.write(‘0 0 0\n’)
datFile.write(‘90 1 0 0\n’)
datFile.write(” + scale + ‘ ‘ + scale + ‘ ‘ + scale)
datFile.close()


hmm the begining of a New End Season 2006-2009 UOM

April 28, 2009

Today , as less than one month remains , memory keep on croping up . SOme good one spend among the folk of CSE, Crazy things underwent ,

CSEB , the best class 4 ever!

Description of CSE -> 30 Assignments Over 3 Years, Lab Test  + All YEarly Exams + DEADLY TEST WEEK(ENDURAnce week pu pa dormi sa !)

What i had thought of this course , n what it turn out to be ! Sometimes HAppy but sometime worst than hell!

Every1 Rushing to submit Project (ME,Kooshal,Vikesh, … and lot more!) …, EVE of Evry assignment to be submitted on the next day , all mates online n working till 4hr du mat atleast ! wai me al dormi 8 hr exception parfois !

Met Professional lecturers which gave our view of cse new dimension but also met some 370HSSV (I guess u know whom im refereing to ->Display + the 1 in 1st yr !), but got to met genius in graphics(Kooshal) + Demon in Programming (Sydney )+ Reliable Collegue as Ever(Vikesh,Vanessen + ti korom Soulard 11 players la) + Mates who were there wen we had probs(The Quatre Muskateers specially!).

WHo Thought that these 3 years would soon be over, each one going towards their destination , seperation will be really hard, mates more lifetime mates than ever ,laughed, went through crisis but CSEB is Only AWESOME! So if U feel Proud to be of it Leave ur thoughts ! cool Photos Coming soon!


GOOGLE CALENDAR

April 2, 2009

wow today when i was looking for a software to help me manage my time schedule to finish my bsc level dissertation and also my test week . Then one of my mate suggested google calendar! it was only 1 word awesome awesome! i set it up tosend me an sms before the events occured and its also free! woow im just elated guys n girls do chek it out ! is there smething the google engineers forgot to think about  at GOOGLE?


Do you know Jenna?

February 6, 2009

recently me n sheikh decided to open a contest n try to find out who amidst us people knew jenna tip ! she comes to our cse la b!

vikesh , virna, moi, sheikh ek bhungy pena droit participer ok!

so lets see!


Gmail new lookn Features

November 22, 2008

Again google innovated its email service by allowing the users to customise the look and feel of their inbox by enabling them to choose a theme and applying them . Already they had conquered countless users , is there any limit to there imagination? … dnt think so !


Hey Google launches its product in Mauritius

November 6, 2008

Kool, some gud new s guz n gurls , google has launch its product entitled google map and also many other products ! . It was held few days back on the behalf of BOI(board of investment) and as students we have already been googalised! so mauritius is atleast trying to carve an identity in this part of the world too , woow , continue on ! plz feel free to leave ur comment ! example even at uom student email service  are hosted by google , umail , so google is really globalising or shud we say ‘googalising’!…

Google the company that is on  a streak of new technologies that is generating the next decade of software and services on the web and also advocating open source as  a reliable medium ! So if u dnt use google and already its suite of services, perhaps u dont know how to use the internet effectively  or have never been exposed to its potential!


oPERATION GO SLOW

November 3, 2008

hmm 2day some 370HSSV did bloked the road to the capital n this has had much repercusion on evry 1 from student to employees going to work.! well those damn stupid people didnt realised due to their suposed hell manifestaion, mnay student going for exams wer pertubed

hw was their state of mind went they had to reach on time for their paper. They have also made the working people come to office late n then

police shud confisticate all their license n make sure they dnt ever in their life be liable to apply for one !


Google Android Rocks

October 18, 2008

Google simply can stop being inventive, already they had the world at their grip , now with the release of Android kit earlier and now 1st mobile platform using it available, it gne na be awesome. It is directly sending a strong signal to sun which had been the prefered kit for developing mobile phones application for so long so .. let see wat happens in the near future..

If you like using Gmail on your computer you’ll feel very much at ease with Gmail on Android-powered phones. You can download documents and MP3s, manage and view labels, star and archive messages, save drafts and even report spam.

… sourcde from officail gmail blog