initial add
This commit is contained in:
48
Fab2ApprovalSystem/Views/Reports/Index.cshtml
Normal file
48
Fab2ApprovalSystem/Views/Reports/Index.cshtml
Normal file
@ -0,0 +1,48 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Reports";
|
||||
}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 24px; font-weight:bold; color: crimson">
|
||||
Reports
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="reportslistdiv" class="k-content" style="font-size: 16px">
|
||||
@if (ViewBag.HasITARAccess == false)
|
||||
{
|
||||
<span>ITAR access is required for reports</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ReportViewModel>()
|
||||
.Name("reportslist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(m => m.ReportName).Width("30%").ClientTemplate("<a href='" + @Url.Action("Report", "Reports") + "/#=ReportID#'>#=ReportName#</a>");
|
||||
columns.Bound(m => m.Description);
|
||||
})
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Read(read => read.Action("GetReports", "Reports"))
|
||||
.Events(events => events.Error("getReportsError"))
|
||||
)
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function getReportsParms() {
|
||||
return {
|
||||
docType: "",
|
||||
};
|
||||
};
|
||||
function getReportsError(e, status) {
|
||||
alert("A server error has occurred: " + e.errorThrown);
|
||||
}
|
||||
</script>
|
73
Fab2ApprovalSystem/Views/Reports/Report.cshtml
Normal file
73
Fab2ApprovalSystem/Views/Reports/Report.cshtml
Normal file
@ -0,0 +1,73 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.ReportViewModel
|
||||
@{
|
||||
ViewBag.Title = "Report " + @Model.ReportName;
|
||||
}
|
||||
|
||||
<form action='@Url.Action("ExportReport")' method="post" id="reportform" target="_blank">
|
||||
<input type="hidden" id="DocType" name="DocType" value="@Model.DocType" />
|
||||
<input type="hidden" id="ReportID" name="ReportID" value="@Model.ReportID" />
|
||||
|
||||
<style>
|
||||
.k-multiselect {
|
||||
width: 100%;
|
||||
}
|
||||
.parminput {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<font style="color: crimson; font-size:24px;font-weight: bolder">
|
||||
@Model.ReportName
|
||||
</font>
|
||||
</div>
|
||||
<div class="row">
|
||||
@Model.Description
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-body">
|
||||
@foreach (var parm in Model.Parameters)
|
||||
{
|
||||
if (parm.Visible)
|
||||
{
|
||||
<div class="row" style="padding-bottom: 0.5em;">
|
||||
<div class="col-sm-2">@parm.Prompt</div>
|
||||
<div class="col-sm-10">
|
||||
@if (parm.ControlType == Fab2ApprovalSystem.ViewModels.ParameterControlTypes.Multiselect)
|
||||
{
|
||||
@(Html.Kendo().MultiSelect().Name(parm.HtmlID).BindTo(parm.SelectList))
|
||||
}
|
||||
else if (parm.ControlType == Fab2ApprovalSystem.ViewModels.ParameterControlTypes.Dropdown)
|
||||
{
|
||||
@(Html.Kendo().DropDownList().Name(parm.HtmlID).BindTo(parm.SelectList))
|
||||
}
|
||||
else if (parm.ControlType == Fab2ApprovalSystem.ViewModels.ParameterControlTypes.DatePicker)
|
||||
{
|
||||
@(Html.Kendo().DatePicker().Name(parm.HtmlID).Format("MM/dd/yyyy"))
|
||||
}
|
||||
else
|
||||
{
|
||||
@(Html.Kendo().AutoComplete().Name(parm.HtmlID))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div class="row">
|
||||
<div class="col-sm-12" id="divSubmit">
|
||||
<input type="submit" class="btn-success" value="Export to Excel" id="btnSubmit" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
</script>
|
||||
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user