Пример #1
0
        public HomeInvestmentModel(HomeInvestmentModel data)
        {
            lastUpdate         = data.lastUpdate;
            investment         = data.investment;
            drawdownInvestment = data.drawdownInvestment;
            uomDrawdown        = data.uomDrawdown;
            currentInvestment  = data.currentInvestment;
            uomInvestment      = data.uomInvestment;
            progressInvestment = data.progressInvestment;
            uomProgress        = data.uomProgress;

            if (!DateTime.TryParseExact(lastUpdate, "MMMM yyyy", new CultureInfo("id-ID"), DateTimeStyles.None, out LastUpdateDate))
            {
                LastUpdateDate = DateTime.Now;
            }

            if (!double.TryParse(drawdownInvestment, NumberStyles.Float, new CultureInfo("en-US"), out DrawdownInvestmentValue))
            {
                DrawdownInvestmentValue = 0;
            }

            if (!double.TryParse(currentInvestment, NumberStyles.Float, new CultureInfo("en-US"), out CurrentInvestmentValue))
            {
                CurrentInvestmentValue = 0;
            }

            if (!double.TryParse(progressInvestment, NumberStyles.Float, new CultureInfo("en-US"), out ProgressInvestmentValue))
            {
                ProgressInvestmentValue = 0;
            }
        }
Пример #2
0
 public HomeInvestmentResponseModel()
 {
     data    = new HomeInvestmentModel();
     status  = 0;
     message = "";
 }