Ejemplo n.º 1
0
                public static StringBuilder GetMain(Dictionary <string, object> _infoLogin, string _id)
                {
                    Dictionary <string, object> _infoData       = new Dictionary <string, object>();
                    Dictionary <string, object> _infoDataResult = UDSStaffUtil.GetInfoData(UDSStaffUtil.PAGE_SETTINGACCESSTOTHESYSTEM_EDIT, _infoData);
                    StringBuilder _html = new StringBuilder();

                    _idSectionAddUpdate = _idSectionEdit;

                    _html.AppendLine(UDSStaffUI.GetInfoBar(_infoDataResult, true).ToString());
                    _html.AppendLine(SectionAddUpdateUI.GetValueDataRecorded(UDSStaffUtil.SetValueDataRecorded(UDSStaffUtil.PAGE_SETTINGACCESSTOTHESYSTEM_EDIT, _id)).ToString());
                    _html.AppendLine(SectionAddUpdateUI.GetMain(_infoLogin).ToString());

                    return(_html);
                }
Ejemplo n.º 2
0
            public static StringBuilder GetMain(Dictionary <string, object> _infoLogin)
            {
                StringBuilder _html        = new StringBuilder();
                StringBuilder _contentTemp = new StringBuilder();
                Dictionary <string, Dictionary <string, object> > _contentFrmColumn = new Dictionary <string, Dictionary <string, object> >();

                Dictionary <string, object>[] _contentFrmColumnDetail = new Dictionary <string, object> [7];
                Dictionary <string, object>   _paramSearch            = new Dictionary <string, object>();
                DataSet _ds1         = new DataSet();
                DataSet _ds2         = new DataSet();
                string  _username    = _infoLogin["Username"].ToString();
                string  _systemGroup = _infoLogin["SystemGroup"].ToString();
                string  _faculty     = _infoLogin["Faculty"].ToString();
                string  _program     = _infoLogin["Program"].ToString();
                int     _i           = 0;

                _contentTemp.Clear();
                _contentTemp.AppendLine("<div class='startenddatetime'>");
                _contentTemp.AppendFormat(" <div class='contentbody-left'><input class='inputcalendar' type='text' id='{0}-startdate' readonly value='' /></div>", _idSectionAddUpdate);
                _contentTemp.AppendLine("   <div class='contentbody-left'>");
                _contentTemp.AppendFormat("     <span><div id='{0}-starthour-combobox'>{1}</div></span>", _idSectionAddUpdate, UDSStaffUI.GetComboboxHour(_idSectionAddUpdate + "-starthour"));
                _contentTemp.AppendLine("       <span class='th-label'>:</span>");
                _contentTemp.AppendFormat("     <span><div id='{0}-startminute-combobox'>{1}</div></span>", _idSectionAddUpdate, UDSStaffUI.GetComboboxMinute(_idSectionAddUpdate + "-startminute"));
                _contentTemp.AppendLine("       <span class='th-label'>:</span>");
                _contentTemp.AppendFormat("     <span><div id='{0}-startsecond-combobox'>{1}</div></span>", _idSectionAddUpdate, UDSStaffUI.GetComboboxSecond(_idSectionAddUpdate + "-startsecond"));
                _contentTemp.AppendLine("   </div>");
                _contentTemp.AppendLine("</div>");
                _contentTemp.AppendLine("<div class='clear'></div>");

                _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
                _contentFrmColumnDetail[_i].Add("ID", (_idSectionAddUpdate + "-startdatetime"));
                _contentFrmColumnDetail[_i].Add("HighLight", false);
                _contentFrmColumnDetail[_i].Add("TitleTH", "เริ่มต้นวันเวลาทำการ");
                _contentFrmColumnDetail[_i].Add("TitleEN", "Set Office Hour Start DateTime");
                _contentFrmColumnDetail[_i].Add("DiscriptionTH", "dd/mm/yyyy hh:mm:ss");
                _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
                _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
                _contentFrmColumnDetail[_i].Add("Require", true);
                _contentFrmColumnDetail[_i].Add("LastRow", true);
                _contentFrmColumn.Add("StartDate", _contentFrmColumnDetail[_i]);
                _i++;

                _contentTemp.Clear();
                _contentTemp.AppendLine("<div class='startenddatetime'>");
                _contentTemp.AppendFormat(" <div class='contentbody-left'><input class='inputcalendar' type='text' id='{0}-enddate' readonly value='' /></div>", _idSectionAddUpdate);
                _contentTemp.AppendLine("   <div class='contentbody-left'>");
                _contentTemp.AppendFormat("     <span><div id='{0}-endhour-combobox'>{1}</div></span>", _idSectionAddUpdate, UDSStaffUI.GetComboboxHour(_idSectionAddUpdate + "-endhour"));
                _contentTemp.AppendLine("       <span class='th-label'>:</span>");
                _contentTemp.AppendFormat("     <span><div id='{0}-endminute-combobox'>{1}</div></span>", _idSectionAddUpdate, UDSStaffUI.GetComboboxMinute(_idSectionAddUpdate + "-endminute"));
                _contentTemp.AppendLine("       <span class='th-label'>:</span>");
                _contentTemp.AppendFormat("     <span><div id='{0}-endsecond-combobox'>{1}</div></span>", _idSectionAddUpdate, UDSStaffUI.GetComboboxSecond(_idSectionAddUpdate + "-endsecond"));
                _contentTemp.AppendLine("   </div>");
                _contentTemp.AppendLine("</div>");
                _contentTemp.AppendLine("<div class='clear'></div>");

                _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
                _contentFrmColumnDetail[_i].Add("ID", (_idSectionAddUpdate + "-enddatetime"));
                _contentFrmColumnDetail[_i].Add("HighLight", false);
                _contentFrmColumnDetail[_i].Add("TitleTH", "สิ้นสุดวันเวลาทำการ");
                _contentFrmColumnDetail[_i].Add("TitleEN", "Set Office Hour End DateTime");
                _contentFrmColumnDetail[_i].Add("DiscriptionTH", "dd/mm/yyyy hh:mm:ss");
                _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
                _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
                _contentFrmColumnDetail[_i].Add("Require", true);
                _contentFrmColumnDetail[_i].Add("LastRow", true);
                _contentFrmColumn.Add("EndDate", _contentFrmColumnDetail[_i]);
                _i++;

                _contentTemp.Clear();
                _contentTemp.AppendLine("<div class='form-subcontent first-child'>");
                _contentTemp.AppendLine("   <div class='form-labelcol'>");
                _contentTemp.AppendLine("       <div class='list'>");
                _contentTemp.AppendLine("           <div class='list-layout'>");
                _contentTemp.AppendLine("               <div class='list-content'>");

                _ds1 = Util.DBUtil.GetListYearEntry();

                foreach (DataRow _dr in _ds1.Tables[0].Rows)
                {
                    _contentTemp.AppendLine("               <div class='list-row'>");
                    _contentTemp.AppendLine("                   <div class='list-col'>");
                    _contentTemp.AppendLine("                       <div class='checkbox-content'>");
                    _contentTemp.AppendLine("                           <ul>");
                    _contentTemp.AppendFormat("                             <li class='checkbox-inputcol'><input class='checkbox' type='checkbox' name='{0}-yearattended' value='{1}' /></li>", _idSectionAddUpdate, _dr["yearEntry"].ToString());
                    _contentTemp.AppendFormat("                             <li class='checkbox-labelcol'><div class='th-label'>{0}</div></li>", _dr["yearEntry"].ToString());
                    _contentTemp.AppendLine("                           </ul>");
                    _contentTemp.AppendLine("                       </div>");
                    _contentTemp.AppendLine("                       <div class='clear'></div>");
                    _contentTemp.AppendLine("                   </div>");
                    _contentTemp.AppendLine("               </div>");
                }

                _ds1.Dispose();

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

                _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
                _contentFrmColumnDetail[_i].Add("ID", (_idSectionAddUpdate + "-yearattended"));
                _contentFrmColumnDetail[_i].Add("HighLight", false);
                _contentFrmColumnDetail[_i].Add("TitleTH", "เฉพาะนักศึกษาปี");
                _contentFrmColumnDetail[_i].Add("TitleEN", "Year Attended");
                _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
                _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
                _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
                _contentFrmColumnDetail[_i].Add("Require", false);
                _contentFrmColumnDetail[_i].Add("LastRow", true);
                _contentFrmColumn.Add("YearAttended", _contentFrmColumnDetail[_i]);
                _i++;

                _contentTemp.Clear();
                _contentTemp.AppendLine("<div class='form-subcontent first-child'>");
                _contentTemp.AppendLine("   <div class='form-labelcol'>");
                _contentTemp.AppendLine("       <div class='list'>");
                _contentTemp.AppendLine("           <div class='list-layout'>");
                _contentTemp.AppendLine("               <div class='list-content'>");

                _paramSearch.Clear();
                _paramSearch.Add("CancelledStatus", "N");

                _ds1 = Util.DBUtil.GetListEntranceType(_paramSearch);

                foreach (DataRow _dr in _ds1.Tables[0].Rows)
                {
                    _contentTemp.AppendLine("             <div class='list-row'>");
                    _contentTemp.AppendLine("                   <div class='list-col'>");
                    _contentTemp.AppendLine("                       <div class='checkbox-content'>");
                    _contentTemp.AppendLine("                           <ul>");
                    _contentTemp.AppendFormat("                             <li class='checkbox-inputcol'><input class='checkbox' type='checkbox' name='{0}-entrancetype' value='{1}' /></li>", _idSectionAddUpdate, _dr["id"].ToString());
                    _contentTemp.AppendFormat("                             <li class='checkbox-labelcol'><div class='th-label'>{0}</div><div class='en-label'>{1}</div></li>", _dr["entranceTypeNameTH"].ToString(), _dr["entranceTypeNameEN"].ToString());
                    _contentTemp.AppendLine("                           </ul>");
                    _contentTemp.AppendLine("                       </div>");
                    _contentTemp.AppendLine("                       <div class='clear'></div>");
                    _contentTemp.AppendLine("                   </div>");
                    _contentTemp.AppendLine("               </div>");
                }

                _ds1.Dispose();

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

                _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
                _contentFrmColumnDetail[_i].Add("ID", (_idSectionAddUpdate + "-entrancetype"));
                _contentFrmColumnDetail[_i].Add("HighLight", false);
                _contentFrmColumnDetail[_i].Add("TitleTH", "เฉพาะระบบการสอบเข้า");
                _contentFrmColumnDetail[_i].Add("TitleEN", "Entrance Examination System");
                _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
                _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
                _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
                _contentFrmColumnDetail[_i].Add("Require", false);
                _contentFrmColumnDetail[_i].Add("LastRow", true);
                _contentFrmColumn.Add("EntranceType", _contentFrmColumnDetail[_i]);
                _i++;

                _contentTemp.Clear();
                _contentTemp.AppendLine("<div class='form-subcontent first-child'>");
                _contentTemp.AppendLine("   <div class='form-labelcol'>");
                _contentTemp.AppendLine("       <div class='list'>");
                _contentTemp.AppendLine("           <div class='list-layout'>");
                _contentTemp.AppendLine("               <div class='list-content'>");

                _paramSearch.Clear();
                _paramSearch.Add("Faculty", _faculty);

                _ds1 = Util.DBUtil.GetListFaculty(_username, _systemGroup, _paramSearch);

                foreach (DataRow _dr1 in _ds1.Tables[0].Rows)
                {
                    _contentTemp.AppendLine("               <div class='list-row'>");
                    _contentTemp.AppendLine("                   <div class='list-col'>");
                    _contentTemp.AppendLine("                       <div class='checkbox-content'>");
                    _contentTemp.AppendLine("                           <ul>");
                    _contentTemp.AppendFormat("                             <li class='checkbox-inputcol'><input class='checkbox' type='checkbox' name='{0}-faculty' id='{0}-faculty{1}' value='{1}' /></li>", _idSectionAddUpdate, _dr1["facultyId"].ToString());
                    _contentTemp.AppendFormat("                             <li class='checkbox-labelcol'><div class='th-label'>{0}</div><div class='en-label'>{1}</div></li>", (_dr1["facultyCode"].ToString() + " : " + _dr1["facultyNameTH"].ToString()), (!String.IsNullOrEmpty(_dr1["facultyNameEN"].ToString()) ? Util.UppercaseFirst(_dr1["facultyNameEN"].ToString()) : String.Empty));
                    _contentTemp.AppendLine("                           </ul>");
                    _contentTemp.AppendLine("                       </div>");
                    _contentTemp.AppendLine("                       <div class='clear'></div>");
                    _contentTemp.AppendLine("                   </div>");
                    _contentTemp.AppendLine("               </div>");

                    _paramSearch.Clear();
                    _paramSearch.Add("DegreeLevel", String.Empty);
                    _paramSearch.Add("Faculty", _dr1["facultyId"].ToString());
                    _paramSearch.Add("Program", _program);

                    _ds2 = Util.DBUtil.GetListProgram(_username, _systemGroup, _paramSearch);

                    foreach (DataRow _dr2 in _ds2.Tables[0].Rows)
                    {
                        _contentTemp.AppendFormat("         <div class='list-row program-list-row faculty-{0}'>", _dr1["facultyId"].ToString());
                        _contentTemp.AppendLine("               <div class='list-col'>");
                        _contentTemp.AppendLine("                   <div class='checkbox-content'>");
                        _contentTemp.AppendLine("                       <ul>");
                        _contentTemp.AppendFormat("                         <li class='checkbox-inputcol'><input class='checkbox' type='checkbox' name='{0}-program' value='{1}' /></li>", _idSectionAddUpdate, _dr2["programId"].ToString());
                        _contentTemp.AppendFormat("                         <li class='checkbox-labelcol'><div class='th-label'>{0}</div><div class='en-label'>{1}</div></li>", (_dr2["programCode"].ToString() + " " + _dr2["majorCode"].ToString() + " " + _dr2["groupNum"].ToString() + " : " + _dr2["programNameTH"].ToString()), (!String.IsNullOrEmpty(_dr2["programNameEN"].ToString()) ? Util.UppercaseFirst(_dr2["programNameEN"].ToString()) : String.Empty));
                        _contentTemp.AppendLine("                       </ul>");
                        _contentTemp.AppendLine("                   </div>");
                        _contentTemp.AppendLine("                   <div class='clear'></div>");
                        _contentTemp.AppendLine("               </div>");
                        _contentTemp.AppendLine("           </div>");
                    }

                    _ds2.Dispose();
                }

                _ds1.Dispose();

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

                _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
                _contentFrmColumnDetail[_i].Add("ID", (_idSectionAddUpdate + "-facultyprogram"));
                _contentFrmColumnDetail[_i].Add("HighLight", false);
                _contentFrmColumnDetail[_i].Add("TitleTH", "เฉพาะนักศึกษาคณะ / หลักสูตร");
                _contentFrmColumnDetail[_i].Add("TitleEN", "Faculty / Program");
                _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
                _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
                _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
                _contentFrmColumnDetail[_i].Add("Require", false);
                _contentFrmColumnDetail[_i].Add("LastRow", true);
                _contentFrmColumn.Add("FacultyProgram", _contentFrmColumnDetail[_i]);
                _i++;

                _contentTemp.Clear();
                _contentTemp.AppendLine("<div class='nomargin checkbox-content'>");
                _contentTemp.AppendLine("   <ul>");
                _contentTemp.AppendFormat("     <li class='checkbox-inputcol'><input class='checkbox' type='checkbox' name='{0}-cancelledstatus' value='Y' /></li>", _idSectionAddUpdate);
                _contentTemp.AppendLine("       <li class='checkbox-labelcol'></li>");
                _contentTemp.AppendLine("   </ul>");
                _contentTemp.AppendLine("</div>");
                _contentTemp.AppendLine("<div class='clear'></div>");

                _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
                _contentFrmColumnDetail[_i].Add("ID", (_idSectionAddUpdate + "-cancelledstatus"));
                _contentFrmColumnDetail[_i].Add("HighLight", false);
                _contentFrmColumnDetail[_i].Add("TitleTH", "ยกเลิก");
                _contentFrmColumnDetail[_i].Add("TitleEN", "Cancel");
                _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
                _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
                _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
                _contentFrmColumnDetail[_i].Add("Require", false);
                _contentFrmColumnDetail[_i].Add("LastRow", false);
                _contentFrmColumn.Add("CancelledStatus", _contentFrmColumnDetail[_i]);
                _i++;

                _contentTemp.Clear();
                _contentTemp.AppendLine("<div class='button'>");
                _contentTemp.AppendLine("   <div class='button-layout'>");
                _contentTemp.AppendLine("       <div class='button-content'>");
                _contentTemp.AppendLine("           <ul class='button-style1'>");
                _contentTemp.AppendLine("               <li class='nomargin'><div class='click-button en-label button-save'>SAVE</div></li>");
                _contentTemp.AppendLine("               <li><div class='click-button en-label button-undo'>CLEAR</div></li>");
                _contentTemp.AppendLine("           </ul>");
                _contentTemp.AppendLine("       </div>");
                _contentTemp.AppendLine("   </div>");
                _contentTemp.AppendLine("</div>");

                _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
                _contentFrmColumnDetail[_i].Add("ID", (_idSectionAddUpdate + "-save"));
                _contentFrmColumnDetail[_i].Add("HighLight", false);
                _contentFrmColumnDetail[_i].Add("TitleTH", String.Empty);
                _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
                _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
                _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
                _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
                _contentFrmColumnDetail[_i].Add("Require", false);
                _contentFrmColumnDetail[_i].Add("LastRow", true);
                _contentFrmColumn.Add("Save", _contentFrmColumnDetail[_i]);

                _html.AppendLine("<div class='after-sticky'>");
                _html.AppendFormat("<div class='form addupdate' id='{0}-form'>", _idSectionAddUpdate);
                _html.AppendLine("      <div class='form-layout'>");
                _html.AppendLine("          <div class='form-content'>");
                _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["StartDate"]).ToString());
                _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["EndDate"]).ToString());
                _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["YearAttended"]).ToString());
                _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["EntranceType"]).ToString());
                _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["FacultyProgram"]).ToString());
                _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["CancelledStatus"]).ToString());
                _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["Save"]).ToString());
                _html.AppendLine("          </div>");
                _html.AppendLine("      </div>");
                _html.AppendLine("  </div>");
                _html.AppendLine("</div>");

                return(_html);
            }
Ejemplo n.º 3
0
        public static StringBuilder GetMain()
        {
            Dictionary <string, object> _infoData       = new Dictionary <string, object>();
            Dictionary <string, object> _infoDataResult = UDSStaffUtil.GetInfoData(UDSStaffUtil.PAGE_APPROVEDOCUMENT_MAIN, _infoData);
            Dictionary <string, object> _searchResult   = new Dictionary <string, object>();
            StringBuilder _html        = new StringBuilder();
            int           _cookieError = Util.ChkCookie(UDSStaffUtil._myParamSearchCookieName);
            int           _i           = 0;
            bool          _show        = false;

            if (_cookieError.Equals(0))
            {
                HttpCookie _objCookie = Util.GetCookie(UDSStaffUtil._myParamSearchCookieName);

                if (_objCookie["Command"].Equals(UDSStaffUtil.PAGE_APPROVEDOCUMENT_MAIN))
                {
                    _show         = true;
                    _searchResult = UDSStaffApproveDocumentUtil.GetSearch(UDSStaffUtil.SetParameterSearch(UDSStaffUtil.PAGE_APPROVEDOCUMENT_MAIN, null, true));
                }
            }

            _html.AppendLine(UDSStaffUI.GetInfoBar(_infoDataResult, true).ToString());
            _html.AppendLine("<div class='after-sticky main'>");
            _html.AppendFormat("    <div class='table' id='{0}-table'>", _idSectionMain);
            _html.AppendLine("          <div class='table-layout'>");
            _html.AppendLine("              <div class='table-content'>");
            _html.AppendLine("                  <div class='table-freeze sticky'>");
            _html.AppendLine("                      <div class='table-title'>");
            _html.AppendFormat("                        <div class='contentbody-left table-option table-rowperpage en-label'>{0}</div>", UDSStaffUI.GetComboboxRowPerPage(_idSectionMain + "-rowperpage"));
            _html.AppendLine("                          <div class='contentbody-right table-recordcount en-label'>");
            _html.AppendFormat("                            <span class='recordcount-search hidden'>{0}</span>", (_show.Equals(true) ? double.Parse(_searchResult["RecordCount"].ToString()).ToString("#,##0") : String.Empty));
            _html.AppendFormat("                            <span class='recordcountprimary-search th-label'>{0}</span>", (_show.Equals(true) ? double.Parse(_searchResult["RecordCountPrimary"].ToString()).ToString("#,##0") : String.Empty));
            _html.AppendLine("                          </div>");
            _html.AppendLine("                      </div>");
            _html.AppendLine("                      <div class='clear'></div>");
            _html.AppendLine("                      <div class='table-head'>");
            _html.AppendLine("                          <div class='table-row'>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col1'><div class='table-col-msg'><div class='en-label'>No.</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col2'><div class='table-col-msg'><div class='en-label'>Student</div><div class='en-label'>ID</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-dynamic table-col3'><div class='table-col-msg'><div class='en-label'>Full Name</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col4'><div class='table-col-msg'><div class='en-label'>Program</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col5'><div class='table-col-msg'><div class='en-label'>Year</div><div class='en-label'>Attended</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col6'><div class='table-col-msg'><div class='en-label'>Admission</div><div class='en-label'>Type</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col7'><div class='table-col-msg'><div class='en-label'>Student</div><div class='en-label'>Status</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col8'><div class='table-col-msg'><div class='en-label'>Submitted Date</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col9'><div class='table-col-msg'><div class='en-label'>Approval</div><div class='en-label'>Status</div></div></div>");
            _html.AppendLine("                              <div class='table-col table-col-width-fixed table-col10'><div class='table-col-msg'><div class='en-label'>Approval Date</div></div></div>");
            _html.AppendLine("                          </div>");
            _html.AppendLine("                      </div>");
            _html.AppendLine("                  </div>");
            _html.AppendFormat("                <div class='table-list'>{0}</div>", (_show.Equals(true) ? _searchResult["List"] : String.Empty));
            _html.AppendFormat("                <div class='table-navpage'>{0}</div>", (_show.Equals(true) ? _searchResult["NavPage"] : String.Empty));
            _html.AppendLine("              </div>");
            _html.AppendLine("          </div>");
            _html.AppendLine("      </div>");
            _html.AppendFormat("    <div class='form mainform' id='{0}-form'>", _idSectionMain);
            _html.AppendLine("          <div class='form-layout mainform-layout'>");
            _html.AppendLine("              <div class='form-content mainform-content'>");
            _html.AppendLine("                  <div class='titlebar'>");
            _html.AppendLine("                      <div class='th-label'></div>");
            _html.AppendLine("                      <div class='en-label'></div>");
            _html.AppendLine("                  </div>");
            _html.AppendLine("                  <div class='menulist'>");
            _html.AppendLine("                      <div class='menulist-layout'>");
            _html.AppendLine("                          <div class='menulist-content'>");
            _html.AppendLine("                              <ul>");

            for (_i = 0; _i < UDSStaffApproveDocumentUtil._menu.GetLength(0); _i++)
            {
                _html.AppendFormat("                            <li class='have-link'><a class='link-click link-msg' id='link-{0}' alt='{1}' href='javascript:void(0)'><div class='menu-itemtext'><div class='th-label'>{2}</div><div class='en-label'>{3}</div></div></a></li>", UDSStaffApproveDocumentUtil._menu[_i, 2].ToLower(), UDSStaffApproveDocumentUtil._menu[_i, 2], UDSStaffApproveDocumentUtil._menu[_i, 0], UDSStaffApproveDocumentUtil._menu[_i, 1]);
            }

            _html.AppendLine("                              </ul>");
            _html.AppendLine("                          </div>");
            _html.AppendLine("                          <div class='button-toggle'><a class='en-label' href='javascript:void(0)'>Click to Select Document</a></div>");
            _html.AppendLine("                      </div>");
            _html.AppendLine("                  </div>");
            _html.AppendFormat("                <input type='hidden' id='{0}-personid-hidden' value='' />", _idSectionEdit);
            _html.AppendFormat("                <div id='{0}-form' align='center'></div>", _idSectionEdit);
            _html.AppendLine("              </div>");
            _html.AppendLine("          </div>");
            _html.AppendLine("      </div>");
            _html.AppendLine("</div>");

            return(_html);
        }
Ejemplo n.º 4
0
        public static StringBuilder GetMain()
        {
            StringBuilder _html        = new StringBuilder();
            StringBuilder _contentTemp = new StringBuilder();
            Dictionary <string, Dictionary <string, object> > _contentFrmColumn = new Dictionary <string, Dictionary <string, object> >();

            Dictionary <string, object>[] _contentFrmColumnDetail = new Dictionary <string, object> [10];
            int _i = 0;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-keyword"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>รหัส / ชื่อเต็ม</span><span class='en-label'> : Student ID / Full Name</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", "<input class='inputbox' type='text' id='" + _idSectionSearch + "-keyword' value='' />");
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("Keyword", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-degreelevel"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>วุฒิการศึกษา</span><span class='en-label'> : Degree Level</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", ("<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-degreelevel-combobox'>" + UDSStaffUI.GetComboboxDegreeLevel(_idSectionSearch + "-degreelevel") + "</div>"));
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("DegreeLevel", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-faculty"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>คณะ</span><span class='en-label'> : Faculty</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", ("<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-faculty-combobox'>" + UDSStaffUI.GetComboboxFaculty(_idSectionSearch + "-faculty") + "</div>"));
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("Faculty", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-program"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>หลักสูตร</span><span class='en-label'> : Program</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", "<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-program-combobox'></div>");
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("Program", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-yearattended"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>ปีที่เข้าศึกษา</span><span class='en-label'> : Year Attended</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", ("<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-yearattended-combobox'>" + UDSStaffUI.GetComboboxYearAttended(_idSectionSearch + "-yearattended") + "</div>"));
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("YearAttended", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-entrancetype"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>ระบบการสอบเข้า</span><span class='en-label'> : Admission Type</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", ("<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-entrancetype-combobox'>" + UDSStaffUI.GetComboboxEntranceType(_idSectionSearch + "-entrancetype") + "</div>"));
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("EntranceType", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-studentstatus"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>สถานภาพการเป็นนักศึกษา</span><span class='en-label'> : Student Status</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", ("<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-studentstatus-combobox'>" + UDSStaffUI.GetComboboxStudentStatus(_idSectionSearch + "-studentstatus") + "</div>"));
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("StudentStatus", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-documentupload"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>เอกสารอัพโหลด</span><span class='en-label'> : Document Upload</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", ("<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-documentupload-combobox'>" + UDSStaffUI.GetComboboxDocumentUpload(_idSectionSearch + "-documentupload") + "</div>"));
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("DocumentUpload", _contentFrmColumnDetail[_i]);
            _i++;

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-approvalstatus"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>สถานะการอนุมัติเอกสาร</span><span class='en-label'> : Approval Status</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", ("<div class='combobox-width-dynamic' id='" + _idSectionSearch + "-approvalstatus-combobox'>" + UDSStaffUI.GetComboboxApprovalStatus(_idSectionSearch + "-approvalstatus") + "</div>"));
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("ApprovalStatus", _contentFrmColumnDetail[_i]);
            _i++;

            _contentTemp.Clear();
            _contentTemp.AppendLine("<div class='search-floatcol search-floatcol1'>");
            _contentTemp.AppendLine("   <div class='contentbody-left'>");
            _contentTemp.AppendFormat("     <div id='{0}-sortorderby-combobox'>{1}</div>", _idSectionSearch, UDSStaffUI.GetComboboxOrder((_idSectionSearch + "-sortorderby"), UDSStaffApproveDocumentUtil._sortOrderBy));
            _contentTemp.AppendLine("   </div>");
            _contentTemp.AppendLine("   <div class='contentbody-left'>");
            _contentTemp.AppendFormat("     <div id='{0}-sortexpression-combobox'>{1}</div>", _idSectionSearch, UDSStaffUI.GetComboboxOrder((_idSectionSearch + "-sortexpression"), UDSStaffUtil._sortExpression));
            _contentTemp.AppendLine("   </div>");
            _contentTemp.AppendLine("</div>");
            _contentTemp.AppendLine("<div class='clear'></div>");

            _contentFrmColumnDetail[_i] = new Dictionary <string, object>();
            _contentFrmColumnDetail[_i].Add("ID", (_idSectionSearch + "-sort"));
            _contentFrmColumnDetail[_i].Add("HighLight", false);
            _contentFrmColumnDetail[_i].Add("TitleTH", "<span class='th-label'>จัดเรียงข้อมูล</span><span class='en-label'> : Sort</span>");
            _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionTH", String.Empty);
            _contentFrmColumnDetail[_i].Add("DiscriptionEN", String.Empty);
            _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false);
            _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString());
            _contentFrmColumnDetail[_i].Add("Require", false);
            _contentFrmColumnDetail[_i].Add("LastRow", true);
            _contentFrmColumn.Add("Sort", _contentFrmColumnDetail[_i]);

            _html.AppendFormat("<div class='form search' id='{0}-form'>", _idSectionSearch);
            _html.AppendLine("      <div class='form-layout search-layout'>");
            _html.AppendLine("          <div class='form-content search-content'>");
            _html.AppendLine(UDSStaffUI.GetValueSearch(UDSStaffUtil.PAGE_APPROVEDOCUMENT_MAIN).ToString());
            _html.AppendLine("              <div class='contentbody-left search-section1'>");
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["Keyword"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["DegreeLevel"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["Faculty"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["Program"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["YearAttended"]).ToString());
            _html.AppendLine("              </div>");
            _html.AppendLine("              <div class='contentbody-left search-section2'>");
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["EntranceType"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["StudentStatus"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["DocumentUpload"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["ApprovalStatus"]).ToString());
            _html.AppendLine(UDSStaffUI.GetFrmColumn(_contentFrmColumn["Sort"]).ToString());
            _html.AppendLine("              </div>");
            _html.AppendLine("              <div class='contentbody-left search-section3'>");
            _html.AppendLine("                  <div class='button'>");
            _html.AppendLine("                      <div class='button-layout'>");
            _html.AppendLine("                          <div class='button-content'>");
            _html.AppendLine("                              <ul class='button-style1'>");
            _html.AppendFormat("                                <li class='nomargin'><div class='click-button en-label button-search' alt='{0}'>SEARCH</div></li>", UDSStaffUtil.PAGE_APPROVEDOCUMENT_MAIN);
            _html.AppendFormat("                                <li class='nomargin'><div class='click-button en-label button-undo' alt='{0}'>CLEAR</div></li>", UDSStaffUtil.PAGE_APPROVEDOCUMENT_MAIN);
            _html.AppendLine("                              </ul>");
            _html.AppendLine("                          </div>");
            _html.AppendLine("                      </div>");
            _html.AppendLine("                  </div>");
            _html.AppendLine("              </div>");
            _html.AppendLine("          </div>");
            _html.AppendLine("          <div class='clear'></div>");
            _html.AppendLine("      </div>");
            _html.AppendLine("  </div>");

            return(_html);
        }