Click here to Skip to main content
15,072,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a cshtml file where its binded with some values like below


HTML
@model Emds.UI.PatientPortal.Admin.Areas.MigrationLog.Models.MigrationLogViewModel
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
@AddScript("MigrationLogHelper.js")
@using (@Html.BeginForm("Search", "MigrationLog", FormMethod.Post))
{
    <!-- START OF CONTENT WRAPPER -->
    <div>
        <div class="migrationHdr">
            <span>Migrated</span></div>
        <div class="contentWrapper contentWrapperHome">
            <!-- START OF APPOINTMENT WRAPPER -->
            <div class="PortalContentWrapper clinicalInform appointmentWrapperBackground">
                <div class="migration">
                    <ul>
                        <li><span class="label noTxtSelect">Last Name:</span>
                            @Html.TextBoxFor(model => model.SearchCriteria.LastName)
                        </li>
                        <li><span class="label noTxtSelect">First Name:</span>
                            @Html.TextBoxFor(model => model.SearchCriteria.FirstName)
                        </li>
                        <li><span class="label noTxtSelect">From:</span>
                            @Html.TextBoxFor(model => model.SearchCriteria.FromDate, new { style = "width:70px;margin-right:5px;", @class = "inputRightDob", @readonly = "readonly", id = "FromDate" })
                        </li>
                        <li><span class="label noTxtSelect">To:</span>
                            @Html.TextBoxFor(model => model.SearchCriteria.ToDate, new { style = "width:70px;margin-right:5px;", @class = "inputRightDob", @readonly = "readonly", id = "ToDate" })
                        </li>
                        <li class="migrationSearch">
                            <button name="Search" id="btnSearch">
                                Search</button>
                        </li>
                    </ul>
                </div>
                <div>
                    <div class="patientNavBarHeader noTxtSelect">
                        <ul>
                            <li>
                                <div class="patName migrationLogPatName">
                                    Name
                                </div>
                                <div class="patDob">
                                    DOB
                                </div>
                                <div class="patMigrationSsn">
                                    SSN
                                </div>
                                <div class="patMigrationDate migLogMigrationDate">
                                    Migration Date
                                </div>
                                <div class="patSsMrn migLogPatSsMrn">
                                    SS MRN
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="patientNavBarGrid noTxtSelect">
                        <ul>
                            @if (Model != null)
                            {
                                if (Model.PatientAccounts != null)
                                {
                                    for (int i = 0; i < Model.PatientAccounts.Count; i++)
                                    {
                                <li>
                                    @if (!String.IsNullOrEmpty(Model.PatientAccounts[i].Name))
                                    {
                                        <div class="patName migrationLogPatName">
                                            @Html.LabelFor(model => model.PatientAccounts[i].Name, Model.PatientAccounts[i].Name)
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="patName migrationLogPatName">
                                             
                                        </div>
                                    }
                                    @if (Model.PatientAccounts[i].DateOfBirth != null)
                                    {
                                        <div class="patDob">
                                            @Html.LabelFor(model => model.PatientAccounts[i].DateOfBirth, Model.PatientAccounts[i].DateOfBirth != null ? Model.PatientAccounts[i].DateOfBirth.ToString("MM/dd/yyyy") : "")
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="patDob">
                                             
                                        </div>
                                    }
                                    @if (!String.IsNullOrEmpty(Model.PatientAccounts[i].SocialSecurityNumber))
                                    {
                                        <div class="patMigrationSsn">
                                            @Html.LabelFor(model => model.PatientAccounts[i].SocialSecurityNumber, Model.PatientAccounts[i].SocialSecurityNumber)
                                        </div>
                                    }
                                    else
                                    {

                                        <div class="patMigrationSsn">
                                             
                                        </div>
                                    }
                                    @if (Model.PatientAccounts[i].MigrationDate != null)
                                    {
                                        <div class="patMigrationDate migLogMigrationDate">
                                            @Html.LabelFor(model => model.PatientAccounts[i].MigrationDate, Model.PatientAccounts[i].MigrationDate != null ? Model.PatientAccounts[i].MigrationDate.Value.ToString("MM/dd/yyyy") : "")
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="patMigrationDate migLogMigrationDate">
                                             
                                        </div>
                                    }
                                    @if (!String.IsNullOrEmpty(Model.PatientAccounts[i].MedicalRecordNumber))
                                    {
                                        <div class="patSsMrn migLogPatSsMrn">
                                            @Html.LabelFor(model => model.PatientAccounts[i].MedicalRecordNumber, Model.PatientAccounts[i].MedicalRecordNumber)
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="patSsMrn migLogPatSsMrn">
                                             
                                        </div>
                                    }
                                </li>
                                    }
                                }
                            }
                        </ul>
                    </div>
                </div>
            </div>
            <!-- END OF APPOINTMENT WRAPPER -->
        </div>
    </div>
}
@using (@Html.BeginForm())
    {
    <div id="dvNonMigrated">
        <div class="migrationHdr">
            <span>Not Migrated</span></div>
        <div class="contentWrapper contentWrapperHome">
            <!-- START OF APPOINTMENT WRAPPER -->
            <div class="PortalContentWrapper clinicalInform appointmentWrapperBackground">
                <div class="migration">
                    <ul class="notMigWidth">
                        <li><span class="label noTxtSelect">Last Name:</span>
                            @Html.TextBoxFor(model => model.NonMigratedSearchCriteria.LastName, new { @id = "txtLastName" })
                        </li>
                        <li><span class="label noTxtSelect">First Name:</span>
                            @Html.TextBoxFor(model => model.NonMigratedSearchCriteria.FirstName, new { @id = "txtFirstName" })
                        </li>
                        <li class="migrationSearch floatRight">
                            <button name="NotMigratedSearch" id="btnSearchNotMigrated">
                                Search</button>
                        </li>
                    </ul>
                </div>
                <div>
                    <div class="patientNavBarHeader noTxtSelect">
                        <ul>
                            <li>
                                <div class="noMigName">
                                    Name
                                </div>
                                <div class="patDob">
                                    DOB
                                </div>
                                <div class="patMigrationSsn">
                                    USERNAME
                                </div>
                                <div class="patMigrationDate noMigEmail">
                                    EMAIL
                                </div>
                                <div class="noMigResetPswd">
                                    RESET PASSWORD
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="patientNavBarGrid noTxtSelect">
                        <ul>
                            @if (Model != null)
                            {
                                if (Model.NonMigratedPatients != null)
                                {
                                    for (int i = 0; i < Model.NonMigratedPatients.Count; i++)
                                    {
                                <li>
                                    @if (!String.IsNullOrEmpty(Model.NonMigratedPatients[i].FirstName) || !String.IsNullOrEmpty(Model.NonMigratedPatients[i].LastName))
                                    {
                                        <div class="noMigName">
                                            @Html.LabelFor(model => model.NonMigratedPatients[i].LastName, Model.NonMigratedPatients[i].LastName + ", " + Model.NonMigratedPatients[i].FirstName)
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="noMigName">
                                             
                                        </div>
                                    }
                                    @if (Model.NonMigratedPatients[i].DateOfBirth != null)
                                    {
                                        <div class="patDob">
                                            @Html.LabelFor(model => model.NonMigratedPatients[i].DateOfBirth, Model.NonMigratedPatients[i].DateOfBirth != null ? Model.NonMigratedPatients[i].DateOfBirth.ToString("MM/dd/yyyy") : "")
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="patDob">
                                             
                                        </div>
                                    }
                                    @if (!String.IsNullOrEmpty(Model.NonMigratedPatients[i].UserName))
                                    {
                                        <div class="patMigrationSsn">
                                            @Html.LabelFor(model => model.NonMigratedPatients[i].UserName, Model.NonMigratedPatients[i].UserName)
                                        </div>
                                    }
                                    else
                                    {

                                        <div class="patMigrationSsn">
                                             
                                        </div>
                                    }
                                    @if (Model.NonMigratedPatients[i].Email != "")
                                    {
                                        <div class="patMigrationDate noMigEmail">
                                            @Html.LabelFor(model => model.NonMigratedPatients[i].Email, Model.NonMigratedPatients[i].Email != null ? Model.NonMigratedPatients[i].Email : "")
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="patMigrationDate noMigEmail">
                                             
                                        </div>
                                    }
                                    @*@if (!String.IsNullOrEmpty(Model.PatientAccounts[i].MedicalRecordNumber))
                                {*@
                                    <div class="noMigResetPswd">
                                        @Html.TextBoxFor(model => model.NonMigratedPatients[i].Password, new { @id = Model.NonMigratedPatients[@i].AccountID + "_patResetPwd", @class = "noMigResetPswd" })
                                    </div>
                                    @*  }*@ @*<button id="@Model.NonMigratedPatients[@i].AccountID btnNotNigratedUpdate @i" class="disableButton" name="UpdateNonMigratedPatientPassword">
                                        Update</button>*@
                                    <button id="@Model.NonMigratedPatients[@i].AccountID" disabled="disabled" class="disableButton" name="UpdateNonMigratedPatientPassword">
                                        Update</button>
                                </li>
                                    }
                                }
                            }
                        </ul>
                    </div>
                </div>
            </div>
            <!-- END OF APPOINTMENT WRAPPER -->
        </div>
    </div>
    }
<!-- END OF CONTENT WRAPPER -->
@helper AddScript(string scriptName)
    {
    <script src="@Url.Content("~/Scripts/" + scriptName)" type="text/javascript"></script>
}



Thease are only Div ul and li so can some one please tell me how to implement pagination for this.

Thanks,
Prasant
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900