public void formPreview() { btnSave.Visible = false; btnNext.Visible = false; btnPrevious.Visible = false; btnPreview.Visible = false; DataSet ds = new DataSet(); DatabaseFunctions db = new DatabaseFunctions(); ds = db.getProgramIDbyApplicationID(Convert.ToInt32(Request.QueryString["ApplicationID"].ToString())); if (ds.Tables[0].Rows.Count > 0) { int JambForm = Convert.ToInt16(ds.Tables[0].Rows[0]["HasJambData"].ToString()); //1 int BioForm = Convert.ToInt16(ds.Tables[0].Rows[0]["HasBioDataSection"].ToString());//2 int OlevelForm = Convert.ToInt16(ds.Tables[0].Rows[0]["HasOlevelResult"].ToString());//3 int PreviousRecordForm = Convert.ToInt16(ds.Tables[0].Rows[0]["HasPreviousRecord"].ToString());//4 int CbtScheduleForm = Convert.ToInt16(ds.Tables[0].Rows[0]["HasCBTSchedule"].ToString());//5 if (OlevelForm == 0) { HasOlevelResult.Visible = false; } if (PreviousRecordForm == 0) { panelpreview_PreviousRecord.Visible = false; } if (CbtScheduleForm == 0) { HasCBTSchedule.Visible = false; } } string previousColName = ViewState["CurrentPanelName"].ToString(); Panel panelprev = this.Master.FindControl("ContentPlaceHolder1").FindControl(previousColName) as Panel; if (panelprev != null) { panelprev.Visible = false; } panelPreview.Visible = true; ds = new DataSet(); ds = db.getAlluserRelatedInfo((Membership.GetUser().ProviderUserKey.ToString())); if (ds.Tables[0].Rows.Count > 0) { string programName = string.Empty; string img = ds.Tables[0].Rows[0]["profilepic"].ToString(); string course = string.Empty; if (img != "") { imgDp.Src = "profilepics/" + img.ToString(); ; imgDp.Visible = true; } else { imgDp.Visible = false; } DataSet pgName = db.getProgramByID(Convert.ToInt32(ViewState["programID"])); if (pgName.Tables[0].Rows.Count > 0) { programName = pgName.Tables[0].Rows[0]["ProgramName"].ToString(); } lblSuname.Text = ds.Tables[0].Rows[0]["surname"].ToString(); lblFname.Text = ds.Tables[0].Rows[0]["firstname"].ToString(); lblOtherName.Text = ds.Tables[0].Rows[0]["othername"].ToString(); lblGender.Text = ds.Tables[0].Rows[0]["gender"].ToString(); lblPhonenum.Text = ds.Tables[0].Rows[0]["phonenumber"].ToString(); lblProgram.Text = programName; lblCourse.Text = db.getApplication_Courses(Convert.ToInt32(ViewState["programID"]), Convert.ToInt32(Request.QueryString["ApplicationID"])); lblstateoforigin.Text = ds.Tables[0].Rows[0]["statenew"].ToString(); lblLocalGotArea.Text = ds.Tables[0].Rows[0]["govtnew"].ToString(); lblJambRegno.Text = ds.Tables[0].Rows[0]["JAMBRegno"].ToString(); lblJambExamyear.Text = ds.Tables[0].Rows[0]["JambExamyear"].ToString(); lblJambFullName.Text = ds.Tables[0].Rows[0]["JambFullName"].ToString(); lblInstitutionAttended.Text = ds.Tables[0].Rows[0]["institutionNew"].ToString(); lblCourseName.Text = ds.Tables[0].Rows[0]["CourseName"].ToString(); courseType.Text = ds.Tables[0].Rows[0]["CourseType"].ToString(); lblCourseGrade.Text = ds.Tables[0].Rows[0]["CourseGrade"].ToString(); yearCompleted.Text = ds.Tables[0].Rows[0]["YearCompleted"].ToString(); lblIndustrialStart.Text = ds.Tables[0].Rows[0]["IndTrainingStart"].ToString(); lblIndustrialEnd.Text = ds.Tables[0].Rows[0]["IndTrainingEnd"].ToString(); lblCbtSchedule.Text = ds.Tables[0].Rows[0]["ScheduleDate"].ToString() + ", " + ds.Tables[0].Rows[0]["ScheduleTime"].ToString(); labelCbtUser.Text = ds.Tables[0].Rows[0]["CbtUserName"].ToString(); lblCbtPass.Text = ds.Tables[0].Rows[0]["CbtPassword"].ToString(); lblRegistrationNum.Text = ViewState["formnum"].ToString(); ; } }