Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

using

using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.OleDb;

public partial class slip : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
this.Page.Title = "Reistration Slip";
Label1.Text = "";
Label2.Text = "";
}
protected void butView_Click(object sender, EventArgs e)
{
if (txtMatNo.Text.Trim() == "")
{
Label1.Text = "Enter Matrix#";
Label2.Text = "";
lblSurname.Text = "";
lblFirstname.Text = "";
lblGender.Text = "";
}
else
{
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.
OLEDB.4.0; Data source =C:\Users\user\Documents\Visual Studio 2008\WebSites\www.
fcepnapssportal.aspx\Data\student.mdb");
conn.Open();
OleDbDataAdapter adap = new OleDbDataAdapter("select * from biodata
where MatNo=?", conn);
adap.SelectCommand.Parameters.AddWithValue("MatNo", txtMatNo.Text.Tr
im());
DataSet ds = new DataSet();
adap.Fill(ds);
if (ds.Tables[0].Rows.Count != 0)
{
lblMatNo.Text = ds.Tables[0].Rows[0]["MatNo"].ToString();
lblSurname.Text = ds.Tables[0].Rows[0]["Surname"].ToString();
lblFirstname.Text = ds.Tables[0].Rows[0]["Firstname"].ToString()
;
lblGender.Text = ds.Tables[0].Rows[0]["Gender"].ToString();
img.ImageUrl = ds.Tables[0].Rows[0]["Pass"].ToString();
lblFaculty.Text = ds.Tables[0].Rows[0]["Faculty"].ToString();
lblLev.Text = ds.Tables[0].Rows[0]["Lev"].ToString();
lblSemester.Text = ds.Tables[0].Rows[0]["Semester"].ToString();
lblDepartment.Text = ds.Tables[0].Rows[0]["Department"].ToString
();
lblSchool.Text = ds.Tables[0].Rows[0]["School"].ToString();
lblCourse.Text = ds.Tables[0].Rows[0]["Course"].ToString();

lblPhoneNo.Text = ds.Tables[0].Rows[0]["PhoneNo"].ToString();
lblEmail.Text = ds.Tables[0].Rows[0]["Email"].ToString();
lblDialect.Text = ds.Tables[0].Rows[0]["Dialect"].ToString();
lblLGA.Text = ds.Tables[0].Rows[0]["LGA"].ToString();
lblState.Text = ds.Tables[0].Rows[0]["State"].ToString();
lblChiefdom.Text = ds.Tables[0].Rows[0]["Chiefdom"].ToString();
lblAdmNo.Text = ds.Tables[0].Rows[0]["AdmNo"].ToString();
lblSponsorship.Text = ds.Tables[0].Rows[0]["Sponsorship"].ToStri
ng();
lblAppliadBefore.Text = ds.Tables[0].Rows[0]["AppliadBefore"].To
String();
lblNapReceiptNo.Text = ds.Tables[0].Rows[0]["NapReceiptNo"].ToSt
ring();
lblReceiptSerNo.Text = ds.Tables[0].Rows[0]["ReceiptSerNo"].ToSt
ring();
lblInstName1.Text = ds.Tables[0].Rows[0]["InstName1"].ToString()
;
lblInstName2.Text = ds.Tables[0].Rows[0]["InstName2"].ToString()
;
lblInstName3.Text = ds.Tables[0].Rows[0]["InstName3"].ToString()
;
lblInstName4.Text = ds.Tables[0].Rows[0]["InstName4"].ToString()
;
lblYrAdm1.Text = ds.Tables[0].Rows[0]["YrAdm1"].ToString();
lblYrAdm2.Text = ds.Tables[0].Rows[0]["YrAdm2"].ToString();
lblYrAdm3.Text = ds.Tables[0].Rows[0]["YrAdm3"].ToString();
lblYrAdm4.Text = ds.Tables[0].Rows[0]["YrAdm4"].ToString();
lblYrGrad1.Text = ds.Tables[0].Rows[0]["YrGrad1"].ToString();
lblYrGrad2.Text = ds.Tables[0].Rows[0]["YrGrad2"].ToString();
lblYrGrad3.Text = ds.Tables[0].Rows[0]["YrGrad3"].ToString();
lblYrGrad4.Text = ds.Tables[0].Rows[0]["YrGrad4"].ToString();
lblCert1.Text = ds.Tables[0].Rows[0]["Cert1"].ToString();
lblCert2.Text = ds.Tables[0].Rows[0]["Cert2"].ToString();
lblCert3.Text = ds.Tables[0].Rows[0]["Cert3"].ToString();
lblCert4.Text = ds.Tables[0].Rows[0]["Cert4"].ToString();
lblRefName1.Text = ds.Tables[0].Rows[0]["RefName1"].ToString();
lblRefName2.Text = ds.Tables[0].Rows[0]["RefName2"].ToString();
lblRefName3.Text = ds.Tables[0].Rows[0]["RefName3"].ToString();
lblAdd1.Text = ds.Tables[0].Rows[0]["Add1"].ToString();
lblAdd2.Text = ds.Tables[0].Rows[0]["Add2"].ToString();
lblAdd3.Text = ds.Tables[0].Rows[0]["Add3"].ToString();
lblPhonNo1.Text = ds.Tables[0].Rows[0]["PhonNo1"].ToString();
lblPhonNo2.Text = ds.Tables[0].Rows[0]["PhonNo2"].ToString();
lblPhonNo3.Text = ds.Tables[0].Rows[0]["PhonNo3"].ToString();
lblOcc1.Text = ds.Tables[0].Rows[0]["Occ1"].ToString();
lblOcc2.Text = ds.Tables[0].Rows[0]["Occ2"].ToString();
lblOcc3.Text = ds.Tables[0].Rows[0]["Occ3"].ToString();
Label2.Text= "The application has been recieved, Congrat";
Label1.Text = "";
}
else
{
lblSurname.Text = "";
lblFirstname.Text = "";
lblGender.Text = "";
lblFaculty.Text = "";
lblDepartment.Text = "";

lblCourse.Text = "";
}
conn.Close();
}
}
protected void butNext_Click(object sender, EventArgs e)
{
Response.Redirect("~awardletter.aspx");
}
}
Prinr interface code

You might also like