public static StringBuilder GetMain(string _id, Dictionary <string, object> _termService) { 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> [5]; Dictionary <string, object> _valueDataRecorded = HCSUtil.SetValueDataRecorded(HCSUtil.PAGE_DOWNLOADREGISTRATIONFORMSTUDENTRECORDS_MAIN, _id); Dictionary <string, object> _dataRecorded = (Dictionary <string, object>)_valueDataRecorded["DataRecorded" + HCSUtil.SUBJECT_SECTION_DOWNLOADREGISTRATIONFORMSTUDENTRECORDS]; string _fontTHSize = "f9"; string _fontENSize = "f9"; int _i = 0; _contentTemp.Clear(); _contentTemp.AppendFormat("<div class='lang lang-th font-family-th blue regular {0}'>{1}</div>", _fontTHSize, _dataRecorded["StudentCode"]); _contentTemp.AppendFormat("<div class='lang lang-en font-family-en blue regular {0}'>{1}</div>", _fontENSize, _dataRecorded["StudentCode"]); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionMain + "-studentid")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "รหัสนักศึกษา"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "Student ID"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _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("StudentID", _contentFrmColumnDetail[_i]); _i++; _contentTemp.Clear(); _contentTemp.AppendFormat("<div class='lang lang-th font-family-th blue regular {0}'>{1}</div>", _fontTHSize, Util.GetFullName(_dataRecorded["TitleInitialsTH"].ToString(), _dataRecorded["TitleFullNameTH"].ToString(), _dataRecorded["FirstName"].ToString(), _dataRecorded["MiddleName"].ToString(), _dataRecorded["LastName"].ToString())); _contentTemp.AppendFormat("<div class='lang lang-en font-family-en blue regular {0}'>{1}</div>", _fontENSize, Util.GetFullName(_dataRecorded["TitleInitialsEN"].ToString(), _dataRecorded["TitleFullNameEN"].ToString(), _dataRecorded["FirstNameEN"].ToString(), _dataRecorded["MiddleNameEN"].ToString(), _dataRecorded["LastNameEN"].ToString()).ToUpper()); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionMain + "-studentname")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "ชื่อ - นามสกุล"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "Full Name"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _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("FullName", _contentFrmColumnDetail[_i]); _i++; _contentTemp.Clear(); _contentTemp.AppendFormat("<div class='lang lang-th font-family-th blue regular {0}'>{1}</div>", _fontTHSize, _dataRecorded["FacultyNameTH"]); _contentTemp.AppendFormat("<div class='lang lang-en font-family-en blue regular {0}'>{1}</div>", _fontENSize, Util.UppercaseFirst(_dataRecorded["FacultyNameEN"].ToString())); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionMain + "-faculty")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "คณะ"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "Faculty"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _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("Faculty", _contentFrmColumnDetail[_i]); _i++; _contentTemp.Clear(); _contentTemp.AppendFormat("<div class='lang lang-th font-family-th blue regular {0}'>{1}</div>", _fontTHSize, _dataRecorded["ProgramNameTH"]); _contentTemp.AppendFormat("<div class='lang lang-en font-family-en blue regular {0}'>{1}</div>", _fontENSize, Util.UppercaseFirst(_dataRecorded["ProgramNameEN"].ToString())); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionMain + "-program")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "หลักสูตร"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "Program"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _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("Program", _contentFrmColumnDetail[_i]); _i++; /* * _contentTemp.Clear(); * _contentTemp.AppendFormat("<div class='lang lang-th font-family-th blue regular {0}'>{1}</div>", _fontTHSize, _dataRecorded["HospitalNameTH"]); * _contentTemp.AppendFormat("<div class='lang lang-en font-family-en blue regular {0}'>{1}</div>", _fontENSize, Util.UppercaseFirst(_dataRecorded["HospitalNameEN"].ToString())); * * _contentFrmColumnDetail[_i] = new Dictionary<string, object>(); * _contentFrmColumnDetail[_i].Add("ID", (_idSectionMain + "-hospital")); * _contentFrmColumnDetail[_i].Add("HighLight", false); * _contentFrmColumnDetail[_i].Add("TitleTH", "หน่วยบริการสุขภาพ"); * _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); * _contentFrmColumnDetail[_i].Add("TitleEN", "Hospital"); * _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); * _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("Hospital", _contentFrmColumnDetail[_i]); */ _contentTemp.Clear(); _contentTemp.AppendFormat("<div class='lang lang-th font-family-th blue regular {0}'>{1}</div>", _fontTHSize, _termService["TermServiceHospitalNameTHHCSConsentRegistration"]); _contentTemp.AppendFormat("<div class='lang lang-en font-family-en blue regular {0}'>{1}</div>", _fontENSize, Util.UppercaseFirst(_termService["TermServiceHospitalNameENHCSConsentRegistration"].ToString())); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionMain + "-hospital")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "หน่วยบริการสุขภาพ"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "Hospital"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _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("Hospital", _contentFrmColumnDetail[_i]); _html.AppendLine(GetValueDataRecorded(_valueDataRecorded).ToString()); _html.AppendFormat("<div class='view' id='{0}-panel'>", _idSectionMain); _html.AppendLine(" <div class='panel'>"); _html.AppendLine(" <div class='panel-heading text-center'>"); _html.AppendLine(" <div class='avatar profilepicture'>"); _html.AppendLine(" <div class='watermark'></div>"); _html.AppendLine(" <img />"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); _html.AppendLine(" <div class='panel-body'>"); _html.AppendLine(" <div class='form'>"); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["StudentID"]).ToString()); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["FullName"]).ToString()); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["Faculty"]).ToString()); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["Program"]).ToString()); if (_termService["TermServiceStatusHCSConsentRegistration"].Equals("Y")) { _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["Hospital"]).ToString()); } _html.AppendLine(" </div>"); /* * _html.AppendLine(" <div class='btn-command text-center'>"); * _html.AppendFormat(" <a class='btn btn-block btn-success' id='{0}-buttondownload'>", _idSectionMain); * _html.AppendFormat(" <div class='lang lang-th font-family-th {0} regular'>ดาวน์โหลดแบบฟอร์มประกันสุขภาพ</div>", _fontTHSize); * _html.AppendFormat(" <div class='lang lang-en font-family-en {0} regular'>Download Registration Form</div>", _fontENSize); * _html.AppendLine(" </a>"); * _html.AppendLine(" </div>"); */ _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); return(_html); }
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> [3]; Dictionary <string, object> _paramSearch = new Dictionary <string, object>(); DataSet _ds = new DataSet(); string _fontTHSize = "f10"; string _fontENSize = "f10"; int _i = 0; _contentTemp.Clear(); _contentTemp.AppendFormat("<div class='lang lang-th font-family-th black light {0}'></div>", _fontTHSize); _contentTemp.AppendFormat("<div class='lang lang-en font-family-en black light {0}'></div>", _fontENSize); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionDialog + "-workedstatus")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "สถานะการทำงานของนักศึกษา"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "Worked Status"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _contentFrmColumnDetail[_i].Add("DiscriptionTH", ""); _contentFrmColumnDetail[_i].Add("DiscriptionEN", ""); _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false); _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString()); _contentFrmColumnDetail[_i].Add("Require", false); _contentFrmColumnDetail[_i].Add("LastRow", false); _contentFrmColumn.Add("WorkedStatus", _contentFrmColumnDetail[_i]); _i++; _paramSearch.Clear(); _paramSearch.Add("WorkedStatus", "Y"); _paramSearch.Add("CancelledStatus", "N"); _ds = HCSDB.GetListWelfare(_paramSearch); _contentTemp.Clear(); foreach (DataRow _dr1 in _ds.Tables[0].Rows) { _contentTemp.AppendLine("<div class='radio-row'>"); _contentTemp.AppendLine(" <ul>"); _contentTemp.AppendLine(" <li class='radio-col input-col'>"); _contentTemp.AppendFormat(" <input class='inputradio' type='radio' name='{0}-welfare' value='{1}' />", _idSectionDialog, _dr1["id"]); _contentTemp.AppendLine(" </li>"); _contentTemp.AppendLine(" <li class='radio-col label-col'>"); _contentTemp.AppendFormat(" <div class='lang lang-th font-family-th black light {0}'>{1}</div>", _fontTHSize, _dr1["nameTH"]); _contentTemp.AppendFormat(" <div class='lang lang-en font-family-en black light {0}'>{1}</div>", _fontENSize, _dr1["nameEN"]); _contentTemp.AppendLine(" </li>"); _contentTemp.AppendLine(" </ul>"); _contentTemp.AppendLine("</div>"); } _ds.Dispose(); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionDialog + "-welfareworkedstatusy")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "สวัสดิการจากที่ทำงาน"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "From Welfare to Work"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _contentFrmColumnDetail[_i].Add("DiscriptionTH", ""); _contentFrmColumnDetail[_i].Add("DiscriptionEN", ""); _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false); _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString()); _contentFrmColumnDetail[_i].Add("Require", false); _contentFrmColumnDetail[_i].Add("LastRow", false); _contentFrmColumn.Add("WelfareWorkedStatusY", _contentFrmColumnDetail[_i]); _i++; _paramSearch.Clear(); _paramSearch.Add("WorkedStatus", "N"); _paramSearch.Add("CancelledStatus", "N"); _ds = HCSDB.GetListWelfare(_paramSearch); _contentTemp.Clear(); foreach (DataRow _dr2 in _ds.Tables[0].Rows) { _contentTemp.AppendLine("<div class='radio-row'>"); _contentTemp.AppendLine(" <ul>"); _contentTemp.AppendLine(" <li class='radio-col input-col'>"); _contentTemp.AppendFormat(" <input class='inputradio' type='radio' name='{0}-welfare' value='{1}' />", _idSectionDialog, _dr2["id"]); _contentTemp.AppendLine(" </li>"); _contentTemp.AppendLine(" <li class='radio-col label-col'>"); _contentTemp.AppendFormat(" <div class='lang lang-th font-family-th black light {0}'>{1}</div>", _fontTHSize, _dr2["nameTH"]); _contentTemp.AppendFormat(" <div class='lang lang-en font-family-en black light {0}'>{1}</div>", _fontENSize, _dr2["nameEN"]); _contentTemp.AppendLine(" </li>"); _contentTemp.AppendLine(" </ul>"); _contentTemp.AppendLine("</div>"); } _ds.Dispose(); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionDialog + "-welfareworkedstatusn")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", "ปัจจุบันเบิกค่ารักษาพยาบาลอย่างไร"); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", _fontTHSize); _contentFrmColumnDetail[_i].Add("TitleEN", "Reimbursement of Medical Expenses"); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", _fontENSize); _contentFrmColumnDetail[_i].Add("DiscriptionTH", ""); _contentFrmColumnDetail[_i].Add("DiscriptionEN", ""); _contentFrmColumnDetail[_i].Add("InputContentPaddingDown", false); _contentFrmColumnDetail[_i].Add("InputContent", _contentTemp.ToString()); _contentFrmColumnDetail[_i].Add("Require", false); _contentFrmColumnDetail[_i].Add("LastRow", false); _contentFrmColumn.Add("WelfareWorkedStatusN", _contentFrmColumnDetail[_i]); _html.AppendFormat("<div class='dialog' id='{0}-panel'>", _idSectionDialog); _html.AppendLine(" <div class='panel panel-transparent'>"); _html.AppendLine(" <div class='panel-body'>"); _html.AppendLine(" <div class='form horizontal'>"); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["WorkedStatus"]).ToString()); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["WelfareWorkedStatusY"]).ToString()); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["WelfareWorkedStatusN"]).ToString()); _html.AppendLine(" </div>"); _html.AppendLine(" <div class='btn-command text-center'>"); _html.AppendFormat(" <a class='btn btn-block btn-info' id='{0}-buttondownload'>", _idSectionDialog); _html.AppendFormat(" <div class='lang lang-th font-family-th {0} regular'>เริ่มดาวน์โหลด</div>", _fontTHSize); _html.AppendFormat(" <div class='lang lang-en font-family-en {0} regular'>Start Download</div>", _fontENSize); _html.AppendLine(" </a>"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); return(_html); }
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> [3]; Dictionary <string, object> _paramSearch = new Dictionary <string, object>(); DataSet _ds = new DataSet(); string _fontTHSize = "f10"; string _fontENSize = "f10"; int _i = 0; _paramSearch.Clear(); _paramSearch.Add("ID", "RA, SI"); _paramSearch.Add("CancelledStatus", "N"); _ds = HCSDB.GetListHospital(_paramSearch); _contentTemp.Clear(); foreach (DataRow _dr1 in _ds.Tables[0].Rows) { _contentTemp.AppendLine("<div class='radio-row'>"); _contentTemp.AppendLine(" <ul>"); _contentTemp.AppendLine(" <li class='radio-col input-col'>"); _contentTemp.AppendFormat(" <input class='inputradio' type='radio' name='{0}-hospital' value='{1}' />", _idSectionDialog, _dr1["id"]); _contentTemp.AppendLine(" </li>"); _contentTemp.AppendLine(" <li class='radio-col label-col'>"); _contentTemp.AppendFormat(" <div class='lang lang-th font-family-th black light {0}'>{1}</div>", _fontTHSize, _dr1["hospitalNameTH"]); _contentTemp.AppendFormat(" <div class='lang lang-en font-family-en black light {0}'>{1}</div>", _fontENSize, _dr1["hospitalNameEN"]); _contentTemp.AppendLine(" </li>"); _contentTemp.AppendLine(" </ul>"); _contentTemp.AppendLine("</div>"); } _ds.Dispose(); _contentFrmColumnDetail[_i] = new Dictionary <string, object>(); _contentFrmColumnDetail[_i].Add("ID", (_idSectionDialog + "-hospital")); _contentFrmColumnDetail[_i].Add("HighLight", false); _contentFrmColumnDetail[_i].Add("TitleTH", String.Empty); _contentFrmColumnDetail[_i].Add("FontSizeTitleTH", String.Empty); _contentFrmColumnDetail[_i].Add("TitleEN", String.Empty); _contentFrmColumnDetail[_i].Add("FontSizeTitleEN", 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", false); _contentFrmColumn.Add("Hospital", _contentFrmColumnDetail[_i]); _html.AppendFormat("<div class='dialog' id='{0}-panel'>", _idSectionDialog); _html.AppendLine(" <div class='panel panel-transparent'>"); _html.AppendLine(" <div class='panel-body'>"); _html.AppendLine(" <div class='form horizontal'>"); _html.AppendLine(HCSUI.GetFrmColumn(_contentFrmColumn["Hospital"]).ToString()); _html.AppendLine(" </div>"); _html.AppendLine(" <div class='btn-command text-center'>"); _html.AppendFormat(" <a class='btn btn-block btn-info' id='{0}-buttonsave'>", _idSectionDialog); _html.AppendFormat(" <div class='lang lang-th font-family-th {0} regular'>บันทึก</div>", _fontTHSize); _html.AppendFormat(" <div class='lang lang-en font-family-en {0} regular'>Save</div>", _fontENSize); _html.AppendLine(" </a>"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); _html.AppendLine(" </div>"); return(_html); }