You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

11 years ago
11 years ago
11 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Sevomin.Models
  7. {
  8. public class JobApplicationViewModel
  9. {
  10. public long JobId { get; set; }
  11. public string DovominDisplayName { get; set; }
  12. public string DovominId { get; set; }
  13. public string JobSummary { get; set; }
  14. public string CoverLetter { get; set; }
  15. public float Affinity { get; set; }
  16. public bool MinimumRequirement { get; set; }
  17. public JobApplicationViewModel()
  18. {
  19. }
  20. public JobApplicationViewModel(DovominJob dj)
  21. {
  22. this.JobId = dj.JobId;
  23. this.DovominDisplayName = dj.Dovomin.DisplayName;
  24. this.DovominId = dj.DovominId;
  25. this.CoverLetter = dj.CoverLetter;
  26. this.Affinity = (float)(dj.Affinity * 100);
  27. this.MinimumRequirement = dj.MinimumRequirement;
  28. StringBuilder sb = new StringBuilder("کارشناس برنامه ریزی و کنترل پروژه ");
  29. var jmvm = new JobMiniViewModel(dj.Job, 2);
  30. foreach (var param in jmvm.Parameters)
  31. sb.Append(string.Format(param.Item1 + " ", param.Item2));
  32. this.JobSummary = sb.ToString();
  33. }
  34. }
  35. }