Exemple #1
0
    protected void OK_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(txtProductKey.Text) && string.IsNullOrEmpty(txtTrialKey.Text))
        {
            return;
        }
        HROne.ProductLicense productKey = new HROne.ProductLicense();
        productKey.LoadProductLicense(dbConn);
        bool IsRedirect = true;

        if (!string.IsNullOrEmpty(txtProductKey.Text))
        {
            productKey.LoadProductKey(txtProductKey.Text);
            if (productKey.IsValidProductKey)
            {
                //if (!txtProductKey.Text.Equals(ESystemParameter.getParameter(ESystemParameter.PARAM_CODE_PRODUCTKEY), StringComparison.CurrentCultureIgnoreCase))
                //{
                //}
                //else
                //{
                //    if (AppUtils.ServerDateTime().Date > WebUtils.getLastTrialDate())
                //    {
                //        Prompt.Text = "Trial Period Expiry";
                //        return;
                //    }

                //}
                Session["TrialVersion"] = false;
            }
            else
            {
                Prompt.Text += "Invalid Product Key.<br/>";
                IsRedirect   = false;
            }
        }
        if (!string.IsNullOrEmpty(txtTrialKey.Text))
        {
            string trialKey = txtTrialKey.Text;
            productKey.LoadTrialKey(trialKey, dbConn);
            if (productKey.TrialKey == string.Empty)
            {
                Prompt.Text += "Invalid Trial Key.<br/>";
                IsRedirect   = false;
            }
            else
            {
                if (Session["TrialVersion"] == null)
                {
                    Session["TrialVersion"] = true;
                }
            }
        }
        if (!string.IsNullOrEmpty(txtAuthorizationCode.Text))
        {
            if (!productKey.IsValidAuthorizationCode(txtAuthorizationCode.Text))
            {
                Prompt.Text += "Invalid Authorization Code.<br/>";
                IsRedirect   = false;
            }
        }
        if (IsRedirect)
        {
            productKey.SaveProductLicense(dbConn);

            //  reset the connection for new key
            WebUtils.SetSessionDatabaseConnection(Session, dbConn);
            Response.Redirect(PreviousURL.Value);
        }
    }
    protected void Page_PreRender(object sender, EventArgs e)
    {
        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);

        lblDefault_MAX_MONTHLY_LSPSP_AMOUNT.Text = DEFAULT_MAX_MONTHLY_LSPSP_AMOUNT.ToString();
        lblDefault_MAX_TOTAL_LSPSP_AMOUNT.Text   = DEFAULT_MAX_TOTAL_LSPSP_AMOUNT.ToString();

        HROne.ProductVersion.Database database = new HROne.ProductVersion.Database(dbConn);

        SYSTEM_APP_VERSION.Text = ProductVersion.CURRENT_PROGRAM_VERSION;
        SYSTEM_DB_VERSION.Text  = HROne.ProductVersion.Database.CURRENT_DB_VERSION;
        RUNNING_DB_VERSION.Text = database.RunningDatabaseVersion();
        PRODUCT_TYPE.Text       = productLicense.ProductType.ToString();
        MAX_COMPANY.Text        = productLicense.NumOfCompanies.ToString();
        MAX_USERS.Text          = productLicense.NumOfUsers.ToString();
        if (productLicense.MaxInboxSizeMB.Equals(uint.MaxValue))
        {
            MAX_INBOX_SIZE_MB.Text = HROne.Common.WebUtility.GetLocalizedString("Unlimited");
        }
        else
        {
            MAX_INBOX_SIZE_MB.Text = productLicense.MaxInboxSizeMB.ToString();
        }

        if (productLicense.NumOfEmployees.Equals(uint.MaxValue))
        {
            MAX_EMPLOYEES.Text = HROne.Common.WebUtility.GetLocalizedString("Unlimited");
        }
        else
        {
            MAX_EMPLOYEES.Text = productLicense.NumOfEmployees.ToString();
        }

        lblActiveUser.Text = WebUtils.TotalActiveUser(dbConn, 0).ToString();

        lblActiveCompany.Text = WebUtils.TotalActiveCompany(dbConn, 0).ToString();

        lblActiveEmployee.Text = WebUtils.TotalActiveEmployee(dbConn, 0).ToString();
        lblTotalInboxSize.Text = ((double)EInboxAttachment.GetTotalSize(dbConn, 0) / 1000.0 / 1000.0).ToString("0.000");

        if (!productLicense.IsValidAuthorizationCode())
        {
            TrialPeriodPanel.Visible = true;
            TRIAL_PERIOD_TO.Text     = productLicense.LastTrialDate.ToString("yyyy-MM-dd");
        }
        else
        {
            TrialPeriodPanel.Visible = false;
        }
        if (!Page.IsPostBack)
        {
            WebUtils.AddLanguageOptionstoDropDownList(cbxPARAM_CODE_DEFAULT_LANGUAGE);
            WebUtils.AddLanguageOptionstoDropDownList(cbxPARAM_CODE_ESS_DEFAULT_LANGUAGE);

            cbxPARAM_CODE_DEFAULT_LANGUAGE.SelectedValue         = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_DEFAULT_LANGUAGE);
            cbxPARAM_CODE_ESS_DEFAULT_LANGUAGE.SelectedValue     = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_DEFAULT_LANGUAGE);
            cbxPARAM_CODE_DEFAULT_RECORDS_PER_PAGE.SelectedValue = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_DEFAULT_RECORDS_PER_PAGE);
            txtPARAM_CODE_DB_TITLE.Text = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_DB_TITLE);
            txtPARAM_CODE_DOCUMENT_UPLOAD_FOLDER.Text = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_DOCUMENT_UPLOAD_FOLDER);
            if (string.IsNullOrEmpty(txtPARAM_CODE_DOCUMENT_UPLOAD_FOLDER.Text))
            {
                txtPARAM_CODE_DOCUMENT_UPLOAD_FOLDER.Text = HROne.CommonLib.FileIOProcess.DefaultUploadFolder();
            }


            txtPARAM_CODE_LOGIN_MAX_FAIL_COUNT.Text = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_LOGIN_MAX_FAIL_COUNT);
            txtPARAM_CODE_SESSION_TIMEOUT.Text      = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_SESSION_TIMEOUT);

            chkPARAM_CODE_HKID_CHECKDIGIT_AUTO_GENERATE.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_HKID_CHECKDIGIT_AUTO_GENERATE).Equals("Y", StringComparison.CurrentCultureIgnoreCase) ? true : false;
            // Start 0000044, Miranda, 2014-05-09
            chkPARAM_CODE_EMP_NO_AUTO_GENERATE.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_EMP_NO_AUTO_GENERATE).Equals("Y", StringComparison.CurrentCultureIgnoreCase) ? true : false;
            txtPARAM_CODE_EMP_NO_FORMAT.Text           = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_EMP_NO_FORMAT);
            // End 0000044, Miranda, 2014-05-09

            cbxPARAM_CODE_USE_ORSO.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_USE_ORSO).Equals("Y", StringComparison.CurrentCultureIgnoreCase) ? true : false;
            txtPARAM_CODE_PAYROLL_MAX_MONTHLY_LSPSP_AMOUNT.Text   = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_PAYROLL_MAX_MONTHLY_LSPSP_AMOUNT);
            txtPARAM_CODE_PAYROLL_MAX_TOTAL_LSPSP_AMOUNT.Text     = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_PAYROLL_MAX_TOTAL_LSPSP_AMOUNT);
            cbxPARAM_CODE_PAY_SLIP_HIDE_LEAVE_BALANCE.Checked     = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_PAY_SLIP_HIDE_LEAVE_BALANCE).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            cbxPARAM_CODE_PAY_SLIP_HIDE_MINIMUM_WAGE_INFO.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_PAY_SLIP_HIDE_MINIMUM_WAGE_INFO).Equals("Y", StringComparison.CurrentCultureIgnoreCase) ? true : false;
            txtPARAM_CODE_MPF_FILE_BOCI_ENCRYPT_PATH.Text         = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_MPF_FILE_BOCI_ENCRYPT_PATH);

            ddbPARAM_CODE_REPORT_CHINESE_FONT.SelectedValue = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_REPORT_CHINESE_FONT);

            chkPARAM_CODE_TAXATION_USE_CHINESE_NAME.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_TAXATION_USE_CHINESE_NAME).Equals("Y", StringComparison.CurrentCultureIgnoreCase) ? true : false;

            txtPARAM_CODE_SMTP_SERVER_NAME.Text   = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_SMTP_SERVER_NAME);
            txtPARAM_CODE_SMTP_PORT.Text          = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_SMTP_PORT);
            chkPARAM_CODE_SMTP_ENABLE_SSL.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_SMTP_ENABLE_SSL).Equals("Y", StringComparison.CurrentCultureIgnoreCase) ? true : false;
            txtPARAM_CODE_SMTP_USERNAME.Text      = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_SMTP_USERNAME);
            txtPARAM_CODE_SMTP_PASSWORD.Attributes.Add("value", PASSWORD_NO_CHANGE_KEYWORD);//ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_SMTP_PASSWORD);
            txtPARAM_CODE_SMTP_SMTP_OUTGOING_EMAIL_ADDRESS.Text = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_SMTP_SMTP_OUTGOING_EMAIL_ADDRESS);

            chkPARAM_CODE_ESS_FUNCTION_CHANGE_EE_INFO.Checked           = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_CHANGE_EE_INFO).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_LEAVE_APPLICATION.Checked        = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_LEAVE_APPLICATION).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_CANCEL_LEAVE_APPLICATION.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_CANCEL_LEAVE_APPLICATION).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_LEAVE_HISTORY.Checked            = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_LEAVE_HISTORY).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_LEAVE_BALANCE_ENQUIRY.Checked    = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_LEAVE_BALANCE_ENQUIRY).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_LEAVE_BALANCE_REPORT.Checked     = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_LEAVE_BALANCE_REPORT).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_LEAVE_APPLICATION_LIST.Checked   = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_LEAVE_APPLICATION_LIST).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_ROSTER_TABLE.Checked             = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_ROSTER_TABLE).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_PRINT_PAYSLIP.Checked            = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_PRINT_PAYSLIP).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_PRINT_TAXREPORT.Checked          = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_PRINT_TAXREPORT).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_OVERALL_PAYMENT_SUMMARY.Checked  = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_OVERALL_PAYMENT_SUMMARY).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            // Start 0000060, Miranda, 2014-07-22
            if (ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_OTCLAIM))
            {
                chkPARAM_CODE_ESS_FUNCTION_OT_CLAIMS.Checked         = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_OT_CLAIMS).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
                chkPARAM_CODE_ESS_FUNCTION_OT_CLAIMS_HISTORY.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_OT_CLAIMS_HISTORY).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            }
            // End 0000060, Miranda, 2014-07-22
            // Start 0000112, Miranda, 2014-12-10
            if (ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_LATE_WAIVE))
            {
                chkPARAM_CODE_ESS_FUNCTION_LATE_WAIVE.Checked         = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_LATE_WAIVE).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
                chkPARAM_CODE_ESS_FUNCTION_LATE_WAIVE_HISTORY.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_LATE_WAIVE_HISTORY).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            }
            // End 0000112, Miranda, 2014-12-10
            // Start 0000057, KuangWei, 2014-07-08
            chkPARAM_CODE_ESS_FUNCTION_MONTHLY_ATTENDANCE_REPORT.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_MONTHLY_ATTENDANCE_REPORT).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_TIMECARD_RECORD.Checked           = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_TIMECARD_RECORD).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_ESS_FUNCTION_ATTENDANCE_TIMEENTRY_LIST.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_ATTENDANCE_TIMEENTRY_LIST).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            // End 0000057, KuangWei, 2014-07-08
            // Start 0000076, Miranda, 2014-08-21
            chkPARAM_CODE_ESS_FUNCTION_ATTENDANCE_TIMEENTRY_REPORT.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_FUNCTION_ATTENDANCE_TIMEENTRY_REPORT).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            // End 0000076, Miranda, 2014-08-21
            txtPARAM_CODE_ESS_LEAVE_MEDICIAL_CERT_ALERT.Text = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_LEAVE_MEDICIAL_CERT_ALERT);

            wdpPARAM_CODE_ESS_PAYSLIP_START_DATE.Value       = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_PAYSLIP_START_DATE);
            chkPARAM_CODE_ESS_PAYSLIP_AUTO_RELEASE.Checked   = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_PAYSLIP_AUTO_RELEASE).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            wdpPARAM_CODE_ESS_LEAVE_HISTORY_START_DATE.Value = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_LEAVE_HISTORY_START_DATE);
            // Start 0000060, Miranda, 2014-07-22
            //wdpPARAM_CODE_ESS_DEF_EOT_EXPIRY_DATE.Value = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_DEF_EOT_EXPIRY_DATE);

            string essDefEotExpiry = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_DEF_EOT_EXPIRY);
            txtPARAM_CODE_ESS_DEF_EOT_EXPIRY.Text = string.IsNullOrEmpty(essDefEotExpiry) ? "1" : essDefEotExpiry;
            WebUtils.AddYearMonthDayOptionstoDropDownList(cbxPARAM_CODE_ESS_DEF_EOT_EXPIRY_TYPE);
            string essDefEotExpiryType = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_DEF_EOT_EXPIRY_TYPE);
            cbxPARAM_CODE_ESS_DEF_EOT_EXPIRY_TYPE.SelectedValue = string.IsNullOrEmpty(essDefEotExpiryType) ? "M" : essDefEotExpiryType;// "M" means Month
            // End 0000060, Miranda, 2014-07-22

            chkPARAM_CODE_EMP_LIST_SHOW_COMPANY.Checked = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_EMP_LIST_SHOW_COMPANY).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_EMP_LIST_SHOW_H1.Checked      = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_EMP_LIST_SHOW_H1).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_EMP_LIST_SHOW_H2.Checked      = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_EMP_LIST_SHOW_H2).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
            chkPARAM_CODE_EMP_LIST_SHOW_H3.Checked      = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_EMP_LIST_SHOW_H3).Equals("Y", StringComparison.CurrentCultureIgnoreCase);
        }

        if (productLicense.IsESS)
        {
            PanelESSSection.Visible = true;
        }
        else
        {
            PanelESSSection.Visible = false;
        }

        if (productLicense.ProductType == HROne.ProductLicense.ProductLicenseType.HROne)
        {
            DBTitleRow.Visible = true;
            BOCIEncryptPathSettingRow.Visible    = true;
            DocumentUploadPathSettingRow.Visible = true;
            //ORSOSettingRow.Visible = true;
            PanelSMTPSection.Visible = true;
        }
        else
        {
            DBTitleRow.Visible = false;
            BOCIEncryptPathSettingRow.Visible    = false;
            DocumentUploadPathSettingRow.Visible = false;
            //ORSOSettingRow.Visible = false;
            PanelSMTPSection.Visible = false;
        }

        eot_row.Visible = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_OTCLAIM);

        this.chkPARAM_CODE_ESS_FUNCTION_TIMECARD_RECORD.Enabled = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_TIMECARD_RECORD);
        this.lblEnabledTimeCardRecord.Visible = !this.chkPARAM_CODE_ESS_FUNCTION_TIMECARD_RECORD.Enabled;

        this.chkPARAM_CODE_ESS_FUNCTION_ATTENDANCE_TIMEENTRY_LIST.Enabled = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_ATTENDANCE_TIMEENTRY_LIST);
        this.lblEnabledAttendanceTimeEntryList.Visible = !this.chkPARAM_CODE_ESS_FUNCTION_ATTENDANCE_TIMEENTRY_LIST.Enabled;

        this.chkPARAM_CODE_ESS_FUNCTION_MONTHLY_ATTENDANCE_REPORT.Enabled = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_MONTHLY_ATTENDANCE_REPORT);
        this.lblEnabledMonthlyAttendanceReport.Visible = !this.chkPARAM_CODE_ESS_FUNCTION_MONTHLY_ATTENDANCE_REPORT.Enabled;

        this.chkPARAM_CODE_ESS_FUNCTION_OT_CLAIMS.Enabled         = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_OTCLAIM);
        this.chkPARAM_CODE_ESS_FUNCTION_OT_CLAIMS_HISTORY.Enabled = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_OTCLAIM);
        this.lblEnabledOTClaims.Visible        = !this.chkPARAM_CODE_ESS_FUNCTION_OT_CLAIMS.Enabled;
        this.lblEnabledOTClaimsHistory.Visible = !this.chkPARAM_CODE_ESS_FUNCTION_OT_CLAIMS_HISTORY.Enabled;
        // Start 000112, Ricky So, 2014/12/18
        this.chkPARAM_CODE_ESS_FUNCTION_LATE_WAIVE.Enabled         = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_LATE_WAIVE);
        this.chkPARAM_CODE_ESS_FUNCTION_LATE_WAIVE_HISTORY.Enabled = ESystemParameter.IsEnabled(dbConn, ESystemParameter.PARAM_CODE_ENABLE_LATE_WAIVE);
        this.lblEnabledLateWaive.Visible        = !this.chkPARAM_CODE_ESS_FUNCTION_LATE_WAIVE.Enabled;
        this.lblEnabledLateWaiveHistory.Visible = !this.chkPARAM_CODE_ESS_FUNCTION_LATE_WAIVE_HISTORY.Enabled;
        // End 000112, Ricky So, 2014/12/18
    }