private void initPage() { lblTitle.Text = "Student's Application History"; USTTI.Data.USTTIDataAccess data = new USTTI.Data.USTTIDataAccess(); USTTI.Base.Student StudentInfo = data.GetStudentInfo(StudentID); student_info_header.SetObjectValue(StudentInfo.FirstName, StudentInfo.LastName, StudentInfo.DOB.ToString(), StudentInfo.CountryName); string sql = "SELECT a.*,s.firstname,s.lastname,c.countryname,o.date_from " + "FROM application a,student s,country c,orientation o WHERE s.studentid=a.studentid AND c.countryid=s.countryid " + "AND o.orientid=a.orientid AND a.studentid='" + StudentID + "' ORDER BY a.applicdate DESC"; DataTable dt = data.Fill(sql); dgApplication.DataSource = dt; dgApplication.DataBind(); if (dt.DefaultView.Count.Equals(0)) { lblMessNull.Text = "No Application History for This Student"; lblMessNull.Visible = true; } else { lblMessNull.Visible = false; } }
private void initPage() { txtSID.Text = Convert.ToString(StudentID); application_date.GenerateDateList(2006, 2020); SetDefaultApplicationDate(); arrival_date.GenerateDateList(2006, 2020); departure_date.GenerateDateList(2006, 2020); checkout_date.GenerateDateList(2006, 2020); RequiredFieldValidator1.Enabled = false; RequiredFieldValidator2.Enabled = false; application_date.setValidatorOff(); arrival_date.setValidatorOff(); departure_date.setValidatorOff(); checkout_date.setValidatorOff(); RequiredFieldValidator3.Enabled = false; USTTI.Data.USTTIDataAccess data = new USTTI.Data.USTTIDataAccess(); USTTI.Base.Student StudentInfo = data.GetStudentInfo(StudentID); if (lblStartDate.Text.Length.Equals(0)) { btnBrowseOID.Visible = true; } else { btnBrowseOID.Visible = false; } lblStudentName.Text = StudentInfo.FirstName + " " + StudentInfo.LastName; }
private void initPage() { USTTI.Data.USTTIDataAccess data = new USTTI.Data.USTTIDataAccess(); USTTI.Base.Student StudentInfo = data.GetStudentInfo(StudentID); student_header_info.SetObjectValue(StudentInfo.FirstName, StudentInfo.LastName, StudentInfo.DOB.ToString(), StudentInfo.CountryName); ViewCourseLoadDetail(); tblSubPageEntryDetail.Visible = false; }
private void SaveRecord() { USTTIDataAccess data = new USTTIDataAccess(); USTTI.Base.Student objStudentTbl = new USTTI.Base.Student(); //UsttiDataObject.student objStudentTbl = new UsttiDataObject.student(); UsttiDataObject.PhoneNumber objBusPhoneNumber = new UsttiDataObject.PhoneNumber(); UsttiDataObject.PhoneNumber objHomePhoneNumber = new UsttiDataObject.PhoneNumber(); UsttiDataObject.PhoneNumber objFaxPhoneNumber = new UsttiDataObject.PhoneNumber(); StudentID = data.GetNextStudentID(); objStudentTbl.StudentID = StudentID; objStudentTbl.Honorific = DropDownListHonorific.SelectedItem.Text; objStudentTbl.FirstName = UtilManager.RemoveSpecialCharacters(txtFirstName.Text.ToString()); objStudentTbl.MiddleName = UtilManager.RemoveSpecialCharacters(txtMiddleName.Text.ToString()); objStudentTbl.LastName = UtilManager.RemoveSpecialCharacters(txtLastName.Text.ToString()); objStudentTbl.Suffix = UtilManager.RemoveSpecialCharacters(txtSuffix.Text.ToString()); objStudentTbl.DOB = Convert.ToDateTime(dob_selector.GetDate().ToString()); objStudentTbl.Sex = DropDownListSex.SelectedItem.Text; objStudentTbl.Org1 = UtilManager.RemoveSpecialCharacters(txtOrg1.Text.ToString()); objStudentTbl.Title = txtTitle.Text; objStudentTbl.Addr1 = UtilManager.RemoveSpecialCharacters(txtAddress1.Text.ToString()); objStudentTbl.City = UtilManager.RemoveSpecialCharacters(txtCity.Text.ToString()); objStudentTbl.ZipCode = txtZipCode.Text; objStudentTbl.BusPhone = objBusPhoneNumber.getNumber(txtBusCountryCode, txtBusAreaCode, txtBusPhoneNumber); objStudentTbl.HomePhone = objHomePhoneNumber.getNumber(txtHomeCountryCode, txtHomeAreaCode, txtHomePhoneNumber); objStudentTbl.Fax = objFaxPhoneNumber.getNumber(txtFaxCountryCode, txtFaxAreaCode, txtFaxPhoneNumber); objStudentTbl.CellPhone = txtCellPhone.Text; objStudentTbl.BusEmail = UtilManager.RemoveSpecialCharacters(txtBusEmail.Text.ToString()); objStudentTbl.PerEmail = UtilManager.RemoveSpecialCharacters(txtPerEmail.Text.ToString()); objStudentTbl.SpvrName = UtilManager.RemoveSpecialCharacters(txtSpvrName.Text.ToString()); objStudentTbl.SpvrTitle = UtilManager.RemoveSpecialCharacters(txtSpvrTitle.Text.ToString()); objStudentTbl.SpvrEmail = UtilManager.RemoveSpecialCharacters(txtSupvrEmail.Text.ToString()); objStudentTbl.Memo = UtilManager.RemoveSpecialCharacters(txtMemo.Text.ToString()); objStudentTbl.PNG = PNGRadioButton.SelectedValue; objStudentTbl.HomeAddr1 = UtilManager.RemoveSpecialCharacters(txtHomeAddress1.Text.ToString()); objStudentTbl.HomeCity = UtilManager.RemoveSpecialCharacters(txtHomeCity.Text.ToString()); objStudentTbl.HomeZipCode = txtHomeZipCode.Text; objStudentTbl.CountryID = Convert.ToInt32(CountryDropDownList.SelectedValue); objStudentTbl.PassNum = txtPassportNum.Text; objStudentTbl.PassExpDate = Convert.ToDateTime(pass_exp_date_selector.GetDate()); objStudentTbl.PassCountry = Convert.ToInt32(PassCountryDataList.SelectedValue); objStudentTbl.LastUpdateTime = DateTime.Now; objStudentTbl.ReadingSkill = ReadingSkill.SelectedValue; objStudentTbl.WritingSkill = WritingSkill.SelectedValue; objStudentTbl.SpeakingSkill = SpeakingSkill.SelectedValue; objStudentTbl.ComprehensionSkill = Comprehension.SelectedValue; data.InsertStudentRecord(objStudentTbl); }
private void initPage() { InitiateFunderList(); InitiateFundTypeList(); start_date.GenerateDateList(2006, 2020); end_date.GenerateDateList(2006, 2020); USTTI.Data.USTTIDataAccess data = new USTTI.Data.USTTIDataAccess(); USTTI.Base.Student StudentInfo = data.GetStudentInfo(StudentID); student_info_header.SetObjectValue(StudentInfo.FirstName, StudentInfo.FirstName, StudentInfo.DOB.ToString(), StudentInfo.CountryName); ViewFundingListDetail(); tblSubPageEntryDetail.Visible = false; }
protected void SaveUserInputinEdit(Decimal strStudentID) { USTTIDataAccess data = new USTTIDataAccess(); USTTI.Base.Student objStudentTbl = new USTTI.Base.Student(); objStudentTbl.StudentID = strStudentID; objStudentTbl.Honorific = DropDownListHonorific.SelectedItem.Text; objStudentTbl.FirstName = txtFirstName.Text; objStudentTbl.MiddleName = txtMiddleName.Text; objStudentTbl.LastName = txtLastName.Text; objStudentTbl.Suffix = txtSuffix.Text; objStudentTbl.DOB = Convert.ToDateTime(dob_selector.GetDate()); objStudentTbl.Sex = DropDownListSex.SelectedItem.Text; objStudentTbl.Org1 = txtOrg1.Text; objStudentTbl.Title = txtTitle.Text; objStudentTbl.Addr1 = txtAddress1.Text; objStudentTbl.City = txtCity.Text; objStudentTbl.ZipCode = txtZipCode.Text; if (ViewState["oldbusphnbrformat"].Equals(true)) { objStudentTbl.BusPhone = txtBusPhoneNumberOld.Text.Trim(); } else { objStudentTbl.BusPhone = Regex.Replace(objBusPhoneNumber.getNumber(txtBusCountryCode, txtBusAreaCode, txtBusPhoneNumber), "\\s+", ""); } if (ViewState["oldhomephnbrformat"].Equals(true)) { objStudentTbl.HomePhone = txthomephonenumberoldformat.Text.Trim(); } else { objStudentTbl.HomePhone = Regex.Replace(objHomePhoneNumber.getNumber(txtHomeCountryCode, txtHomeAreaCode, txtHomePhoneNumber), "\\s+", ""); } if (ViewState["oldfaxphnbrformat"].Equals(true)) { objStudentTbl.Fax = txtfaxnumberoldformat.Text.Trim(); } else { objStudentTbl.Fax = Regex.Replace(objFaxPhoneNumber.getNumber(txtFaxCountryCode, txtFaxAreaCode, txtFaxPhoneNumber), "\\s+", ""); } objStudentTbl.CellPhone = txtCellPhone.Text; objStudentTbl.BusEmail = txtBusEmail.Text; objStudentTbl.PerEmail = txtPerEmail.Text; objStudentTbl.SpvrName = txtSpvrName.Text; objStudentTbl.SpvrTitle = txtSpvrTitle.Text; objStudentTbl.SpvrEmail = txtSupvrEmail.Text; objStudentTbl.PNG = PNGRadioButton.SelectedValue; objStudentTbl.Memo = txtMemo.Text; objStudentTbl.HomeAddr1 = txtHomeAddress1.Text; objStudentTbl.HomeCity = txtHomeCity.Text; objStudentTbl.HomeZipCode = txtHomeZipCode.Text; objStudentTbl.CountryID = Convert.ToInt32(CountryDropDownList.SelectedValue); objStudentTbl.PassNum = txtPassportNum.Text; objStudentTbl.PassExpDate = Convert.ToDateTime(pass_exp_date_selector.GetDate()); objStudentTbl.PassCountry = Convert.ToInt32(PassCountryDataList.SelectedValue); objStudentTbl.ReadingSkill = ReadingSkill.SelectedValue.Trim(); objStudentTbl.WritingSkill = WritingSkill.SelectedValue.Trim(); objStudentTbl.SpeakingSkill = SpeakingSkill.SelectedValue.Trim(); objStudentTbl.ComprehensionSkill = Comprehension.SelectedValue.Trim(); data.UpdateStudentRecord(objStudentTbl); }