Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model Aims.Areas.ModProject.ViewModels.ProjectDetail
- @{
- Layout = null;
- Response.AddHeader("content-disposition", "attachment;filename=ProjectListRepository_" + DateTime.Now.ToString(@"dd\/MM\/yyyy") + "." + ViewBag.fileExtension);
- Response.Cache.SetCacheability(HttpCacheability.NoCache);
- Response.ContentType = "application/" + ViewBag.contentType;
- ViewBag.Title = "ExportData";
- int i = 0;
- string classval = "";
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>Print Project Detail Excel</title>
- <script src="~/Scripts/jquery-1.8.3.js"></script>
- <script src="~/Scripts/jquery-ui-1.9.2.custom.min.js"></script>
- <link href="~/Content/ui-lightness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" />
- <script type="text/javascript">
- $(document).ready(function () {
- $(".btnAdd").button({
- icons: {
- primary: "ui-icon-circle-plus"
- },
- text: false,
- label: "Add"
- });
- $(".btnEdit").button({
- icons: {
- primary: "ui-icon-circle-check"
- },
- text: false,
- label: "Save"
- });
- });
- </script>
- <script type="text/javascript">
- $(document).ready(function () {
- $(".sdName").autocomplete({
- source: function (request, response) {
- $.ajax({
- url: "../Project/LoadStrategicDirections",
- type: "POST",
- dataType: "json",
- data: { term: request.term },
- success: function (data) {
- response($.map(data, function (item) {
- return { label: item.sdName, value: item.sdName, strategicDirectionId: item.strategicDirectionId };
- }))
- }
- })
- },
- minLength: 3,
- select: function (event, ui) {
- var inp = $('.strategicDirectionId');
- var index = inp.index(".sdName");
- $(inp[index + 1]).val(ui.item.strategicDirectionId);
- }
- });
- $(".countryName").autocomplete({
- source: function (request, response) {
- $.ajax({
- url: "../Project/LoadCountries",
- type: "POST",
- dataType: "json",
- data: { term: request.term },
- success: function (data) {
- response($.map(data, function (item) {
- return { label: item.countryName, value: item.countryName, countryId: item.countryId };
- }))
- }
- })
- },
- minLength: 3,
- select: function (event, ui) {
- var inp = $('.Id');
- var index = inp.index(".countryName");
- $(inp[index + 1]).val(ui.item.countryId);
- }
- });
- $(".donorName").autocomplete({
- source: function (request, response) {
- $.ajax({
- url: "../ProjectDetail/LoadDonors",
- type: "POST",
- dataType: "json",
- data: { term: request.term },
- success: function (data) {
- response($.map(data, function (item) {
- return { label: item.donorName, value: item.donorName, donorId: item.donorId };
- }))
- }
- })
- },
- minLength: 3,
- select: function (event, ui) {
- var inp = $('.donorId');
- var index = inp.index(".donorName");
- $(inp[index + 1]).val(ui.item.donorId);
- }
- });
- $(".officeName").autocomplete({
- source: function (request, response) {
- $.ajax({
- url: "../ProjectDetail/LoadOffices",
- type: "POST",
- dataType: "json",
- data: { term: request.term },
- success: function (data) {
- response($.map(data, function (item) {
- return { label: item.officeNamme, value: item.officeNamme, amrefOfficeId: item.amrefOfficeId };
- }))
- }
- })
- },
- minLength: 3,
- select: function (event, ui) {
- var inp = $('.amrefOfficeId');
- var index = inp.index(".officeName");
- $(inp[index + 1]).val(ui.item.amrefOfficeId);
- }
- });
- $(".locName").autocomplete({
- source: function (request, response) {
- $.ajax({
- url: "../ProjectDetail/LoadLocations",
- type: "POST",
- dataType: "json",
- data: { term: request.term },
- success: function (data) {
- response($.map(data, function (item) {
- return { label: item.LocationName, value: item.LocationName, locationId: item.locationId };
- }))
- }
- })
- },
- minLength: 3,
- select: function (event, ui) {
- var inp = $('.locationId');
- var index = inp.index(".locName");
- $(inp[index + 1]).val(ui.item.locationId);
- }
- });
- $(".openDialog").button({
- icons: {
- primary: "ui-icon-trash"
- },
- text: false,
- label: "Delete Item"
- });
- })
- </script>
- <script type="text/javascript">
- $.ajaxSetup({ cache: false });
- $(document).ready(function () {
- $(".openDialog").live("click", function (e) {
- e.preventDefault();
- $("<div></div>")
- .addClass("dialog")
- .attr("id", $(this).attr("data-dialog-id"))
- .appendTo("body")
- .dialog({
- title: $(this).attr("data-dialog-title"),
- close: function () { $(this).remove() },
- modal: true,
- height: 500,
- width: 600,
- left: 0
- })
- .load(this.href);
- });
- $(".close").live("click", function (e) {
- e.preventDefault();
- $(this).closest(".dialog").dialog("close");
- });
- });
- </script>
- <script type="text/javascript">
- $(document).ready(function () {
- $("#dialog").dialog();
- })
- jQuery(function ($) {
- var focusedElementId = "";
- var prm = Sys.WebForms.PageRequestManager.getInstance();
- prm.add_beginRequest(function (source, args) {
- var fe = document.activeElement;
- if (fe != null) {
- focusedElementId = fe.id;
- } else {
- focusedElementId = "";
- }
- });
- prm.add_endRequest(function (source, args) {
- if (focusedElementId != "") {
- $("#" + focusedElementId).focus();
- }
- });
- });
- </script>
- <script type="text/javascript">
- //$(document).ready(function () {
- // $("#projectLesson").submit(function () {
- // var f = $("#projectLesson");
- // var action = f.attr("action");
- // var serializedForm = f.serialize();
- // $.post(action, serializedForm,
- // function (data) {
- // $("#ajaxDiv").html(data.Text);
- // });
- // return false;
- // });
- //});
- $(document).ready(function () {
- // Hide the "busy" Gif at load:
- //$("#divProcessing").hide();
- // Attach click handler to the submit button:
- $("#process").click(function () {
- $("#projectLesson").submit();
- });
- // Handle the form submit event, and make the Ajax request:
- })
- </script>
- <p>
- </p>
- <div class="panel panel-default">
- <div class="panel-heading"><strong>Project Profile</strong></div>
- <div class="panel-body" style="font-size:small">
- @if (TempData["SuccessMessage"] != null)
- {
- <div class="alert alert-success alert-dismissable">
- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
- <strong>@TempData["SuccessMessage"]</strong>
- </div>
- }
- @if (TempData["FailMessage"] != null)
- {
- <div class="alert alert-danger alert-dismissable">
- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
- <strong>@TempData["FailMessage"]</strong>
- </div>
- }
- @if (TempData["WarningMessage"] != null)
- {
- <div class="alert alert-warning alert-dismissable">
- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
- <strong>@TempData["WarningMessage"]</strong>
- </div>
- }
- <div class="panel panel-default">
- <div class="panel-heading"><strong>PROJECT BASIC INFO</strong></div>
- <table style="width:100%;font-size:small" class="table table-striped">
- <tr>
- <th>
- Project Description
- </th>
- @{
- ViewBag.projectId = Model.project.Id;
- }
- </tr>
- <tr>
- <td>
- <table class="table table-bordered">
- <tr>
- <th>Project short Title</th>
- <td>@Html.DisplayFor(modelItem => Model.project.projectShortTitle)</td>
- <th>Project Official/Long Title</th>
- <td colspan="3">@Html.DisplayFor(modelItem => Model.project.projectLongTitle)</td>
- </tr>
- <tr>
- <th>Description</th>
- <td colspan="5">@Html.DisplayFor(modelItem => Model.project.projectDescription)</td>
- </tr>
- <tr>
- <th>Goal</th>
- <td colspan="5">@Html.DisplayFor(modelItem => Model.project.projectGoal)</td>
- </tr>
- <tr>
- <th>Open Date</th>
- <td>@Html.DisplayFor(modelItem => Model.project.startDate)</td>
- <th>Close Date</th>
- <td>@Html.DisplayFor(modelItem => Model.project.endDate)</td>
- <th>Current Status</th>
- <td>@Html.DisplayFor(modelItem => Model.project.projectStatuses.projectStatusName)</td>
- </tr>
- <tr>
- <th>Overall Budget</th>
- <td>@Html.DisplayFor(modelItem => Model.project.totalBudget) @Html.DisplayFor(modelItem => Model.project.currencyType)</td>
- <th>Receient Type</th>
- <td>@Html.DisplayFor(modelItem => Model.project.projectRecepientTypes.recepientTypeName)</td>
- <th>Donors</th>
- <td>
- @foreach (var item in Model.donors)
- {
- @item.Donors.donorName
- <br />
- }
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>Administrative Information</th>
- </tr>
- <tr>
- <td>
- <table class="table table-bordered">
- <tr>
- <th>Project Manager</th>
- <td><a href="mailto:@Html.DisplayFor(modelItem=>Model.project.managerEmail)" style="color:blue">@Html.DisplayFor(modelItem => Model.project.Persons.FullName)</a></td>
- <th>Cost Centre</th>
- <td>@Html.DisplayFor(modelItem => Model.project.costCentre)</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>Project Objectives</th>
- </tr>
- <tr>
- <td>
- <table class="table table-bordered">
- @foreach (var item in Model.projectObjectives)
- {
- <tr>
- <td>
- @item.projectObjectiveName
- </td>
- </tr>
- }
- </table>
- </td>
- </tr>
- <tr>
- <th>Project Budget: Total @Html.DisplayFor(modelItem => Model.project.totalBudget) @Html.DisplayFor(model => Model.project.currencyType)</th>
- </tr>
- <tr>
- <td>
- <table class="table table-bordered">
- <tr>
- <td colspan="5" align="left"><b>Annual Budgets</b></td>
- </tr>
- <tr>
- <th>
- FINANCIAL YEAR
- </th>
- <th> Currency</th>
- <th colspan="2">
- AMOUNT
- </th>
- </tr>
- @foreach (var item in Model.annualBudgets)
- {
- <tr>
- <td style="width:45%">
- @item.FinancialYears.financialYearName
- </td>
- <td style="width:15%">
- @item.currencyType
- </td>
- <td style="width:30%">
- @item.amount
- </td>
- </tr>
- }
- </table>
- </td>
- </tr>
- <tr>
- <th>Project Stakeholders</th>
- </tr>
- <tr>
- <td>
- <table class="table table-bordered">
- <tr>
- <th colspan="3">Donors</th>
- </tr>
- <tr>
- <td>
- <b>
- DONOR NAME
- </b>
- </td>
- <td style="width:30%"><b>Donor Type</b></td>
- </tr>
- @foreach (var item in Model.donors)
- {
- <tr>
- <td style="width:88%">
- @item.Donors.donorName
- </td>
- <td style="width:5%">
- @item.Donors.DonorCategoryTypes.categoryName
- </td>
- </tr>
- }
- </table>
- <table class="table table-bordered">
- <tr>
- <th colspan="5">Project Co-Recepients(Prime recepients, sub-recepients etc) </th>
- </tr>
- <tr>
- <td><b>Name of Co-Recepient</b></td>
- <td><b>Amount Received</b></td>
- <td><b>Type of Recepient</b></td>
- </tr>
- @foreach (var item in Model.projectCoRecepients)
- {
- <tr>
- <td>
- @item.projectCoRecepientName
- </td>
- <td>@item.AmountReceived ( @item.Currency )</td>
- <td>@item.ProjectRecepientTypes.recepientTypeName</td>
- </tr>
- }
- </table>
- <table class="table table-bordered">
- <tr>
- <th style="width:11%" colspan="3">
- Other Partners(eg MOH, etc)
- </th>
- </tr>
- </td>
- <tr>
- <td>
- <b> Partner Name</b>
- </td>
- </tr>
- @foreach (var item in Model.projectPartners)
- {
- <tr>
- <td style="width:94%">
- @item.partnerName
- </td>
- </tr>
- }
- </table>
- <tr>
- <th>Stakeholder Offices</th>
- </tr>
- <tr>
- <td>
- <div class="panel panel-default" style="width:49%;float:left;overflow:hidden">
- <div class="panel-heading"><strong>PROJECT IMPLEMENTING OFFICES</strong></div>
- <div class="panel-body" style="font-size:small">
- <table style="width:100%">
- <tr valign="top">
- <td style="width:0%">
- <label for="name" style="width:auto"><b>PROJECT IMPLEMENTING OFFICE: </b></label>
- </td>
- <td style="width:89%">
- <table style="width:100%" class="table table-bordered" id="">
- <thead>
- <tr>
- <th>
- OFFICE NAME
- </th>
- <th>Programme</th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model.implementingOffices)
- {
- <tr>
- <td style="width:90%">
- @item.AmrefOffices.amrefOfficeName
- </td>
- <td style="width:5%">
- <ol>
- @foreach (var prog in Model.getProjectOfficeProgrammes(@item.AmrefOffices.Id, Model.project.Id))
- {
- <li>@prog.programme</li>
- }
- </ol>
- </td>
- </tr>
- }
- </tbody>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="panel panel-default" style="width:49%;float:right;overflow:hidden">
- <div class="panel-heading"><strong>PROJECT SUPPORTING OFFICES</strong></div>
- <div class="panel-body" style="font-size:small">
- <table style="width:100%">
- <tr>
- <td style="width:11%">
- <label for="name" style="width:auto"><b>SUPPORT OFFICE: </b></label>
- </td>
- <td style="width:89%">
- <table style="width:100%" class="table table-bordered" id="">
- <thead>
- <tr>
- <th>
- OFFICE NAME
- </th>
- <th>
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model.supportOffices)
- {
- <tr>
- <td style="width:90%">
- @item.AmrefOffices.amrefOfficeName
- </td>
- <td style="width:5%">
- <ol>
- @foreach (var prog in Model.getProjectOfficeProgrammes(@item.AmrefOffices.Id, @Model.project.Id))
- {
- <li>@prog.programme</li>
- }
- </ol>
- </td>
- </tr>
- }
- </tbody>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td>Project Staff Members</td>
- </tr>
- <tr>
- <td>
- <table class="table table-bordered">
- <tr>
- <th> Name</th>
- <th>Photo</th>
- <th>Role</th>
- <th>Status</th>
- </tr>
- @foreach (var item in Model.projectMembers)
- {
- <tr>
- <td>@item.People.FullName</td>
- <td>@item.photo</td>
- <td>@item.ProjectRoles.role</td>
- @if (item.active == true)
- {
- <td>Active</td>
- }
- else
- {
- <td>Deactivated</td>
- }
- </tr>
- }
- </table>
- </td>
- </tr>
- </table>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement