protected void Page_Load(object sender, EventArgs e) { ddlCountries.DataSource = handler.BLL_GetAllCountries(); ddlCountries.DataTextField = "CountryDescription"; ddlCountries.DataValueField = "CountryID"; ddlCountries.DataBind(); ddlCities.DataSource = handler.BLL_GetAllCities(); ddlCities.DataTextField = "CityDescription"; ddlCities.DataValueField = "CityID"; ddlCities.DataBind(); int studentNo = 213456854; ///////////////////////////////////////////////////////// UspGetStudentProfile vs = handler.BLL_GetStudentProfile1(studentNo); txtStudentNo.Text = "215333608"; txtFirstName.Text = vs.studentFirstName; txtEmail.Text = vs.studentEmail; txtLastName.Text = vs.studentLastName; txtDateofBirth.Text = vs.studentDateofBirth.ToString(); //txtc.Text = vs.countryDescription.ToString(); //ddlCities.Text = vs.cityDescription.ToString(); txtEmail.Text = vs.studentEmail; txtContactNo.Text = vs.studentContactNo; //txtIndustry.Text = vs.industryDescription.ToString(); //txtQualifications.Text = vs.qualificationDescription.ToString(); txtSkills.Text = vs.skillDescription.ToString(); if (vs.driversLicense == "yes") { rbtnDriversYes.Checked = true; } else { rbtnDriversNo.Checked = true; } //byte[] bytes = (byte[])vs.studentProfilePicture; //string base64String = Convert.ToBase64String(bytes); //Image1.ImageUrl = "data:image/png;base64," + bytes; //DataTable dt = (DataTable)Session["dt"]; //Image1.ImageUrl = dt.Rows[0][4].ToString() + vs.StudentProfilePicture; //Image1.ImageUrl = base64String; txtStudUsername.Text = vs.studentUsername; txtStudPassword.Text = vs.studentPassword; lblLastUpdated2.Text = vs.lastUpdate.ToString(); }
protected void Page_Load(object sender, EventArgs e) { int studentNo1 = 215333608; btnDownloadCV.Visible = false; BLL_handler.BLL_GetStudentProfile(studentNo1); btnCV.Visible = false; btnCV.Enabled = false; txtCity.Enabled = false; txtContactNumber.Enabled = false; txtCountry.Enabled = false; txtDateOfBirth.Enabled = false; txtDrivers.Enabled = false; txtEmail.Enabled = false; txtFirstName.Enabled = false; txtIndustry.Enabled = false; txtLastName.Enabled = false; txtLastUpdated.Enabled = false; txtQualifications.Enabled = false; txtSkills.Enabled = false; txtStudentNumber.Enabled = false; txtStudentPassword.Enabled = false; txtStudentUsername.Enabled = false; int studentNo = 0; ///////////////////////////////////////////////////////// if (!IsPostBack) { studentNo = int.Parse(Request.QueryString["studentNumber"]); UspGetStudentProfile vs = handler.BLL_GetStudentProfile1(studentNo); try { txtStudentNumber.Text = studentNo.ToString(); txtFirstName.Text = vs.studentFirstName; txtEmail.Text = vs.studentEmail; txtLastName.Text = vs.studentLastName; txtDateOfBirth.Text = vs.studentDateofBirth.ToString(); txtCountry.Text = vs.countryDescription.ToString(); txtCity.Text = vs.cityDescription.ToString(); txtEmail.Text = vs.studentEmail; txtContactNumber.Text = vs.studentContactNo; txtIndustry.Text = vs.industryDescription.ToString(); txtQualifications.Text = vs.qualificationDescription.ToString(); txtSkills.Text = vs.skillDescription.ToString(); txtDrivers.Text = vs.driversLicense; //byte[] bytes = (byte[])vs.studentProfilePicture; //string base64String = Convert.ToBase64String(bytes); //Image1.ImageUrl = "data:image/png;base64," + bytes; //DataTable dt = (DataTable)Session["dt"]; //Image1.ImageUrl = dt.Rows[0][4].ToString() + vs.StudentProfilePicture; //Image1.ImageUrl = base64String; txtStudentUsername.Text = vs.studentUsername; txtStudentPassword.Text = vs.studentPassword; txtLastUpdated.Text = vs.lastUpdate.ToString(); } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('There was a problem with viewing your profile.');</script>" + ex); } } }