CODES : Application form

[A] : Apply for a job by filling up the recruitment form .
Partial Class recruitment_form
Inherits System.Web.UI.Page
Protected Sub caldob_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles caldob.SelectionChanged
Me.txtdob.Text = Me.caldob.SelectedDate
End Sub

Protected Sub btnsub_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsub.Click

Try
Me.txtmarks10.Text = Format(CType(Me.txtmarks10.Text, Decimal), "##0.00")
Catch ex As Exception
Me.txtmarks10.Text = "0"
Me.txtmarks10.Text = Format(CType(Me.txtmarks10.Text, Decimal), "##0.00")
End Try
Try
Me.txtmarks12.Text = Format(CType(Me.txtmarks12.Text, Decimal), "##0.00")
Catch ex As Exception
Me.txtmarks12.Text = "0"
Me.txtmarks12.Text = Format(CType(Me.txtmarks12.Text, Decimal), "##0.00")
End Try
Try
Me.txtmarksg.Text = Format(CType(Me.txtmarksg.Text, Decimal), "##0.00")
Catch ex As Exception
Me.txtmarksg.Text = "0"
Me.txtmarksg.Text = Format(CType(Me.txtmarksg.Text, Decimal), "##0.00")
End Try
Try
Me.txtmarkspg.Text = Format(CType(Me.txtmarkspg.Text, Decimal), "##0.00")
Catch ex As Exception
Me.txtmarkspg.Text = "0"
Me.txtmarkspg.Text = Format(CType(Me.txtmarkspg.Text, Decimal), "##0.00")
End Try
Dim sb As New StringBuilder()
sb = sb.Append("insert into recruitment_db")
sb = sb.Append("(name,address,date_of_apply,dob,sex,")
sb = sb.Append("designation,specialization,")
sb = sb.Append("marks_10,marks_12,marks_g,marks_pg,subject_g,subject_pg,")
sb = sb.Append("extra_qualification,login_id,password,pwdrq,pwdra,")
sb = sb.Append("quarter_desired,experience,code,interview_marks,exam_marks)")
sb = sb.Append("values")
sb = sb.Append("('" + Me.txtfname.Text.ToString + Me.txtmname.Text.ToString + Me.txtlname.Text.ToString + "',")
sb = sb.Append("'" + Me.txtaddress1.Text.ToString + Me.txtaddress2.Text.ToString + Me.txtpin.Text.ToString + Me.txtcountry.Text.ToString + "',")
sb = sb.Append("'" + Me.txtdoa.Text.ToString + "','" + Me.txtdob.Text.ToString + "','" + Me.radiosex.SelectedItem.Text.ToString + "',")
sb = sb.Append("'" + Me.ddndesig.SelectedItem.Text.ToString + "',")
sb = sb.Append("'" + Me.ddnspecialize.SelectedItem.Text.ToString + "',")
sb = sb.Append("'" + Me.txtmarks10.Text + "','" + Me.txtmarks12.Text + "','" + Me.txtmarksg.Text + "','" + Me.txtmarkspg.Text + "',")
sb = sb.Append("'" + Me.txtsubg.Text.ToString + "','" + Me.txtsubpg.Text.ToString + "','" + Me.txtextrq.Text.ToString + "',")
sb = sb.Append("'" + Me.txtloginid.Text.ToString + "','" + Me.txtpwd.Text.ToString + "',")
sb = sb.Append("'" + Me.ddnprq.SelectedItem.Text.ToString + "','" + Me.txtpra.Text.ToString + "',")
sb = sb.Append("'" + Me.radioquarter.SelectedValue.ToString + "',")
sb = sb.Append("'" + Me.ddnexpe.SelectedItem.Text.ToString + "','" + Me.ddncode.SelectedItem.Text.ToString + "',")
sb = sb.Append("'" + Format(CType("0", Decimal), "##0.00") + "','" + Format(CType("0", Decimal), "##0.00") + "')")
Dim recruit As New hcms
If (recruit.makeentry(sb.ToString)) Then
Me.message.Text = "member registration succesfull"
Else
Me.message.Text = "member registration unsuccesfull"
End If



End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.txtdoa.Text = Date.UtcNow
End Sub
End Class


//hcms is a class file which has some reusable codes in it.
// i shall put it now

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.