本文整理汇总了C#中Student.GetTel方法的典型用法代码示例。如果您正苦于以下问题:C# Student.GetTel方法的具体用法?C# Student.GetTel怎么用?C# Student.GetTel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Student
的用法示例。
在下文中一共展示了Student.GetTel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoViewStudent
protected void DoViewStudent(string studentID)
{
outBuf = new StringBuilder();
DBManager db = new MySQLDBManager(Config.DB_SERVER, Config.DB_NAME, Config.DB_USER, Config.DB_PASSWORD, Config.DB_CHAR_ENC);
theStudent = new Student();
theStudent.LoadFromDB(db, " student_id=" + studentID);
// quiz
StringBuilder quizInfo = new StringBuilder();
if (theStudent.isQuizNoSelected(1)) { quizInfo.AppendLine("   - โบรชัวร์ของทางโรงเรียน" + "<br>"); }
if (theStudent.isQuizNoSelected(2)) { quizInfo.AppendLine("   - พี่/น้อง/เพื่อน/ครู บอกต่อกันมา" + "<br>"); }
if (theStudent.isQuizNoSelected(3)) { quizInfo.AppendLine("   - เดินผ่านมาเจอ" + "<br>"); }
if (theStudent.isQuizNoSelected(4)) { quizInfo.AppendLine("   - เว็บไซต์โรงเรียน (www.bts.ac.th)" + "<br>"); }
if (theStudent.isQuizNoSelected(5)) { quizInfo.AppendLine("   - โครงการติวต่าง ๆ (" + theStudent.getQuizNoText(5) + ")<br>"); }
if (theStudent.isQuizNoSelected(6)) { quizInfo.AppendLine("   - อื่น (" + theStudent.getQuizNoText(6) + ")<br>"); }
// Query registration history
Registration[] reghis = Registration.LoadListFromDBCustom(db, "SELECT rg.*,c.bts_course_id as bts_course_id, c.course_name as course_name FROM registration rg, course c WHERE "
+ " student_id=" + theStudent._studentID + " AND rg.course_id=c.course_id ORDER BY rg.regis_id ");
db.Close();
StringBuilder regHisTxt = new StringBuilder();
if (reghis.Length > 0)
{
for (int i = 0; i < reghis.Length; i++)
{
string statusTxt = Registration.GetStatusText(reghis[i]._status);
if (reghis[i]._status == Registration.STATUS_CANCELLED)
{
statusTxt = "<font color=red>" + statusTxt + "</font>";
}
regHisTxt.AppendLine("<tr>");
regHisTxt.AppendLine("<td> " + reghis[i]._regisdate.ToString("dd/MM/yyyy HH:mm", ci) + "</td>");
regHisTxt.AppendLine("<td> " + "<a href=\"CourseManage.aspx?actPage=view&targetID=" + reghis[i]._courseID + "\" >" + reghis[i]._btsCourseID + " " + reghis[i]._courseName + "</a>" + "</td>");
regHisTxt.AppendLine("<td align=center>" + StringUtil.Int2StrComma(reghis[i]._fullCost) + "</td>");
regHisTxt.AppendLine("<td align=center>" + StringUtil.Int2StrComma(reghis[i]._discountedCost) + "</td>");
regHisTxt.AppendLine("<td align=center>" + statusTxt + "</td>");
regHisTxt.AppendLine("<td align=center>" + reghis[i]._note + "</td>");
regHisTxt.AppendLine("</tr>");
}
}
else
{
regHisTxt.AppendLine("<tr><td colspan=3 align=center>ไม่พบข้อมูลการลงทะเบียน</td></tr>");
}
TextReader reader = new StreamReader(Config.PATH_APP_ROOT + "\\template\\student_view.htm");
String templateContent = reader.ReadToEnd();
reader.Close();
String htmlContent =
String.Format(templateContent
, Config.URL_PIC_STUDENT + "/" + theStudent._img
, Student.GetStudentID(theStudent._studentID)
, theStudent._firstname + " " + theStudent._surname + " (" + theStudent._nickname + ")"
, Config.URL_PIC_SYS + (theStudent._sex.Equals("Male") ? "/boy.gif" : "/girl.gif")
, theStudent._citizenID
, StringUtil.ConvertEducateLevel(theStudent._level)
, theStudent._school
, theStudent._birthday.ToString("dd/MM/yyyy", ci)
, theStudent._addr
, theStudent.GetTel()
, theStudent._email
, theStudent._create_date.ToString("dd/MM/yyyy", ci)
, quizInfo.ToString()
, regHisTxt.ToString());
outBuf.Append(htmlContent);
}
示例2: ProcessWizQueryStudentDetail
protected void ProcessWizQueryStudentDetail(string studentID)
{
DBManager db = new MySQLDBManager(Config.DB_SERVER, Config.DB_NAME, Config.DB_USER, Config.DB_PASSWORD, Config.DB_CHAR_ENC);
Student s = new Student();
s.LoadFromDB(db, " student_id=" + studentID);
db.Close();
TextReader reader = new StreamReader(Config.PATH_APP_ROOT + "\\template\\" + AjaxSvc.WIZ_Q_STUDENT_DETAIL + ".htm");
String templateContent = reader.ReadToEnd();
reader.Close();
String htmlContent =
String.Format(templateContent
, Config.URL_PIC_STUDENT + "/" + s._img
, Student.GetStudentID(s._studentID)
, s._firstname + " " + s._surname + " (" + s._nickname + ")"
, s._citizenID
, Config.URL_PIC_SYS + (s._sex.Equals("Male") ? "/boy.gif" : "/girl.gif")
, s._school
, s._birthday.ToString("dd/MM/yyyy", ci)
, s._addr
, s.GetTel()
, s._email
);
outBuf.Append(htmlContent);
}