<select name="CommitIDListID" class="btn btn-default dropdown-toggle" id="CommitIDListID" multiple="multiple">
<option value="345456456, 553564646">345456456, 553564646</option>
<option value="353434534">353434534</option>
<option value="535443335, 756555666, 755444566">535443335, 756555666, 755444566</option>
<option value="577543332">577543332</option>
<option value="755444566">755444566</option>
</select>
<select name="CommitIDListID" class="btn btn-default dropdown-toggle" id="CommitIDListID" multiple="multiple">
<option value="553564646">553564646</option>
<option value="345456456">345456456</option>
<option value="353434534">353434534</option>
<option value="535443335">535443335</option>
<option value="577543332">577543332</option>
<option value="755444566">755444566</option> // my data will be distinct because I have two records of the same commit ID
<option value="756555666">756555666</option>
</select>
<select multiple="multiple" id="CommitIDListID" name="CommitIDListID" class="btn btn-default dropdown-toggle">
@foreach (var data in Model.CommitIDList)
{
if (data.Selected)
{
<option value="@data.Value" selected="selected">@data.Text</option>
}
else
{
<option value="@data.Value">@data.Text</option>
}
}
</select>
public IEnumerable<SelectListItem> GetAllCommitIDList()
{
var GetCommitID = _unitOfWorkCABusinessRules.RuleDetailRepo.GetAll().GroupBy(x => x.CommitID).Select(y => y.First()).Distinct();
return GetCommitID
.Select(x => new SelectListItem
{
Text = x.CommitID,
Value = x.CommitID.ToString(),
})
.Distinct()
.OrderBy(x => x.Text);
}
var CommitIDData = _unitOfWorkCABusinessRules.RuleDetailRepo.GetAll().Select(g => g.CommitID = string.Join(", ", g.CommitID)).Distinct();
return CommitIDData
.Select(g => new SelectListItem
{
Text = g.CommitID,
Value = g.CommitID.ToString(),
})
.Distinct()
.OrderBy(g => g.Text);
RuleDetailId Version Environment CQTicket CommitID
16 Version33 SIT ENT19293 353434534
17 Version22 SIT ENT95837 345456456, 553564646
18 version 5 SIT ENT8374 535443335, 756555666, 755444566
19 version 10 SIT ENT89484 577543332
20 version25 SIT CQ ticket 55 755444566
21 Version11 SIT ENT00222222
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE