public TalentDetailsVM(Talent talent) : base(talent) { if (talent == null) { return; } SocialArea = new BaseDropdownableDetailsVM(talent.SocialArea); SocialAreaHandle = talent.SocialAreaHandle; FollowersCount = talent.FollowersCount; Price = talent.Price; IsAvailable = talent.IsAvailable; CreditCardNumber = talent.CreditCardNumber; CreditCardExpire = talent.CreditCardExpire.HasValue ? talent.CreditCardExpire.Value.ToShortDateString() : ""; CreditCardHolder = talent.CreditCardHolder; Categories = ""; foreach (var item in talent.TalentCategories) { Categories += item.Category.Name + ", "; } if (Categories.Length > 0) { Categories = Categories.Substring(0, Categories.Length - 2); } }
public WithdrawRequestListItemForExpertAndUserVM(WithdrawRequest model) { if (model == null) { return; } ID = model.ID; Amount = model.Amount; //AppData.Configuration is null. don't know why //AmountStr = model.Amount.ToString(AppData.Configuration.NumberViewStringFormat); AmountStr = model.Amount.ToString("### ### ### ### ##0"); Status = new BaseDropdownableDetailsVM(model.Status); DateCreated = DateTimeUtils.ConvertToString(model.DateCreated); DateCompleted = DateTimeUtils.ConvertToString(model.DateCompleted); }
public TalentAccountDetailsVM(ApplicationUser user, Talent talent) : base(user, talent) { if (user == null || talent == null) { return; } PhoneNumber = user.PhoneNumber; Email = user.Email; SocialArea = new BaseDropdownableDetailsVM(talent.SocialArea); SocialAreaHandle = talent.SocialAreaHandle; FollowersCount = talent.FollowersCount; Price = talent.Price; IsAvailable = talent.IsAvailable; Balance = talent.Balance; AccountNumber = talent.AccountNumber; }