当前位置: 首页>>代码示例>>C#>>正文


C# Student.GetTel方法代码示例

本文整理汇总了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("&nbsp&nbsp  - โบรชัวร์ของทางโรงเรียน" + "<br>"); }
            if (theStudent.isQuizNoSelected(2)) { quizInfo.AppendLine("&nbsp&nbsp  - พี่/น้อง/เพื่อน/ครู บอกต่อกันมา" + "<br>"); }
            if (theStudent.isQuizNoSelected(3)) { quizInfo.AppendLine("&nbsp&nbsp  - เดินผ่านมาเจอ" + "<br>"); }
            if (theStudent.isQuizNoSelected(4)) { quizInfo.AppendLine("&nbsp&nbsp  - เว็บไซต์โรงเรียน (www.bts.ac.th)" + "<br>"); }
            if (theStudent.isQuizNoSelected(5)) { quizInfo.AppendLine("&nbsp&nbsp  - โครงการติวต่าง ๆ (" + theStudent.getQuizNoText(5) + ")<br>"); }
            if (theStudent.isQuizNoSelected(6)) { quizInfo.AppendLine("&nbsp&nbsp  - อื่น (" + 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>&nbsp" + reghis[i]._regisdate.ToString("dd/MM/yyyy HH:mm", ci) + "</td>");
                    regHisTxt.AppendLine("<td>&nbsp" + "<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);
        }
开发者ID:nettatata,项目名称:btsman,代码行数:72,代码来源:StudentManage.aspx.cs

示例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);
        }
开发者ID:nettatata,项目名称:btsman,代码行数:27,代码来源:AjaxService.aspx.cs


注:本文中的Student.GetTel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。