mesutd0nmez
3/29/2017 - 7:54 AM

Custom Modal

Custom Modal

@{ Layout = null;}
@using Fuar.Models.Reports
@model IEnumerable<WebFuarRapor>
<style>
    .modal-lg {
        width: 100% !important;
    }

    .modal-xl {
        width: 80%;
        max-width:1200px;
    }

    .textalingleft {
        text-align:left !important;
    }

    .textalingright {
        text-align:right !important;
    }

</style>
<!-- Pharmacy Quate Report Detail Modal-->
<div class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-xl" role="document">
        <div class="modal-content">
            <div class="modal-header" style="background:#FB8C00 !important;">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" style="color:#FFF !important;">@ViewBag.Title</h4>
            </div>
            <div class="modal-body">
                <table id="datatable" class="table table-hover table-striped table-bordered" cellspacing="0" style="margin-bottom:0px !important">
                    <thead>
                        <tr>
                            <th style="width:25% !important;">@Html.DisplayNameFor(n => n.FIRMA)</th>
                            <th style="width:10% !important;">@Html.DisplayNameFor(n => n.ORDERSREF)</th>
                            <th style="width:35% !important;">@Html.DisplayNameFor(n => n.ITEMS_NAME)</th>
                            <th class="textalingright" style="width:10% !important;">@Html.DisplayNameFor(n => n.ITEMS_AMOUNT)</th>
                            <th class="textalingright" style="width:20% !important;">@Html.DisplayNameFor(n => n.TOTAL)</th>
                        </tr>
                    </thead>
                    <tbody>
                        @if (Model.Count() > 0 && Model != null)
                        {
                            foreach (WebFuarRapor item in Model)
                            {
                                <tr>
                                    <td class="textalingleft">@item.FIRMA</td>
                                    <td class="textalingleft">@item.ORDERSREF</td>
                                    <td class="textalingleft">@item.ITEMS_NAME</td>
                                    <td>@item.ITEMS_AMOUNT</td>
                                    <td style="width:15% !important;">@item.SATIR_TUTARI.ToString("##,##0.00")</td>
                                </tr>
                            }
                        }
                        else
                        {
                            <tr>
                                <td colspan="13">Herhangi bir kayıt bulunamadı</td>
                            </tr>
                        }
                    </tbody>
                    @if (Model.Count() > 0 && Model != null)
                    {
                        <tfoot>
                            <tr>
                                <!--
                                <td>@Html.DisplayNameFor(n => n.FIRMA)</td>
                                <td>@Html.DisplayNameFor(n => n.ORDERSREF)</td>
                                <td>@Html.DisplayNameFor(n => n.ITEMS_NAME)</td>
                                <td>@Html.DisplayNameFor(n => n.ITEMS_AMOUNT)</td> -->
                                <td colspan="4" style="color:red; text-align: right;"> GENEL TOPLAM : </td>
                                <td>@Model.Sum(n => n.SATIR_TUTARI).ToString("##,##0.00")</td>
                            </tr>
                        </tfoot>
                    }

                </table>
                <!--data table-->
            </div>
            <div class="modal-footer">
                @*<button type="button" class="btn btn-danger" aria-label="Left Align" onclick="htmltoExcel('datatable')" title="Excel Dökümünü İndiriniz">Excel Dökümü</button>*@
                <button type="button" class="btn btn-default" data-dismiss="modal">Kapat</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<!-- /Pharmacy Quate Report Detail Modal-->
<!--Pharmacy Quata Report Scripts-->
@section scripts{
    <script src="~/Scripts/document/htmltoExcel.js"></script>
}
<script>
    $('.modal').modal('show');
</script>