public PublicCorp()
 {
     _id = 0;
     _name = "";
     _ticker = "";
     _desc = "";
     _shareValue = 0;
     _ceo = "";
     _expectedPayout = 0;
     _payoutPeriod = CorpPayoutPeriod.Unspecified;
     _nav = 0;
     _navDate = DateTime.UtcNow;
     _bank = false;
     _riskRating = RiskRating.NotRated;
 }
 public PublicCorp(EMMADataSet.PublicCorpsRow data)
 {
     _id = data.CorpID;
     _name = data.CorpName;
     _ticker = data.Ticker;
     _desc = data.Description;
     _shareValue = data.ValuePerShare;
     _ceo = data.CEO;
     _expectedPayout = data.ExpectedPayoutPerShare;
     _payoutPeriod = (CorpPayoutPeriod)data.PayoutPeriodID;
     _nav = data.EstimatedNAV;
     _navDate = data.NAVTakenAt;
     if (UserAccount.Settings.UseLocalTimezone)
     {
         _navDate = _navDate.AddHours(Globals.HoursOffset);
     }
     _bank = data.Bank;
     _riskRating = (RiskRating)data.RiskRatingID;
 }
 public PublicCorp(EMMADataSet.InvestmentsRow data)
 {
     _id = data.CorpID;
     _name = data.CorpName;
     _ticker = data.Ticker;
     _desc = data.Description;
     _shareValue = data.ValuePerShare;
     _ceo = data.CEO;
     _expectedPayout = data.ExpectedPayoutPerShare;
     _payoutPeriod = (CorpPayoutPeriod)data.PayoutPeriodID;
     _nav = data.EstimatedNAV;
     _navDate = data.NAVTakenAt;
     if (!data.IsSharesOwnedNull())
     {
         _sharesOwned = data.SharesOwned;
     }
     else
     {
         _sharesOwned = 0;
     }
     _bank = data.Bank;
     _riskRating = (RiskRating)data.RiskRatingID;
 }
Esempio n. 4
0
 public static string GetDescription(CorpPayoutPeriod type)
 {
     if (!_initalised) { Initalise(); }
     return _descriptions.Get((short)type);
 }