コード例 #1
0
        public static string GetLoanInterestRate(string termValue)
        {
            string strLoanInterest = "10.25";
            string strLoanTerm     = "3";

            if (string.IsNullOrEmpty(termValue.Trim()))
            {
                termValue = "0";
            }

            int intermValue             = Convert.ToInt32(termValue);
            DropdownHdrManager dhm      = new DropdownHdrManager();
            string             strValue = dhm.GetValueFromDLLDetailsById(intermValue);

            if (!string.IsNullOrEmpty(strValue))
            {
                string[] strSplitValue = strValue.Split(' ');
                if (strSplitValue.Count() > 1)
                {
                    strLoanTerm     = strSplitValue[0].Trim();
                    strLoanInterest = strSplitValue[1].Replace("(", "").Replace(")", "").Replace("%", "").Trim();
                }
            }

            return(strLoanTerm + "," + strLoanInterest);
        }
コード例 #2
0
        private void SetLoanInterestRate()
        {
            string strLoanInterest = "10.25";
            string strLoanTerm     = "3";
            string termValue       = ddlterms.SelectedValue;

            if (string.IsNullOrEmpty(termValue.Trim()))
            {
                termValue = "0";
            }

            int intermValue             = Convert.ToInt32(termValue);
            DropdownHdrManager dhm      = new DropdownHdrManager();
            string             strValue = dhm.GetValueFromDLLDetailsById(intermValue);

            if (!string.IsNullOrEmpty(strValue))
            {
                string[] strSplitValue = strValue.Split(' ');
                if (strSplitValue.Count() > 1)
                {
                    strLoanTerm     = strSplitValue[0].Trim();
                    strLoanInterest = strSplitValue[1].Replace("(", "").Replace(")", "").Replace("%", "").Trim();
                }
            }
            txttermInMonth.Text = strLoanTerm;
            txtInterest.Text    = strLoanInterest;
        }