#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.17929
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Disco.Web.Views.Job.JobParts
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Text;
    using System.Web;
    using System.Web.Helpers;
    using System.Web.Mvc;
    using System.Web.Mvc.Ajax;
    using System.Web.Mvc.Html;
    using System.Web.Routing;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.WebPages;
    using Disco.BI.Extensions;
    using Disco.Models.Repository;
    using Disco.Web;
    using Disco.Web.Extensions;
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
    [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Warranty.cshtml")]
    public class Warranty : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
    {
        public Warranty()
        {
        }
        public override void Execute()
        {
WriteLiteral("<div");

WriteLiteral(" id=\"jobDetailTab-Warranty\"");

WriteLiteral(" class=\"jobPart\"");

WriteLiteral(">\r\n    <table");

WriteLiteral(" id=\"jobNonWarrantyFinance\"");

WriteLiteral(">\r\n        <tr>\r\n            <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">\r\n                Warranty Provider\r\n            </th>\r\n            <td>\r\n");

WriteLiteral("                ");

            
            #line 9 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName));

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                ");

            
            #line 10 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                ");

            
            #line 11 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n                <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(">\r\n                    $(function () {\r\n                        document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n                            $(\'#Job_JobMetaWarrant" +
"y_ExternalName\'),\r\n                            \'Unknown\',\r\n                     " +
"       \'");

            
            #line 17 "..\..\Views\Job\JobParts\Warranty.cshtml"
                        Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'ExternalName\'\r\n                        );\r\n     " +
"               });\r\n                </script>\r\n            </td>\r\n        </tr>\r" +
"\n        <tr>\r\n            <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">\r\n                Warranty Logged\r\n            </th>\r\n            <td>\r\n");

WriteLiteral("                ");

            
            #line 29 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate));

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                ");

            
            #line 30 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n                <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
                    $(function () {
                        var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
                        document.DiscoFunctions.DateChangeHelper(
                        dateField,
                        'Unknown',
                        '");

            
            #line 37 "..\..\Views\Job\JobParts\Warranty.cshtml"
                     Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                        \'ExternalLoggedDate\',\r\n                        null\r\n" +
"                        );\r\n                    });\r\n                </script>\r\n" +
"            </td>\r\n        </tr>\r\n        <tr>\r\n            <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">\r\n                Warranty Reference\r\n            </th>\r\n            <td>\r\n");

WriteLiteral("                ");

            
            #line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference));

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                ");

            
            #line 51 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                ");

            
            #line 52 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n                <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(">\r\n                    $(function () {\r\n                        document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n                            $(\'#Job_JobMetaWarrant" +
"y_ExternalReference\'),\r\n                            \'Unknown\',\r\n                " +
"            \'");

            
            #line 58 "..\..\Views\Job\JobParts\Warranty.cshtml"
                        Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'ExternalReference\'\r\n                        );\r\n" +
"                    });\r\n                </script>\r\n            </td>\r\n        <" +
"/tr>\r\n        <tr>\r\n            <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">\r\n                Warranty Completed\r\n            </th>\r\n            <td>\r\n");

WriteLiteral("                ");

            
            #line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate));

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("                ");

            
            #line 71 "..\..\Views\Job\JobParts\Warranty.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n                <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
                    $(function () {
                        var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
                        document.DiscoFunctions.DateChangeHelper(
                        dateField,
                        'Unknown',
                        '");

            
            #line 78 "..\..\Views\Job\JobParts\Warranty.cshtml"
                     Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                        \'ExternalCompletedDate\',\r\n                        nul" +
"l\r\n                        );\r\n                    });\r\n                </script" +
">\r\n            </td>\r\n        </tr>\r\n        <tr");

WriteLiteral(" id=\"jobWarrantyProviderDetailContainer\"");

WriteLiteral(" style=\"display: none\"");

WriteLiteral(">\r\n            <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">\r\n                Provider Details\r\n            </th>\r\n            <td>\r\n       " +
"         <div");

WriteLiteral(" id=\"jobWarrantyProviderDetailLoading\"");

WriteLiteral(">\r\n                    <span");

WriteLiteral(" class=\"ajaxHelperIcon ajaxLoading\"");

WriteLiteral(" title=\"Loading...\"");

WriteLiteral("></span> Loading...\r\n                </div>\r\n                <div");

WriteLiteral(" id=\"jobWarrantyProviderDetailHost\"");

WriteLiteral(" class=\"clearfix\"");

WriteLiteral(" style=\"display: none\"");

WriteLiteral(">\r\n                </div>\r\n            </td>\r\n        </tr>\r\n    </table>\r\n</div>" +
"\r\n<script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
    $('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Warranty"">Warranty</a></li>');
    $(function () {
        var warrantyProviderDetailLoaded = false;

        $('#jobDetailTabs').on('tabsactivate', function (e, ui) {
            if ($(ui.newPanel).is('#jobDetailTab-Warranty')) {
                if (!warrantyProviderDetailLoaded) {
                    var warrantyExternalName = $('#Job_JobMetaWarranty_ExternalName').val();
                    if (warrantyExternalName) {
                        $('#jobWarrantyProviderDetailContainer').show();
                        $('#jobWarrantyProviderDetailLoading span').show();
                        $('#jobWarrantyProviderDetailHost').load(
                            '");

            
            #line 113 "..\..\Views\Job\JobParts\Warranty.cshtml"
                         Write(Url.Action(MVC.Job.WarrantyProviderJobDetails()));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            { id: \'");

            
            #line 114 "..\..\Views\Job\JobParts\Warranty.cshtml"
                               Write(Model.Job.Id);

            
            #line default
            #line hidden
WriteLiteral(@"' },
                            function () {
                                $('#jobWarrantyProviderDetailLoading').hide();
                                $(this).slideDown();
                            }
                        );

                        warrantyProviderDetailLoaded = true;
                    }
                }
            }
        });
    });
</script>
");

        }
    }
}
#pragma warning restore 1591
