View Single Post
Old Aug 30th, 2007, 12:58 PM   #3
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 298
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
Sub Save()         
File.WriteAllText(My.Application.Info.DirectoryPath & "\" & number & ".emp", _         
"-Employee Name Info-:" + vbCrLf _         
& first + " " & middle + " " 
& last + vbCrLf _         & "-Employee Address Info-:" + vbCrLf _         
& address + vbCrLf & city + vbCrLf & state + vbCrLf & zip + vbCrLf _         
& "-Employee Info-:" + vbCrLf _         
& bday + vbCrLf & hphone + vbCrLf & cphone + vbCrLf _         
& "-Employee Social Security Number-:" + vbCrLf _         
& ssn)         
managercp.txtfirst.Text = ""         
managercp.txtmiddle.Text = ""         
managercp.txtlast.Text = ""         
managercp.txtaddress.Text = ""         
managercp.txtcity.Text = ""         
managercp.txtstate.Text = ""         
managercp.txtzip.Text = ""         
managercp.txtbday.Text = ""         
managercp.txthome.Text = ""         
managercp.txtcell.Text = ""         
managercp.txtssn.Text = ""        
 managercp.txtnumber.Text = ""     
End Sub      

Sub EmpExists()         
MsgBox("Employee File with that number already exists. Please specify a new number, or delete the existing Employee File.", _         MsgBoxStyle.Critical, "Employee File Error")     
End Sub

  Private Sub save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save.Click         
If My.Computer.FileSystem.FileExists(My.Application.Info.DirectoryPath & "\" & txtnumber.Text & ".emp") Then             
Employee.EmpExists()         
Else             
Employee.Save()         
End If
End Sub
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain

Destruction leads to a very rough road, but it also breeds creation.
bigguy is offline   Reply With Quote