public static StringBuilder GetSection(Dictionary <string, object> _infoLogin, string _section, string _sectionAction, string _id)
    {
        StringBuilder _html    = new StringBuilder();
        StringBuilder _content = new StringBuilder();

        int _userError = int.Parse(_infoLogin["UserError"].ToString());

        switch (_section)
        {
        case "MAIN":
            Dictionary <string, object> _termServiceHCSConsentRegistrationResult = HCSUtil.GetTermServiceHCSConsentRegistration(_infoLogin["StudentId"].ToString());

            if (!String.IsNullOrEmpty(_termServiceHCSConsentRegistrationResult["TermServiceStatusHCSConsentRegistration"].ToString()))
            {
                _content.AppendFormat(
                    "<center>" +
                    "   <span class='f8'>นักศึกษาเคยแสดงความประสงค์ว่า</span><br />" +
                    "   <span class='f7 bold underline'>\"{0}\"</span><br />" +
                    "   <span class='f9'>ให้มหาวิทยาลัยมหิดลขึ้นทะเบียนสิทธิหลักประกันสุขภาพแห่งชาติ<br />กับโรงพยาบาลสังกัดมหาวิทยาลัยมหิดลไว้แล้ว</span>" +
                    "</center>" +
                    "<p class='br'></p>" +
                    "<div class='red'>" +
                    "   <span class='bold'>หมายเหตุ</span><br />กรณีที่นักศึกษามีข้อสงสัย หรือต้องการเปลี่ยนแปลงความประสงค์สามารถติดต่อสอบถามได้ที่ กองกิจการนักศึกษา โทร. 0 2849 4514 ในวันและเวลาราชการ หรือติดต่อได้ที่ Inbox ของ FB Fanpage : @MahidolHealth" +
                    "</div>", (_termServiceHCSConsentRegistrationResult["TermServiceStatusHCSConsentRegistration"].Equals("Y") ? "ยินยอม" : "ไม่ยินยอม")
                    );

                _html.AppendFormat("<div class='view usererror{0}' id='{1}-panel'>", _userError, HCSUtil.ID_SECTION_TERMSERVICEHCSCONSENTREGISTRATION_INFO.ToLower());
                _html.AppendLine("      <div class='panel panel-info'>");
                _html.AppendLine("          <div class='panel-body'>");
                _html.AppendFormat("            <div class='lang lang-th lang-en font-family-th regular {0}'>{1}</div>", "f10", _content);
                _html.AppendLine("          </div>");
                _html.AppendLine("      </div>");
                _html.AppendLine("  </div>");
            }

            if (_userError.Equals(0))
            {
                _html.AppendFormat("{0}", SectionMainUI.GetMain(_id, _termServiceHCSConsentRegistrationResult));
            }

            break;

        case "DIALOG":
            if (_sectionAction.Equals(HCSUtil.SUBJECT_SECTION_DOWNLOADREGISTRATIONFORMSELECTWELFARE))
            {
                _html = SectionDialogUI.SelectWelfareUI.GetMain();
            }

            break;
        }

        return(_html);
    }
    public static StringBuilder GetSection(Dictionary <string, object> _infoLogin, string _section, string _sectionAction, string _id)
    {
        StringBuilder _html = new StringBuilder();

        switch (_section)
        {
        case "MAIN":
            _html = SectionMainUI.GetMain(_id);
            break;

        case "DIALOG":
            _html = SectionDialogUI.SelectHospitalUI.GetMain();
            break;
        }

        return(_html);
    }
Exemplo n.º 3
0
    public static StringBuilder GetSection(Dictionary <string, object> _infoLogin, string _section, string _sectionAction, string _id)
    {
        StringBuilder _html = new StringBuilder();

        switch (_section)
        {
        case "MAIN":
            _html = SectionMainUI.GetMain();
            break;

        case "SEARCH":
            _html = SectionSearchUI.GetMain();
            break;

        case "EDIT":
            _html = SectionAddUpdateUI.SectionEditUI.GetMain(_sectionAction, _id);
            break;
        }

        return(_html);
    }
    public static StringBuilder GetSection(Dictionary <string, object> _infoLogin, string _section, string _sectionAction, string _id)
    {
        StringBuilder _html = new StringBuilder();

        switch (_section)
        {
        case "MAIN":
            _html = SectionMainUI.GetMain(_infoLogin);
            break;

        case "SEARCH":
            _html = SectionSearchUI.GetMain();
            break;

        case "PROGRESSDOWNLOAD":
            _html = HCSStaffUI.GetFrmProgressDownloadData(HCSStaffUtil.PAGE_DOWNLOADREGISTRATIONFORM_PROGRESS, _idSectionProgress);
            break;
        }

        return(_html);
    }
    public static StringBuilder GetSection(Dictionary <string, object> _infoLogin, string _section, string _sectionAction, string _id)
    {
        StringBuilder _html      = new StringBuilder();
        StringBuilder _content   = new StringBuilder();
        StringBuilder _contentTH = new StringBuilder();
        StringBuilder _contentEN = new StringBuilder();
        bool          _exist     = HCSUtil.ChkExistStudentTermServiceHCSConsentOOCA(_id);
        int           _userError = int.Parse(_infoLogin["UserError"].ToString());

        switch (_section)
        {
        case "MAIN":
            if (!_exist)
            {
                _html = SectionMainUI.GetMain(_id);
            }
            else
            {
                Dictionary <string, object> _termServiceHCSConsentOOCAResult = HCSUtil.GetTermServiceHCSConsentOOCA(_id);


                if (!String.IsNullOrEmpty(_termServiceHCSConsentOOCAResult["TermServiceStatusHCSConsentOOCA"].ToString()))
                {
                    _contentTH.AppendFormat(
                        "<center>" +
                        "   <span class='f8'>นักศึกษาเคยแสดงความประสงค์ว่า</span><br />" +
                        "   <span class='f7 bold underline'>\"{0}\"</span><br />" +
                        "   <span class='f9'>ให้ข้อมูลสำหรับการรับบริการปรึกษาออนไลน์สำหรับนักศึกษา มหาวิทยาลัยมหิดลไว้แล้ว</span>" +
                        "</center>" +
                        "<p class='br'></p>" +
                        "<div class='red'>" +
                        "   <span class='bold'>หมายเหตุ</span><br />กรณีต้องการแจ้งเปลี่ยนแปลงความประสงค์ หรือต้องการรายละเอียดเพิ่มเติมติดต่อสอบถามได้ที่ กองกิจการนักศึกษา โทร. 0 2849 4538 ในวันและเวลาราชการ หรือติดต่อได้ที่ Inbox ของ FB Fanpage : @MahidolFriends" +
                        "</div>", (_termServiceHCSConsentOOCAResult["TermServiceStatusHCSConsentOOCA"].Equals("Y") ? "ยินยอม" : "ไม่ยินยอม")
                        );

                    _contentEN.AppendFormat(
                        "<center>" +
                        "   <span class='f8'>You have already decided to</span><br />" +
                        "   <span class='f7 bold underline'>\"{0}\"</span><br />" +
                        "   <span class='f9'>provides information for receiving online counseling services<br />for Mahidol University’ students</span>" +
                        "</center>" +
                        "<p class='br'></p>" +
                        "<div class='red'>" +
                        "   <span class='bold'>Note</span><br />In case of changing your decision, please contact the Mahidol University Counseling Center ( MU Friends, Counseling Center ) Division of Student Affairs, tel. 0 2849 4538 or FB Fanpage: @mahidolfriends" +
                        "</div>", (_termServiceHCSConsentOOCAResult["TermServiceStatusHCSConsentOOCA"].Equals("Y") ? "Agree" : "Disagree")
                        );

                    _html.AppendFormat("<div class='view usererror{0}' id='{1}-panel'>", _userError, HCSUtil.ID_SECTION_TERMSERVICEHCSCONSENTOOCA_INFO.ToLower());
                    _html.AppendLine("      <div class='panel panel-info'>");
                    _html.AppendLine("          <div class='panel-body'>");
                    _html.AppendFormat("            <div class='lang lang-th font-family-th regular {0}'>{1}</div>", "f10", _contentTH);
                    _html.AppendFormat("            <div class='lang lang-en font-family-en regular {0}'>{1}</div>", "f10", _contentEN);
                    _html.AppendLine("          </div>");
                    _html.AppendLine("      </div>");
                    _html.AppendLine("  </div>");
                }
            }

            break;
        }

        return(_html);
    }