Exemplo n.º 1
0
        /// <summary>
        /// 验证根据项目的金额是否需要隐藏部分控件
        /// </summary>
        /// <param name="CurrencyIDFrom">项目使用的货币单位</param>
        /// <returns>1:显示,:0不显示,-1不存在对应汇率</returns>
        public int IsHidenControl(string CurrencyIDFrom, decimal CurrencyMoneyAmount)
        {
            DataEntity.CEntityUitlity cEntity = new DataEntity.CEntityUitlity(); // 数据实体通用类
            int     iState           = 0;                                        // 显示状态变量
            string  CurrencyIDTo     = string.Empty;                             // 目标货币
            decimal dAmountLevel     = 0;                                        // SR金额的级别
            decimal dAmountByCompute = 0;                                        // 根据目标货币单位计算出的金额

            try
            {
                //dAmountLevel = Convert.ToDecimal( System.Configuration.ConfigurationSettings.AppSettings["SRPlanAmountLevel"] );
                dAmountLevel = Convert.ToDecimal(pXmlReader.GetSingleNodeValue("System.xml", "configuration/SystemConfig/SRPlanAmountLevel", "value"));
                //CurrencyIDTo = System.Configuration.ConfigurationSettings.AppSettings["Currency"];
                CurrencyIDTo = pXmlReader.GetSingleNodeValue("System.xml", "configuration/SystemConfig/Currency", "value");

                dAmountByCompute = cEntity.GetCurrencyMoney(CurrencyIDFrom, CurrencyIDTo, CurrencyMoneyAmount);

                if (dAmountByCompute >= dAmountLevel)
                {
                    iState = 1;
                }

                if (dAmountByCompute == -1)
                {
                    iState = -1;
                }
            }
            catch
            {
                throw new Exception();
            }

            return(iState);
        }
Exemplo n.º 2
0
        string strTenderID    = string.Empty;           // TenderID

        /// <summary>
        ///
        /// </summary>
        public BUSTenderSend()
        {
            dataEntity = new DataEntity.DAETenderSend();
            cEntity    = new DataEntity.CEntityUitlity();
        }