コード例 #1
0
        public static StringBuilder GetMain(string _id)
        {
            StringBuilder _str = new StringBuilder();
            Dictionary <string, object> _paramSearch       = new Dictionary <string, object>();
            Dictionary <string, object> _valueDataRecorded = new Dictionary <string, object>();
            Dictionary <string, object> _dataRecorded      = new Dictionary <string, object>();
            string _studentCode      = String.Empty;
            string _fullNameTH       = String.Empty;
            string _fullNameEN       = String.Empty;
            string _facultyNameTH    = String.Empty;
            string _facultyNameEN    = String.Empty;
            string _programNameTH    = String.Empty;
            string _programNameEN    = String.Empty;
            string _statusTypeNameTH = String.Empty;
            string _statusTypeNameEN = String.Empty;

            string[] _valueArray = _id.Split('|');

            _paramSearch.Clear();
            _paramSearch.Add("PersonId", _valueArray[0]);
            _paramSearch.Add("ScholarshipsYear", _valueArray[1]);
            _paramSearch.Add("Semester", _valueArray[2]);
            _paramSearch.Add("ScholarshipsId", _valueArray[3]);

            _valueDataRecorded = SCHUtil.SetValueDataRecorded(SCHUtil.PAGE_IMPORTREGISTERSCHOLARSHIPSTUDENTCV_MAIN, "", _paramSearch);
            _dataRecorded      = (_valueDataRecorded != null ? (Dictionary <string, object>)_valueDataRecorded["DataRecorded" + SCHUtil.SUBJECT_IMPORTREGISTERSCHOLARSHIPSTUDENTCV] : null);

            _studentCode      = _dataRecorded["StudentCode"].ToString();
            _fullNameTH       = SCHUtil.GetFullName(_dataRecorded["TitleInitialsTH"].ToString(), _dataRecorded["TitleFullNameTH"].ToString(), _dataRecorded["FirstName"].ToString(), _dataRecorded["MiddleName"].ToString(), _dataRecorded["LastName"].ToString());
            _fullNameEN       = SCHUtil.GetFullName(_dataRecorded["TitleInitialsEN"].ToString(), _dataRecorded["TitleFullNameEN"].ToString(), _dataRecorded["FirstNameEN"].ToString(), _dataRecorded["MiddleNameEN"].ToString(), _dataRecorded["LastNameEN"].ToString()).ToUpper();
            _facultyNameTH    = _dataRecorded["FacultyNameTH"].ToString();
            _facultyNameEN    = _dataRecorded["FacultyNameEN"].ToString();
            _programNameTH    = _dataRecorded["ProgramNameTH"].ToString();
            _programNameEN    = _dataRecorded["ProgramNameEN"].ToString();
            _statusTypeNameTH = _dataRecorded["StatusTypeNameTH"].ToString();
            _statusTypeNameEN = _dataRecorded["StatusTypeNameEN"].ToString();

            _str.AppendLine(GetValue(_valueDataRecorded).ToString());
            _str.AppendLine("<div class='ui form'>");
            _str.AppendLine("   <div class='ui right aligned header'>");
            _str.AppendLine("       <i class='close icon link font-th regular black btnclose'></i>");
            _str.AppendLine("   </div>");
            _str.AppendLine("</div>");
            _str.AppendLine("<div class='view paddingTop5'>");
            _str.AppendLine("   <div class='iform'>");
            _str.AppendLine("       <div class='iform-row'>");
            _str.AppendLine("           <div class='col1 iform-col'>");
            _str.AppendLine("               <div class='avatar profilepicture'>");
            _str.AppendLine("                   <div class='watermark'></div>");
            _str.AppendLine("                   <img />");
            _str.AppendLine("               </div>");
            _str.AppendLine("           </div>");
            _str.AppendLine("           <div class='col2 iform-col'>");
            _str.AppendLine("               <div class='iform'>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>รหัสนักศึกษา</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Student ID</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _studentCode);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _studentCode);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>ชื่อ - สกุล</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Full Name</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _fullNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _fullNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>คณะ</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Faculty</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _facultyNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _facultyNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>หลักสูตร</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Program</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _programNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _programNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>สถานภาพ</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Student Status</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _statusTypeNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _statusTypeNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>ทุน</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Scholarship</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular blue'></span><span class='lang lang-th f10 font-th regular blue opacity05'></span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular blue'></span><span class='lang lang-en f10 font-en regular blue opacity05'></span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>สมัครรับทุนเมื่อ</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Regerter When</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular blue'></span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular blue'></span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>หมายเหตุ</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Remark</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular blue'></span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular blue'></span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("               </div>");
            _str.AppendLine("           </div>");
            _str.AppendLine("       </div>");
            _str.AppendLine("   </div>");
            _str.AppendLine("</div>");

            return(_str);
        }
コード例 #2
0
        public static StringBuilder GetMain(string _id)
        {
            Dictionary <string, object> _loginResult = SCHUtil.GetInfoLogin("", "");
            StringBuilder _str = new StringBuilder();
            Dictionary <string, object> _paramSearch       = new Dictionary <string, object>();
            Dictionary <string, object> _valueDataRecorded = SCHUtil.SetValueDataRecorded(SCHUtil.PAGE_REGISTERSCHOLARSHIPSTUDENTCV_MAIN, _id, null);
            Dictionary <string, object> _dataRecorded      = (_valueDataRecorded != null ? (Dictionary <string, object>)_valueDataRecorded["DataRecorded" + SCHUtil.SUBJECT_REGISTERSCHOLARSHIPSTUDENTCV] : null);
            string _username         = _loginResult["Username"].ToString();
            string _userlevel        = _loginResult["Userlevel"].ToString();
            string _systemGroup      = _loginResult["SystemGroup"].ToString();
            string _studentCode      = _dataRecorded["StudentCode"].ToString();
            string _fullNameTH       = SCHUtil.GetFullName(_dataRecorded["TitleInitialsTH"].ToString(), _dataRecorded["TitleFullNameTH"].ToString(), _dataRecorded["FirstName"].ToString(), _dataRecorded["MiddleName"].ToString(), _dataRecorded["LastName"].ToString());
            string _fullNameEN       = SCHUtil.GetFullName(_dataRecorded["TitleInitialsEN"].ToString(), _dataRecorded["TitleFullNameEN"].ToString(), _dataRecorded["FirstNameEN"].ToString(), _dataRecorded["MiddleNameEN"].ToString(), _dataRecorded["LastNameEN"].ToString()).ToUpper();
            string _facultyNameTH    = _dataRecorded["FacultyNameTH"].ToString();
            string _facultyNameEN    = _dataRecorded["FacultyNameEN"].ToString();
            string _programNameTH    = _dataRecorded["ProgramNameTH"].ToString();
            string _programNameEN    = _dataRecorded["ProgramNameEN"].ToString();
            string _statusTypeNameTH = _dataRecorded["StatusTypeNameTH"].ToString();
            string _statusTypeNameEN = _dataRecorded["StatusTypeNameEN"].ToString();
            string _row = String.Empty;
            string _scholarshipsNameTH = String.Empty;
            string _scholarshipsNameEN = String.Empty;
            string _responsibleAgency  = String.Empty;
            string _registerDate       = String.Empty;
            string _scholarshipsYear   = String.Empty;
            string _semester           = String.Empty;

            _str.AppendLine(GetValue(_valueDataRecorded).ToString());
            _str.AppendLine("<div class='ui form'>");
            _str.AppendLine("   <div class='ui right aligned header'>");
            _str.AppendLine("       <i class='close icon link font-th regular black btnclose'></i>");
            _str.AppendLine("   </div>");
            _str.AppendLine("</div>");
            _str.AppendLine("<div class='view paddingTop5'>");
            _str.AppendLine("   <div class='iform'>");
            _str.AppendLine("       <div class='iform-row'>");
            _str.AppendLine("           <div class='col1 iform-col'>");
            _str.AppendLine("               <div class='avatar profilepicture'>");
            _str.AppendLine("                   <div class='watermark'></div>");
            _str.AppendLine("                   <img />");
            _str.AppendLine("               </div>");
            _str.AppendLine("           </div>");
            _str.AppendLine("           <div class='col2 iform-col'>");
            _str.AppendLine("               <div class='iform'>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>รหัสนักศึกษา</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Student ID</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _studentCode);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _studentCode);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>ชื่อ - สกุล</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Full Name</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _fullNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _fullNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>คณะ</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Faculty</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _facultyNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _facultyNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>หลักสูตร</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Program</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _programNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _programNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>ทุน</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Scholarship</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendLine("                           <div class='info-list'>");
            _str.AppendLine("                               <ul>");

            _paramSearch.Clear();
            _paramSearch.Add("Keyword", _studentCode);

            DataSet _ds1 = SCHDB.GetListTranStudentManageScholarship(_username, _userlevel, _systemGroup, _paramSearch);

            foreach (DataRow _dr1 in _ds1.Tables[0].Rows)
            {
                _row = _dr1["rowNum"].ToString();
                _scholarshipsNameTH = _dr1["scholarshipsNameTH"].ToString();
                _scholarshipsNameEN = (!String.IsNullOrEmpty(_dr1["scholarshipsNameEN"].ToString()) ? _dr1["scholarshipsNameEN"].ToString() : (!String.IsNullOrEmpty(_scholarshipsNameTH) ? _scholarshipsNameTH : ""));
                _responsibleAgency  = _dr1["responsibleAgency"].ToString();
                _registerDate       = (!String.IsNullOrEmpty(_dr1["registerDate"].ToString()) ? DateTime.Parse(_dr1["registerDate"].ToString()).ToString("dd/MM/yyyy") : "");
                _scholarshipsYear   = _dr1["scholarshipsYear"].ToString();
                _semester           = _dr1["semester"].ToString();

                _str.AppendLine("                               <li class='blue'>");
                _str.AppendFormat("                                 <span class='lang lang-th f10 font-th regular blue'>{0}</span><span class='lang lang-th f10 font-th regular blue opacity05'>{1}</span><span class='lang lang-th f10 font-th regular blue'> ( {2} - {3} / {4} )</span>", _scholarshipsNameTH, (!String.IsNullOrEmpty(_responsibleAgency) ? (" - " + _responsibleAgency) : ""), _registerDate, _scholarshipsYear, _semester);
                _str.AppendFormat("                                 <span class='lang lang-en f10 font-en regular blue'>{0}</span><span class='lang lang-en f10 font-en regular blue opacity05'>{1}</span><span class='lang lang-en f10 font-en regular blue'> ( {2} - {3} / {4} )</span>", _scholarshipsNameEN, (!String.IsNullOrEmpty(_responsibleAgency) ? (" - " + _responsibleAgency) : ""), _registerDate, _scholarshipsYear, _semester);
                _str.AppendLine("                               </li>");
            }

            _ds1.Dispose();

            _str.AppendLine("                               </ul>");
            _str.AppendLine("                           </div>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='col21 iform-col label-col left aligned'>");
            _str.AppendLine("                           <span class='lang lang-th f10 font-th regular black'>สถานภาพ</span>");
            _str.AppendLine("                           <span class='lang lang-en f10 font-en regular black'>Student Status</span>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                       <div class='col22 iform-col input-col left aligned'>");
            _str.AppendFormat("                         <span class='lang lang-th f10 font-th regular blue'>{0}</span>", _statusTypeNameTH);
            _str.AppendFormat("                         <span class='lang lang-en f10 font-en regular blue'>{0}</span>", _statusTypeNameEN);
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("               </div>");
            _str.AppendLine("               <div class='iform'>");
            _str.AppendLine("                   <div class='iform-row'>");
            _str.AppendLine("                       <div class='iform-col'>");
            _str.AppendLine("                           <div class='ui segment list-grade'>");
            _str.AppendLine("                               <div class='ui middle aligned divided list'>");
            _str.AppendLine("                                   <div class='item'>");
            _str.AppendLine("                                       <div class='content'>");
            _str.AppendLine("                                           <div class='col1 list-col left floated left aligned header'>");
            _str.AppendLine("                                               <span class='lang lang-th f9 font-th regular black'>ภาคการศึกษา</span>");
            _str.AppendLine("                                               <span class='lang lang-en f9 font-en regular black'>Semester</span>");
            _str.AppendLine("                                           </div>");
            _str.AppendLine("                                           <div class='col2 list-col left aligned header'>");
            _str.AppendLine("                                               <span class='lang lang-th f9 font-th regular black'>เกรดเฉลี่ย</span>");
            _str.AppendLine("                                               <span class='lang lang-en f9 font-en regular black'>GPA</span>");
            _str.AppendLine("                                           </div>");
            _str.AppendLine("                                       </div>");
            _str.AppendLine("                                   </div>");

            DataSet _ds2 = SCHDB.GetStudentGPA(_dataRecorded["StudentCode"].ToString());

            foreach (DataRow _dr2 in _ds2.Tables[0].Rows)
            {
                _str.AppendLine("                               <div class='item'>");
                _str.AppendLine("                                   <div class='col1 list-col left floated left aligned content'>");
                _str.AppendFormat("                                     <span class='lang lang-th f10 font-th regular black'>{0}</span>", _dr2["sem"].ToString());
                _str.AppendFormat("                                     <span class='lang lang-en f10 font-en regular black'>{0}</span>", _dr2["sem"].ToString());
                _str.AppendLine("                                   </div>");
                _str.AppendLine("                                   <div class='col2 list-col left aligned content'>");
                _str.AppendFormat("                                     <span class='lang lang-th f10 font-th regular black'>{0}</span>", _dr2["cGPA"].ToString());
                _str.AppendFormat("                                     <span class='lang lang-en f10 font-en regular black'>{0}</span>", _dr2["cGPA"].ToString());
                _str.AppendLine("                                   </div>");
                _str.AppendLine("                               </div>");
            }

            _ds2.Dispose();

            _str.AppendLine("                               </div>");
            _str.AppendLine("                           </div>");
            _str.AppendLine("                       </div>");
            _str.AppendLine("                   </div>");
            _str.AppendLine("               </div>");
            _str.AppendLine("           </div>");
            _str.AppendLine("       </div>");
            _str.AppendLine("   </div>");
            _str.AppendLine("</div>");

            return(_str);
        }
コード例 #3
0
        public static StringBuilder GetMain(Dictionary <string, object> _infoLogin, DataRow[] _dr)
        {
            StringBuilder _str                = new StringBuilder();
            string        _username           = _infoLogin["Username"].ToString();
            string        _userlevel          = _infoLogin["Userlevel"].ToString();
            string        _systemGroup        = _infoLogin["SystemGroup"].ToString();
            string        _personId           = String.Empty;
            string        _studentCode        = String.Empty;
            string        _fullNameTH         = String.Empty;
            string        _fullNameEN         = String.Empty;
            string        _scholarshipsId     = String.Empty;
            string        _scholarshipsNameTH = String.Empty;
            string        _scholarshipsNameEN = String.Empty;
            string        _responsibleAgency  = String.Empty;
            string        _scholarshipsYear   = String.Empty;
            string        _semester           = String.Empty;
            string        _tuition            = String.Empty;
            string        _remark             = String.Empty;
            string        _fontColor          = String.Empty;

            string[] _msgTH       = new string[5];
            string[] _msgEN       = new string[5];
            int      _error       = 0;
            int      _row         = 0;
            int      _i           = 0;
            int      _j           = 0;
            int      _indexArray  = 0;
            int      _recordCount = (_dr.GetLength(0) - 1);

            _str.AppendFormat("<div class='paddingTop10'>");
            _str.AppendLine("   <div class='ui horizontal segments table-title'>");
            _str.AppendLine("       <div class='ui segment left floated grey inverted'>");
            _str.AppendFormat("         <div class='mini ui grey inverted button btnoption {0} button-overflow'>", (_recordCount.Equals(0) ? "disabled" : ""));
            _str.AppendLine("               <i class='save icon font-th regular white'></i>");
            _str.AppendLine("               <span class='lang lang-th f10 font-th regular white'>บันทึก</span>");
            _str.AppendFormat("             <div class='lang lang-th f11 font-th regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>ทั้งหมด</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>เฉพาะที่เลือก</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("               <span class='lang lang-en f10 font-en regular white'>Save</span>");
            _str.AppendFormat("             <div class='lang lang-en f11 font-en regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>All</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>Selected</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("           </div>");
            _str.AppendLine("       </div>");
            _str.AppendLine("       <div class='ui segment right floated right aligned grey inverted recordcount'>");
            _str.AppendFormat("         <span class='lang lang-th f10 font-th regular white'>พบ <span class='recordcountprimary-search'>{0}</span></span>", _recordCount);
            _str.AppendFormat("         <span class='lang lang-en f10 font-en regular white'>Found <span class='recordcountprimary-search'>{0}</span></span>", _recordCount);
            _str.AppendLine("       </div>");
            _str.AppendLine("   </div>");
            _str.AppendLine("   <table class='ui table unstackable'>");
            _str.AppendLine("       <thead>");
            _str.AppendLine("           <tr class='center aligned'>");
            _str.AppendLine("               <th class='col1'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>ที่</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>No.</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col2'>");
            _str.AppendLine("                   <input type ='checkbox' class='select-root checkbox ui' tabindex='0' />");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col3'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>รหัสนักศึกษา</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Student ID</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col4'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>ชื่อ - สกุล</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Full Name</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col5'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>ทุน</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Scholarship</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col6'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>สมัครรับทุน<br />เมื่อ</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Regerter<br />When</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col7'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>จำนวนเงิน<br />( บาท )</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Amount<br />( bath )</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("           </tr>");
            _str.AppendLine("       </thead>");
            _str.AppendLine("       <tbody>");

            if (_recordCount > 0)
            {
                foreach (DataRow _dr1 in _dr)
                {
                    if (_row > 0)
                    {
                        _personId           = String.Empty;
                        _studentCode        = _dr1[3].ToString();
                        _fullNameTH         = String.Empty;
                        _fullNameEN         = String.Empty;
                        _scholarshipsNameTH = _dr1[4].ToString();
                        _scholarshipsNameEN = _scholarshipsNameTH;
                        _responsibleAgency  = _dr1[6].ToString();
                        _scholarshipsYear   = _dr1[1].ToString();
                        _semester           = _dr1[2].ToString();
                        _tuition            = _dr1[5].ToString();
                        _remark             = _dr1[7].ToString();

                        _i = 0;

                        DataSet _ds2 = SCHDB.GetSCHStudent(_username, _userlevel, _systemGroup, _studentCode);
                        _error = (_ds2.Tables[0].Rows.Count > 0 ? 0 : 1);

                        if (_error.Equals(0))
                        {
                            DataRow _dr2 = _ds2.Tables[0].Rows[0];

                            _personId    = _dr2["id"].ToString();
                            _studentCode = _dr2["studentCode"].ToString();
                            _fullNameTH  = SCHUtil.GetFullName(_dr2["titlePrefixInitialsTH"].ToString(), _dr2["titlePrefixFullNameTH"].ToString(), _dr2["firstName"].ToString(), _dr2["middleName"].ToString(), _dr2["lastName"].ToString());
                            _fullNameEN  = SCHUtil.GetFullName(_dr2["titlePrefixInitialsEN"].ToString(), _dr2["titlePrefixFullNameEN"].ToString(), _dr2["firstNameEN"].ToString(), _dr2["middleNameEN"].ToString(), _dr2["lastNameEN"].ToString()).ToUpper();
                        }
                        else
                        {
                            _msgTH[_i] = "ไม่พบนักศึกษา";
                            _msgEN[_i] = "Student not found.";
                            _i++;
                        }

                        _ds2.Dispose();

                        DataSet _ds3 = SCHDB.GetScholarships("", _scholarshipsNameTH);
                        _error = (_ds3.Tables[0].Rows.Count > 0 ? 0 : 1);

                        if (_error.Equals(0))
                        {
                            DataRow _dr3 = _ds3.Tables[0].Rows[0];

                            _scholarshipsId     = _dr3["id"].ToString();
                            _scholarshipsNameTH = _dr3["scholarshipsNameTH"].ToString();
                            _scholarshipsNameEN = (!String.IsNullOrEmpty(_dr3["scholarshipsNameEN"].ToString()) ? _dr3["scholarshipsNameEN"].ToString() : (!String.IsNullOrEmpty(_scholarshipsNameTH) ? _scholarshipsNameTH : ""));

                            if (String.IsNullOrEmpty(_responsibleAgency))
                            {
                                _msgTH[_i] = "ไม่พบหน่วยงานที่รับผิดชอบ";
                                _msgEN[_i] = "Responsible Agency not found.";
                                _i++;
                            }
                        }
                        else
                        {
                            _msgTH[_i] = "ไม่พบทุน";
                            _msgEN[_i] = "Scholarship not found.";
                            _i++;
                        }

                        _ds3.Dispose();

                        _indexArray = SCHUtil.FindIndexArray2D(1, SCHUtil._semester, _semester);
                        _error      = (_indexArray > 0 ? 0 : 1);

                        if (_error.Equals(0))
                        {
                            _semester = SCHUtil._semester[_indexArray - 1, 0];
                        }
                        else
                        {
                            _msgTH[_i] = "ไม่พบภาคเรียน";
                            _msgEN[_i] = "Semester not found.";
                            _i++;
                        }

                        try
                        {
                            _error = (!_tuition.Equals("0") ? 0 : 1);

                            if (_error.Equals(0))
                            {
                                _tuition = double.Parse(_tuition).ToString("#,##0.00");
                            }
                            else
                            {
                                _msgTH[_i] = "จำนวนเงินต้องมากกว่า 0";
                                _msgEN[_i] = "Amount must be greater than 0.";
                                _i++;
                            }
                        }
                        catch
                        {
                            _msgTH[_i] = "รูปแบบจำนวนเงินไม่ถูกต้อง";
                            _msgEN[_i] = "Invalid number format.";
                            _i++;
                        }

                        _fontColor = (_i.Equals(0) ? "black" : "red");

                        _str.AppendFormat(" <tr class='center aligned' id='{0}-id-{1}'>", _idContent, (_personId + _scholarshipsYear + _semester + _scholarshipsId));
                        _str.AppendLine("       <td class='tooltip col1' data-content='' data-contentth='ที่' data-contenten='No.'>");
                        _str.AppendFormat("         <span class='lang lang-th f10 font-th regular {0}'>{1}</span>", _fontColor, _row.ToString("#,##0"));
                        _str.AppendFormat("         <span class='lang lang-en f10 font-en regular {0}'>{1}</span>", _fontColor, _row.ToString("#,##0"));
                        _str.AppendLine("       </td>");
                        _str.AppendLine("       <td class='col2 checkbox'>");

                        if (_i.Equals(0))
                        {
                            _str.AppendLine("       <input type='checkbox' name='select-child' class='select-child checkbox checker' data-options='{\"studentId\":\"" + _studentCode + "\",\"personId\":\"" + _personId + "\",\"scholarshipsYear\":\"" + _scholarshipsYear + "\",\"semester\":\"" + _semester + "\",\"scholarshipsId\":\"" + _scholarshipsId + "\",\"responsibleAgency\":\"" + _responsibleAgency + "\",\"tuition\":\"" + _tuition.Replace(",", "") + "\",\"remark\":\"" + _remark + "\"}' value='" + _personId + ":" + _scholarshipsYear + ":" + _semester + ":" + _scholarshipsId + ":" + _responsibleAgency + ":" + _tuition.Replace(",", "") + ":" + _remark + "' />");
                        }

                        _str.AppendLine("       </td>");
                        _str.AppendLine("       <td class='tooltip col3' data-content='' data-contentth='รหัสนักศึกษา' data-contenten='Student ID'>");

                        if (_i.Equals(0))
                        {
                            _str.AppendLine("       <div class='ui green button btnstudentcv' data-options='{\"personId\":\"" + _personId + "\",\"scholarshipsYear\":\"" + _scholarshipsYear + "\",\"semester\":\"" + _semester + "\",\"scholarshipsId\":\"" + _scholarshipsId + "\"}'>");
                            _str.AppendFormat("         <span class='lang lang-th f10 font-th regular white'>{0}</span>", _studentCode);
                            _str.AppendFormat("         <span class='lang lang-en f10 font-en regular white'>{0}</span>", _studentCode);
                            _str.AppendLine("       </div>");
                        }
                        else
                        {
                            _str.AppendFormat(" <span class='lang lang-th f10 font-th regular red'>{0}</span>", _studentCode);
                            _str.AppendFormat(" <span class='lang lang-en f10 font-en regular red'>{0}</span>", _studentCode);
                        }

                        _str.AppendLine("       </td>");
                        _str.AppendLine("       <td class='tooltip col4 left aligned' data-content='' data-contentth='ชื่อ - สกุล' data-contenten='Full Name'>");
                        _str.AppendFormat("         <span class='lang lang-th f10 font-th regular {0}'>{1}</span>", _fontColor, _fullNameTH);
                        _str.AppendFormat("         <span class='lang lang-en f10 font-en regular {0}'>{1}</span>", _fontColor, _fullNameEN);
                        _str.AppendLine("       </td>");
                        _str.AppendLine("       <td class='tooltip col5 left aligned' data-content='' data-contentth='ทุน' data-contenten='Scholarship'>");
                        _str.AppendFormat("         <span class='lang lang-th f10 font-th regular {0} black'>{1}</span><span class='lang lang-th f10 font-th regular {2}'>{3}</span>", _fontColor, _scholarshipsNameTH, (_i.Equals(0) ? "muted" : "red"), (!String.IsNullOrEmpty(_responsibleAgency) ? (" - " + _responsibleAgency) : ""));
                        _str.AppendFormat("         <span class='lang lang-en f10 font-en regular {0} black'>{1}</span><span class='lang lang-en f10 font-en regular {2}'>{3}</span>", _fontColor, _scholarshipsNameEN, (_i.Equals(0) ? "muted" : "red"), (!String.IsNullOrEmpty(_responsibleAgency) ? (" - " + _responsibleAgency) : ""));
                        _str.AppendLine("       </td>");
                        _str.AppendLine("       <td class='tooltip col6' data-content='' data-contentth='ปี / ภาคเรียนที่สมัครรับทุน' data-contenten='Scholarship on Year / Semester'>");
                        _str.AppendFormat("         <span class='lang lang-th f10 font-th regular {0}'>{1} / {2}</span>", _fontColor, _scholarshipsYear, _semester);
                        _str.AppendFormat("         <span class='lang lang-en f10 font-en regular {0}'>{1} / {2}</span>", _fontColor, _scholarshipsYear, _semester);
                        _str.AppendLine("       </td>");
                        _str.AppendLine("       <td class='tooltip col7 right aligned' data-content='' data-contentth='จำนวนเงิน' data-contenten='Amount'>");                        _str.AppendFormat("         <span class='lang lang-th f10 font-th regular {0}'>{1}</span>", _fontColor, _tuition);
                        _str.AppendFormat("         <span class='lang lang-en f10 font-en regular {0}'>{1}</span>", _fontColor, _tuition);
                        _str.AppendLine("       </td>");
                        _str.AppendLine("       <td class='tooltip col8 hide'>");
                        _str.AppendFormat("         <span>{0}</span>", _remark.Replace("\n", "<br />"));
                        _str.AppendLine("       </td>");
                        _str.AppendLine("   </tr>");

                        if (_i > 0)
                        {
                            _str.AppendLine("<tr>");
                            _str.AppendLine("   <td class='info-list' colspan='7'>");
                            _str.AppendLine("       <ul>");

                            for (_j = 0; _j < _i; _j++)
                            {
                                _str.AppendFormat("     <li class='lang lang-th f10 font-th regular white'>{0}</li>", _msgTH[_j]);
                                _str.AppendFormat("     <li class='lang lang-en f10 font-en regular white'>{0}</li>", _msgEN[_j]);
                            }

                            _str.AppendLine("       </ul>");
                            _str.AppendLine("   </td>");
                            _str.AppendLine("</tr>");
                        }
                        else
                        {
                            _str.AppendFormat(" <tr class='center aligned hide ui {0}' id='{1}-studentcv-{2}{3}{4}{5}'>", SCHUtil.SUBJECT_STUDENTCV.ToLower(), _idContent, _personId, _scholarshipsYear, _semester, _scholarshipsId);
                            _str.AppendFormat("     <td class='preloading' colspan='8' id='{0}-id-{1}{2}{3}{4}'></td>", StudentCVUI._idContent, _personId, _scholarshipsYear, _semester, _scholarshipsId);
                            _str.AppendLine("   </tr>");
                        }
                    }

                    _row++;
                }
            }
            _str.AppendLine("       </tbody>");
            _str.AppendLine("   </table>");
            _str.AppendLine("   <div class='ui horizontal segments table-title'>");
            _str.AppendLine("       <div class='ui segment left floated grey inverted'>");
            _str.AppendFormat("         <div class='mini ui grey inverted button btnoption {0} button-overflow'>", (_recordCount.Equals(0) ? "disabled" : ""));
            _str.AppendLine("               <i class='save icon font-th regular white'></i>");
            _str.AppendLine("               <span class='lang lang-th f10 font-th regular white'>บันทึก</span>");
            _str.AppendFormat("             <div class='lang lang-th f11 font-th regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>ทั้งหมด</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>เฉพาะที่เลือก</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("               <span class='lang lang-en f10 font-en regular white'>Save</span>");
            _str.AppendFormat("             <div class='lang lang-en f11 font-en regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>All</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>Selected</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("           </div>");
            _str.AppendLine("       </div>");
            _str.AppendLine("       <div class='ui segment right floated right aligned grey inverted recordcount'>");
            _str.AppendFormat("         <span class='lang lang-th f10 font-th regular white'>พบ <span class='recordcountprimary-search'>{0}</span></span>", _recordCount);
            _str.AppendFormat("         <span class='lang lang-en f10 font-en regular white'>Found <span class='recordcountprimary-search'>{0}</span></span>", _recordCount);
            _str.AppendLine("       </div>");
            _str.AppendLine("   </div>");
            _str.AppendLine("  </div>");
            return(_str);
        }
コード例 #4
0
        public static StringBuilder GetMain(DataRow[] _dr)
        {
            StringBuilder _str              = new StringBuilder();
            string        _personId         = String.Empty;
            string        _studentCode      = String.Empty;
            string        _fullNameTH       = String.Empty;
            string        _fullNameEN       = String.Empty;
            string        _facultyCode      = String.Empty;
            string        _programNameTH    = String.Empty;
            string        _programNameEN    = String.Empty;
            string        _numberScholar    = String.Empty;
            string        _statusTypeNameTH = String.Empty;
            string        _statusTypeNameEN = String.Empty;
            string        _statusGroup      = String.Empty;
            int           _recordCount      = _dr.GetLength(0);

            _str.AppendLine("<div class='paddingTop10'>");
            _str.AppendLine("   <div class='ui horizontal segments table-title'>");
            _str.AppendLine("       <div class='ui segment left floated grey inverted'>");
            _str.AppendFormat("         <div class='mini ui grey inverted button btnoption {0} button-overflow'>", (_recordCount.Equals(0) ? "disabled" : ""));
            _str.AppendLine("               <i class='pointing up icon font-th regular white'></i>");
            _str.AppendLine("               <span class='lang lang-th f10 font-th regular white'>สมัครรับทุน</span>");
            _str.AppendFormat("             <div class='lang lang-th f11 font-th regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>ทั้งหมด</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>เฉพาะที่เลือก</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("               <span class='lang lang-en f10 font-en regular white'>Register</span>");
            _str.AppendFormat("             <div class='lang lang-en f11 font-en regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>All</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>Selected</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("           </div>");
            _str.AppendLine("       </div>");
            _str.AppendLine("       <div class='ui segment right floated right aligned grey inverted recordcount'>");
            _str.AppendLine("           <span class='lang lang-th f10 font-th regular white'>พบ <span class='recordcountprimary-search'></span></span>");
            _str.AppendLine("           <span class='lang lang-en f10 font-en regular white'>Found <span class='recordcountprimary-search'></span></span>");
            _str.AppendLine("       </div>");
            _str.AppendLine("   </div>");
            _str.AppendLine("   <table class='ui table unstackable'>");
            _str.AppendLine("       <thead>");
            _str.AppendLine("           <tr class='center aligned'>");
            _str.AppendLine("               <th class='col1'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>ที่</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>No.</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col2 checkbox'>");
            _str.AppendLine("                   <input type ='checkbox' class='select-root checkbox ui' tabindex='0' />");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col3'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>รหัสนักศึกษา</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Student ID</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col4'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>ชื่อ - สกุล</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Full Name</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col5'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>คณะ</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Faculty</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col6'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>หลักสูตร</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Program</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col7'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>จำนวนทุน</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Store</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("               <th class='col8'>");
            _str.AppendLine("                   <span class='lang lang-th f9 font-th regular black'>สถานภาพ</span>");
            _str.AppendLine("                   <span class='lang lang-en f9 font-en regular black'>Student Status</span>");
            _str.AppendLine("               </th>");
            _str.AppendLine("           </tr>");
            _str.AppendLine("       </thead>");
            _str.AppendLine("       <tbody>");

            if (_recordCount > 0)
            {
                foreach (DataRow _dr1 in _dr)
                {
                    _personId         = _dr1["id"].ToString();
                    _studentCode      = (!String.IsNullOrEmpty(_dr1["studentCode"].ToString()) ? _dr1["studentCode"].ToString() : "XXXXXXX");
                    _fullNameTH       = SCHUtil.GetFullName(_dr1["titlePrefixInitialsTH"].ToString(), _dr1["titlePrefixFullNameTH"].ToString(), _dr1["firstName"].ToString(), _dr1["middleName"].ToString(), _dr1["lastName"].ToString());
                    _fullNameEN       = SCHUtil.GetFullName(_dr1["titlePrefixInitialsEN"].ToString(), _dr1["titlePrefixFullNameEN"].ToString(), _dr1["firstNameEN"].ToString(), _dr1["middleNameEN"].ToString(), _dr1["lastNameEN"].ToString()).ToUpper();
                    _facultyCode      = _dr1["facultyCode"].ToString();
                    _programNameTH    = _dr1["programNameTH"].ToString();
                    _programNameEN    = _dr1["programNameEN"].ToString();
                    _numberScholar    = int.Parse(_dr1["numberScholar"].ToString()).ToString("#,##0");
                    _statusTypeNameTH = _dr1["statusTypeNameTH"].ToString();
                    _statusTypeNameEN = _dr1["statusTypeNameEN"].ToString();
                    _statusGroup      = _dr1["statusGroup"].ToString();

                    _str.AppendFormat(" <tr class='center aligned' id='{0}-id-{1}'>", _idContent, _personId);
                    _str.AppendLine("       <td class='tooltip col1' data-content='' data-contentth='ที่' data-contenten='No.'>");
                    _str.AppendFormat("         <span class='lang lang-th f10 font-th regular black'>{0}</span>", int.Parse(_dr1["rowNum"].ToString()).ToString("#,##0"));
                    _str.AppendFormat("         <span class='lang lang-en f10 font-en regular black'>{0}</span>", int.Parse(_dr1["rowNum"].ToString()).ToString("#,##0"));
                    _str.AppendLine("       </td>");
                    _str.AppendLine("       <td class='col2 checkbox'>");

                    if (_statusGroup.Equals("00"))
                    {
                        _str.AppendFormat("     <input type='checkbox' name='select-child' class='select-child checkbox checker studentcode' value='{0}' />", _personId);
                    }

                    _str.AppendLine("       </td>");
                    _str.AppendLine("       <td class='tooltip col3' data-content='' data-contentth='รหัสนักศึกษา' data-contenten='Student ID'>");
                    _str.AppendFormat("         <div class='ui green button btnstudentcv' data-options='{0}'>", _personId);
                    _str.AppendFormat("             <span class='lang lang-th f10 font-th regular white'>{0}</span>", _studentCode);
                    _str.AppendFormat("             <span class='lang lang-en f10 font-en regular white'>{0}</span>", _studentCode);
                    _str.AppendLine("           </div>");
                    _str.AppendLine("       </td>");
                    _str.AppendLine("       <td class='tooltip col4 left aligned' data-content='' data-contentth='ชื่อ - สกุล' data-contenten='Full Name'>");
                    _str.AppendFormat("         <span class='lang lang-th f10 font-th regular black'>{0}</span>", _fullNameTH);
                    _str.AppendFormat("         <span class='lang lang-en f10 font-en regular black'>{0}</span>", _fullNameEN);
                    _str.AppendLine("       </td>");
                    _str.AppendLine("       <td class='tooltip col5' data-content='' data-contentth='คณะ' data-contenten='Faculty'>");
                    _str.AppendFormat("         <span class='lang lang-th f10 font-th regular black'>{0}</span>", _facultyCode);
                    _str.AppendFormat("         <span class='lang lang-en f10 font-en regular black'>{0}</span>", _facultyCode);
                    _str.AppendLine("       </td>");
                    _str.AppendLine("       <td class='tooltip col6 left aligned' data-content='' data-contentth='หลักสูตร' data-contenten='Program'>");
                    _str.AppendFormat("         <span class='lang lang-th f10 font-th regular black'>{0}</span>", _programNameTH);
                    _str.AppendFormat("         <span class='lang lang-en f10 font-en regular black'>{0}</span>", _programNameEN);
                    _str.AppendLine("       </td>");
                    _str.AppendLine("       <td class='tooltip col7' data-content='' data-contentth='จำนวนทุน' data-contenten='Store'>");
                    _str.AppendFormat("         <span class='lang lang-th f10 font-th regular black'>{0}</span>", _numberScholar);
                    _str.AppendFormat("         <span class='lang lang-en f10 font-en regular black'>{0}</span>", _numberScholar);
                    _str.AppendLine("       </td>");
                    _str.AppendLine("       <td class='tooltip col8' data-content='' data-contentth='สถานภาพ' data-contenten='Student Status'>");
                    _str.AppendFormat("         <span class='lang lang-th f10 font-th regular black'>{0}</span>", _statusTypeNameTH);
                    _str.AppendFormat("         <span class='lang lang-en f10 font-en regular black'>{0}</span>", _statusTypeNameEN);
                    _str.AppendLine("       </td>");
                    _str.AppendLine("   </tr>");
                    _str.AppendFormat(" <tr class='center aligned hide ui {0}' id='{1}-studentcv-{2}'>", SCHUtil.SUBJECT_STUDENTCV.ToLower(), _idContent, _personId);
                    _str.AppendFormat("     <td class='preloading' colspan='8' id='{0}-id-{1}'></td>", StudentCVUI._idContent, _personId);
                    _str.AppendLine("   </tr>");
                }
            }

            _str.AppendLine("       </tbody>");
            _str.AppendLine("   </table>");
            _str.AppendLine("   <div class='ui horizontal segments table-title'>");
            _str.AppendLine("       <div class='ui segment left floated grey inverted'>");
            _str.AppendFormat("         <div class='mini ui grey inverted button btnoption {0} button-overflow'>", (_recordCount.Equals(0) ? "disabled" : ""));
            _str.AppendLine("               <i class='pointing up icon font-th regular white'></i>");
            _str.AppendLine("               <span class='lang lang-th f10 font-th regular white'>สมัครรับทุน</span>");
            _str.AppendFormat("             <div class='lang lang-th f11 font-th regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>ทั้งหมด</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>เฉพาะที่เลือก</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("               <span class='lang lang-en f10 font-en regular white'>Register</span>");
            _str.AppendFormat("             <div class='lang lang-en f11 font-en regular white'><a class='btnregister-option' href='javascript:void(0)' alt='{0}'>All</a> | <a class='btnregister-option' href='javascript:void(0)' alt='{1}'>Selected</a></div>", SCHUtil._selectOption[0].ToLower(), SCHUtil._selectOption[1].ToLower());
            _str.AppendLine("           </div>");
            _str.AppendLine("       </div>");
            _str.AppendLine("       <div class='ui segment right floated right aligned grey inverted recordcount'>");
            _str.AppendLine("           <span class='lang lang-th f10 font-th regular white'>พบ <span class='recordcountprimary-search'></span></span>");
            _str.AppendLine("           <span class='lang lang-en f10 font-en regular white'>Found <span class='recordcountprimary-search'></span></span>");
            _str.AppendLine("       </div>");
            _str.AppendLine("   </div>");
            _str.AppendLine("   <div class='table-navpage'></div>");
            _str.AppendLine("</div>");

            return(_str);
        }