using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sevomin.Models { public class JobApplicationViewModel { public long JobId { get; set; } public string DovominDisplayName { get; set; } public string DovominId { get; set; } public string JobSummary { get; set; } public string CoverLetter { get; set; } public float Affinity { get; set; } public bool MinimumRequirement { get; set; } public JobApplicationViewModel() { } public JobApplicationViewModel(DovominJob dj) { this.JobId = dj.JobId; this.DovominDisplayName = dj.Dovomin.DisplayName; this.DovominId = dj.DovominId; this.CoverLetter = dj.CoverLetter; this.Affinity = (float)(dj.Affinity * 100); this.MinimumRequirement = dj.MinimumRequirement; StringBuilder sb = new StringBuilder("کارشناس برنامه ریزی و کنترل پروژه "); var jmvm = new JobMiniViewModel(dj.Job, 2); foreach (var param in jmvm.Parameters) sb.Append(string.Format(param.Item1 + " ", param.Item2)); this.JobSummary = sb.ToString(); } } }