TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Phaneendra Chakravaram
NA
490
100.8k
how to check duplicate repeated date in elseif condition
Feb 7 2018 11:39 PM
@foreach (var dat in Model.presentda)
{
Itemin sfdsf = new Itemin();
sfdsf.show_dates = dat;
@*<button class="btn btn-primary">@Html.Raw(@dat)</button>*@
@*<span>Date :</span>@dat.dates<<br />*@
foreach (var dat2 in Model.dates)
{
Itemin item = new Itemin();
item.show_dates = dat2;
@*<button class="btn btn-primary">@Html.Raw(@dat2)</button>*@
int result = DateTime.Compare( DateTime.Parse(dat2), DateTime.Parse(dat));
if (result == -1)
{
<label class="somedate">@dat</label>
}
else if (result == 0)
{
<button class="sods">@dat</button>
}
else if (result > 0) ///////////////////////////// here i am checking dates if condition is coming this loop iam displaying lable but same date is comparing with all date with other model so evryy time lable is creatd for same date. i want to display only one time for lable for unique date how?
{
<label class="dfgh">@dat</label>
} @*<span>Date :</span>@dat.dates<<br />*@
}
}
Reply
Answers (
3
)
Insert into Select Query Question
how to get data PLC to sql database