Guest User

Untitled

a guest
Jan 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. public ViewResult Index()
  2.  
  3. {
  4.  
  5. var Leads = (from c in db.Customers.OfType<CRMEntities.Lead>()
  6. where(c.IsActive == true) select c);
  7.  
  8. return View(Leads.ToList());
  9.  
  10. }
  11.  
  12. @model IEnumerable<CRMEntities.Lead>
  13.  
  14. @{
  15. ViewBag.Title = "Index";
  16. }
  17.  
  18. <h2>Index</h2>
  19. .
  20. .
  21.  
  22. @model PagedList.IPagedList<CRMEntities.Lead>
  23.  
  24.  
  25. @{
  26. ViewBag.Title = "Index";
  27. }
  28.  
  29. <h2>Index</h2>
  30.  
  31. <p>
  32. @Html.ActionLink("Create New", "Create")
  33. </p>
  34. <table>
  35. <tr>
  36. <th>
  37. Status
  38. </th>
  39. <th>
  40. IsQualified
  41. </th>
  42. <th>
  43. Name
  44. </th>
  45. <th>
  46. Address
  47. </th>
  48. <th>
  49. OfficePhone1
  50. </th>
  51. <th>
  52. Website
  53. </th>
  54. <th>
  55. Email2
  56. </th>
  57. <th>
  58. Email1
  59. </th>
  60. <th>
  61. FaxNo
  62. </th>
  63. <th>
  64. Remark
  65. </th>
  66. <th>
  67. Rating
  68. </th>
  69. <th>
  70. BusinessType
  71. </th>
  72. <th>
  73. IsActive
  74. </th>
  75.  
  76. </tr>
  77.  
  78. @foreach (var item in Model) {
  79. <tr>
  80. <td>
  81. @Html.DisplayFor(modelItem => item.Status)
  82. </td>
  83. <td>
  84. @Html.DisplayFor(modelItem => item.IsQualified)
  85. </td>
  86. <td>
  87. @Html.DisplayFor(modelItem => item.Name)
  88. </td>
  89. <td>
  90. @Html.DisplayFor(modelItem => item.Address)
  91. </td>
  92. <td>
  93. @Html.DisplayFor(modelItem => item.OfficePhone1)
  94. </td>
  95. <td>
  96. @Html.DisplayFor(modelItem => item.Website)
  97. </td>
  98. <td>
  99. @Html.DisplayFor(modelItem => item.Email2)
  100. </td>
  101. <td>
  102. @Html.DisplayFor(modelItem => item.Email1)
  103. </td>
  104. <td>
  105. @Html.DisplayFor(modelItem => item.FaxNo)
  106. </td>
  107. <td>
  108. @Html.DisplayFor(modelItem => item.Remark)
  109. </td>
  110. <td>
  111. @Html.DisplayFor(modelItem => item.Rating)
  112. </td>
  113. <td>
  114. @Html.DisplayFor(modelItem => item.BusinessType)
  115. </td>
  116. <td>
  117. @Html.DisplayFor(modelItem => item.IsActive)
  118. </td>
  119.  
  120. <td>
  121. @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
  122. @Html.ActionLink("Details", "Details", new { id=item.Id }) |
  123. @Html.ActionLink("Delete", "Delete", new { id=item.Id })
  124. </td>
  125. </tr>
  126. }
  127.  
  128. </table>
Add Comment
Please, Sign In to add comment