Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @using Lss.Extensions;
- @using Lss.Security;
- @using Application.Models
- @using Mindscape.LightSpeed
- @model Application.Models.Reservation
- @Html.AntiForgeryToken()
- @Html.HiddenFor(model => model.Id)
- @Html.HiddenFor(model => model.LockVersion)
- @Html.HiddenFor(model => model.OrganizationId)
- @Html.HiddenFor(model => model.SiteId)
- @Html.HiddenFor(model => model.Trips[0].Id)
- @Html.Hidden("Trips[0].Origin_SegmentId", Model.Trips[0].Origin_Segment.EntityState != EntityState.New ? Model.Trips[0].Origin_SegmentId.ToString() : String.Empty)
- @Html.Hidden("Trips[0].Destination_SegmentId", Model.Trips[0].Destination_Segment.EntityState != EntityState.New ? Model.Trips[0].Destination_SegmentId.ToString() : String.Empty)
- @Html.Hidden("Trips[0].TripNo", "123")
- <script type="text/javascript">
- var originStreetSegmentUrl = '@Url.Action("_GetOriginStreetSegment")';
- var originLandmarkSegmentUrl = '@Url.Action("_GetOriginLandmarkSegment")';
- var destinationStreetSegmentUrl = '@Url.Action("_GetDestinationStreetSegment")';
- var destinationLandmarkSegmentUrl = '@Url.Action("_GetDestinationLandmarkSegment")';
- var contactUrl = '@Url.Action("Add", "Contact")';
- var contactPhoneUrl = '@Url.Action("_GetContactPhoneNumber")';
- var contactByNameAndPhoneNumber = '@Url.Action("_GetContactByNameAndPhoneNumber")';
- var tempTripPriceUrl = '@Url.Action("Estimate", "Trip_PriceTemp")';
- var siteIDinput='@Html.HiddenFor(model => model.SiteId)';
- var siteID=siteIDinput.substr(siteIDinput.lastIndexOf("=")+2,36);
- var originSegmentData = @(Html.Raw(ViewData["OriginSegmentInfo"].ToString()));
- var destinationSegmentData = @(Html.Raw(ViewData["DestinationSegmentInfo"].ToString()));
- </script>
- <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
- <link href="https://webservices.tranware.net/SaaS/customJS/standard.css" rel="stylesheet">
- <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyDYvzQccmiWpQFxG0os_ETJbT3njSb48Kc&libraries=places"></script>
- <script src="https://webservices.tranware.net/SaaS/customJS/SASK.js"></script>
- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
- <table style="margin: 0 auto;">
- <tr>
- <td>
- <table class="l-fields" style=" height: 300px;">
- <tr>
- <td class="l-label" colspan="4" style="text-align: center;">R E S E R V A T I O N </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.ReservationNo)</td>
- <td class="l-field">@Html.Lss().Span().Name("ReservationNo").Text("Pending")</td>
- </tr>
- <tr>
- <td class="l-label"></td>
- <td>
- <input id="profileSearch" placeholder="Profile search" tabindex = '1' class="k-textbox" type="text" />
- </td>
- </tr>
- <tr>
- <td class="l-label">
- </td>
- <td class="l-field">
- <input id="contactSearch" placeholder="Contact search" class="k-textbox" type="text"/>
- <div style="display: none;">
- @(Html.Lss().ComboBoxFor(model => model.ContactId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListContactId", "Reservation", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Contact).Events(e => e.Change("selectPassenger_Contact")).HtmlAttributes(new {style = "display: none;", TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.ContactId)
- @Html.ValidationMessageFor(model => model.ContactId)
- </div>
- </td>
- <td class="l-label" colspan="2">
- @(Html.Lss().Button()
- .Name("btnAddContact")
- .OnClick("btnAddContact_Click('ContactId')")
- .InputType("button")
- .Text("Add New Contact").HtmlAttributes(new { TabIndex = -1 }))
- @(Html.Lss().Button()
- .Name("btnPreviousTrips")
- .Text("Lookup Existing Trips")
- .InputType("button")
- .HtmlAttributes(new { TabIndex = 2 })
- .OnClick(string.Format(
- @"$.lss.window.openPopup(
- {{
- url : '{0}' + '?Passenger_ContactId=' + $('#ContactId').val(),
- close: lookupClose
- }});",
- Url.Action("LookupPreviousTrips", "Grid", new
- {
- virtualAction = "LookupPreviousTrips"
- })
- )))
- </td>
- </tr>
- <tr>
- <td class="l-label">Contact Phone #</td>
- <td class="l-field">
- @(Html.Lss().TextBox().Name("PhoneNo").HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Contact.Phone)
- @Html.ValidationMessageFor(model => model.Contact.Phone)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.RateId)</td>
- <script>
- //E2G Mark - The functions in this script tag were added to facilitate the automatic setting of Rate defaults and any associated Trip Priority
- function rateIdDataSourceChange() {
- updateRateIdDefaults();
- }
- function rateIdChange(e) {
- var rateComboBox = $("#RateId").data("kendoComboBox");
- var tripPriorityComboBox = $("#Trips_0__TripPriorityId").data("kendoComboBox");
- tripPriorityComboBox.value(null);
- tripPriorityComboBox.trigger("change");
- tripPriorityComboBox.dataSource.fetch().then(function(value) {
- if (rateComboBox.dataItem() && rateComboBox.dataItem().TripPriorityId !== "00000000-0000-0000-0000-000000000000") { //Implies no TripPriorityId was present itn the Rate table
- tripPriorityComboBox.value(rateComboBox.dataItem().TripPriorityId);
- tripPriorityComboBox.trigger("change");
- } else {
- tripPriorityComboBox.value(null);
- tripPriorityComboBox.trigger("change");
- }
- });
- }
- function updateRateIdDefaults() {
- var rateComboBox = $("#RateId").data("kendoComboBox");
- var dataItems = rateComboBox.dataSource.data();
- if (rateComboBox.text() == "") {
- for (i = 0; i<dataItems.length; i++) {
- if (dataItems[i].IsDefault) {
- rateComboBox.value(dataItems[i].Value);
- var tripPriorityComboBox = $("#Trips_0__TripPriorityId").data("kendoComboBox");
- tripPriorityComboBox.value(null);
- tripPriorityComboBox.trigger("change");
- tripPriorityComboBox.dataSource.fetch().then(function(value) {
- var tpDataItems = tripPriorityComboBox.dataSource.data();
- if (dataItems[i].TripPriorityId !== "00000000-0000-0000-0000-000000000000") { //Implies no TripPriorityId was present itn the Rate table
- tripPriorityComboBox.value(dataItems[i].TripPriorityId);
- tripPriorityComboBox.trigger("change");
- }else {
- tripPriorityComboBox.value(null);
- tripPriorityComboBox.trigger("change");
- }
- });
- break;
- }
- }
- }
- }
- function accountChange() {
- var rateComboBox = $("#RateId").data("kendoComboBox");
- if (rateComboBox) {
- rateComboBox.value(null);
- rateComboBox.trigger('change');
- rateComboBox.dataSource.fetch();
- }
- var tripPriorityComboBox = $("#Trips_0__TripPriorityId").data("kendoComboBox");
- if (tripPriorityComboBox) {
- tripPriorityComboBox.dataSource.fetch();
- }
- }
- </script>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.RateId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListRateId", "Reservation", Request.QueryString.ToRouteValueDictionary()))
- .Events(events => events.Change("rateIdDataSourceChange"))) //E2G Mark - Added to help set default values for Rate and TripPriority
- .Events(events => events.Change("rateIdChange")) //E2G Mark - Added to help set default values for Rate and TripPriority
- .DefaultValue(Model.Rate)
- .HtmlAttributes(new { TabIndex = -1 }))
- @*.HtmlAttributes(new { TabIndex = 9, style = "color: red;" }).SelectedIndex(2))*@
- @Html.Lss().RequiredFieldIndicatorFor(model => model.RateId)
- @Html.ValidationMessageFor(model => model.RateId)
- </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Account_ContactId)</td>
- <td class="l-field">
- <div style="display: none;">
- <input id="accountSearch" placeholder="Account search" class="k-textbox" type="text"/>
- </div>
- @(Html.Lss().ComboBoxFor(model => model.Account_ContactId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListAccount_ContactId", "Reservation", Request.QueryString.ToRouteValueDictionary())))
- .Events(events => events.Change("accountChange")) //E2G Mark - Added to help set default values for Rate and TripPriority
- .DefaultValue(Model.Account_Contact).HtmlAttributes(new {TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Account_ContactId)
- @Html.ValidationMessageFor(model => model.Account_ContactId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.ReservationDate)</td>
- <td class="l-field">
- @(Html.Lss().DatePickerFor(model => model.ReservationDate).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.ReservationDate)
- @Html.ValidationMessageFor(model => model.ReservationDate)
- </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Passenger_ContactId)</td>
- <td class="l-field">
- <input id="passengerSearch" placeholder="Passenger search" class="k-textbox" type="text"/>
- <div style="display: none;">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Passenger_ContactId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListPassenger_ContactId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Passenger_Contact).HtmlAttributes(new {TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Passenger_ContactId)
- @Html.ValidationMessageFor(model => model.Trips[0].Passenger_ContactId)
- </div>
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.ReservationStatusId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.ReservationStatusId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListReservationStatusId", "Reservation", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.ReservationStatus).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.ReservationStatusId)
- @Html.ValidationMessageFor(model => model.ReservationStatusId)
- </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Name)</td>
- <td class="l-field">
- @(Html.Lss().TextBoxFor(model => model.Name).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Name)
- @Html.ValidationMessageFor(model => model.Name)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.ReservationTypeId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.ReservationTypeId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListReservationTypeId", "Reservation", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.ReservationType).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.ReservationTypeId)
- @Html.ValidationMessageFor(model => model.ReservationTypeId)
- </td>
- </tr>
- </table>
- </td>
- <td>
- <table class="l-fields" style=" height: 300px;">
- <tr>
- <td class="l-label" colspan="4" style="text-align: center;">T R I P </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].TripNo)</td>
- <td class="l-field">@Html.Lss().Span().Name("TripNo").Text("Pending")</td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].DriverId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].DriverId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListDriverId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Driver).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].DriverId)
- @Html.ValidationMessageFor(model => model.Trips[0].DriverId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].VehicleTypeId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].VehicleTypeId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListVehicleTypeId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].VehicleType).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].VehicleTypeId)
- @Html.ValidationMessageFor(model => model.Trips[0].VehicleId)
- </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].TripAreaId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].TripAreaId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListTripAreaId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].TripArea).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].TripAreaId)
- @Html.ValidationMessageFor(model => model.Trips[0].TripAreaId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].VehicleId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].VehicleId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListVehicleId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Vehicle).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].VehicleId)
- @Html.ValidationMessageFor(model => model.Trips[0].VehicleId)
- </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].TripPriorityId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].TripPriorityId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListTripPriorityId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].TripPriority).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].TripPriorityId)
- @Html.ValidationMessageFor(model => model.Trips[0].TripPriorityId)
- </td>
- <td class="l-label">Mileage</td>
- <td class="l-field">
- @(Html.Lss().NumericTextBoxFor(model => model.Trips[0].TripMileage)
- .Format("#.0")
- .HtmlAttributes(new { TabIndex = -1 })
- )
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].TripMileage)
- @Html.ValidationMessageFor(model => model.Trips[0].TripMileage)
- </td>
- </tr>
- <tr>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].TripStatusId)</td>
- <td class="l-field">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].TripStatusId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListTripStatusId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].TripStatus).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].TripStatusId)
- @Html.ValidationMessageFor(model => model.Trips[0].TripStatusId)
- </td>
- <td class="l-label">@Html.Lss().Label("Trip Estimate")</td>
- <td class="l-label">
- <span class="l-trip-cost"></span>
- @(Html.Lss().Button()
- .Name("btnGetPriceEstimate")
- .OnClick("btnGetPriceEstimate_Click()")
- .InputType("button")
- .Text("Get Trip Estimate").HtmlAttributes(new { TabIndex = -1 }))
- </td>
- </tr>
- <tr>
- <td style="text-align: left;" class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].AdditionalPassengers)</td>
- <td class="l-field" colspan="3">
- @(Html.Lss().TextAreaFor(model => model.Trips[0].AdditionalPassengers)
- .AddCssClass("k-input l-input-fs-wide").HtmlAttributes(new { TabIndex = 8, style = "width:100%;height:2.13em;" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].AdditionalPassengers)
- @Html.ValidationMessageFor(model => model.Trips[0].AdditionalPassengers)
- </td>
- </tr>
- <tr>
- <td style="text-align: left;" class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Description)</td>
- <td class="l-field" colspan="3">
- @(Html.Lss().TextAreaFor(model => model.Trips[0].Description)
- .AddCssClass("k-input l-input-fs-wide").HtmlAttributes(new { TabIndex = 8, style = "width:100%;height:2.13em;" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Description)
- @Html.ValidationMessageFor(model => model.Trips[0].Description)
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <table class="l-fields" style="margin: unset; width: 100%;">
- <tr>
- <td class="l-label" colspan="4" style="text-align: center;">
- <h1>Origin</h1>
- </td>
- <td class="l-label" colspan="4" style="text-align: center;">
- <h1>Destination</h1>
- </td>
- </tr>
- <tr>
- <td colspan="4" style="margin:10px;">
- <input id="jqautocomplete" placeholder="location to search" tabindex="3" class="k-textbox" type="text"/>
- <input id="searchTextField" type="text" placeholder="Search Origin Address" class="k-textbox" style="display:none; width:100%;">
- </td>
- <td colspan="4" style="margin:10px;">
- <input id="jqautocompleteDestination" placeholder="location to search" tabindex="6" class="k-textbox" type="text"/>
- <input id="destinationSearchTextField" type="text" placeholder="Search Destination Address" class="k-textbox" style="display:none; width: 100%;">
- </td>
- </tr>
- <tr style="height:90px; margin:16px;">
- <td colspan="4" id="pickupDisplay" >
- </td>
- <td colspan="4" id="dropoffDisplay">
- </td>
- </tr>
- <tr style="" id="">
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].OriginScheduledDate)</td>
- <td class="l-field">
- @(Html.Lss().DateTimePickerFor(model => model.Trips[0].OriginScheduledDate)
- .Interval(15)
- .HtmlAttributes(new { TabIndex = 4 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].OriginScheduledDate)
- @Html.ValidationMessageFor(model => model.Trips[0].OriginScheduledDate)
- </td>
- <td class="l-label">
- <div id="tripCount" style=" position: fixed; margin-left: 10px; font-size: 18px; color: black;"> </div>
- <span>@Html.Lss().LabelFor(model => model.Trips[0].Origin_AddressLine3)</span></td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].Origin_AddressLine3).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_AddressLine3)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_AddressLine3)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].DestinationScheduledDate)</td>
- <td class="l-field">
- @(Html.Lss().DateTimePickerFor(model => model.Trips[0].DestinationScheduledDate)
- .Interval(15)
- .HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].DestinationScheduledDate)
- @Html.ValidationMessageFor(model => model.Trips[0].DestinationScheduledDate)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_AddressLine3)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].Destination_AddressLine3).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_AddressLine3)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_AddressLine3)
- </td>
- </tr>
- <tr style="">
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_Landmark)</td>
- <td class="l-field TripValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Origin_LandmarkId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListOriginLandmarkSegmentId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .Events(events => events
- .Change("populateOriginFromLandmarkSegment"))
- .DefaultValue(Model.Trips[0].Origin_Landmark).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_LandmarkId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_LandmarkId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].OriginPhone)</td>
- <td class="l-field OriginLandmarkValues PickUpValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].OriginPhone).HtmlAttributes(new { TabIndex = -1, id = "OriginPhone" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].OriginPhone)
- @Html.ValidationMessageFor(model => model.Trips[0].OriginPhone)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_Landmark)</td>
- <td class="l-field TripValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_LandmarkId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListDestinationLandmarkSegmentId", "Trip", Request.QueryString.ToRouteValueDictionary())))
- .Events(events => events
- .Change("populateDestinationFromLandmarkSegment"))
- .DefaultValue(Model.Trips[0].Destination_Landmark).HtmlAttributes(new { TabIndex = -1}))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_LandmarkId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_LandmarkId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].DestinationPhone)</td>
- <td class="l-field OriginLandmarkValues PickUpValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].DestinationPhone).HtmlAttributes(new { TabIndex = -1, id = "DestinationPhone" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].DestinationPhone)
- @Html.ValidationMessageFor(model => model.Trips[0].DestinationPhone)
- </td>
- </tr>
- <tr style="">
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].OriginRouteCode)</td>
- <td class="l-field OriginLandmarkValues PickUpValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].OriginRouteCode).HtmlAttributes(new { TabIndex = -1, id = "OriginRouteCode" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].OriginRouteCode)
- @Html.ValidationMessageFor(model => model.Trips[0].OriginRouteCode)
- </td>
- <td style="display:none;" class="l-field OriginLandmarkValues PickUpValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].OriginLatitude)
- .HtmlAttributes(new { TabIndex = -1, style = "width=50%; border-style: hidden; background-color:transparent" })
- .ReadOnly(true))
- @(Html.Lss().TextBoxFor(model => model.Trips[0].OriginLongitude)
- .HtmlAttributes(new { TabIndex = -1, style = "width=50%; border-style: hidden; background-color:transparent" })
- .ReadOnly(true))
- </td>
- <td></td>
- <td></td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].DestinationRouteCode)</td>
- <td class="l-field DestinationLandmarkValues DropOffValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].DestinationRouteCode).HtmlAttributes(new { TabIndex = -1, id = "DestinationRouteCode" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].DestinationRouteCode)
- @Html.ValidationMessageFor(model => model.Trips[0].DestinationRouteCode)
- </td>
- <td style="display:none;" class="l-field DestinationLandmarkValues PickUpValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].DestinationLatitude)
- .HtmlAttributes(new { TabIndex = -1, style = "width=50%; border-style: hidden; background-color:transparent" })
- .ReadOnly(true))
- @(Html.Lss().TextBoxFor(model => model.Trips[0].DestinationLongitude)
- .HtmlAttributes(new { TabIndex = -1, style = "width=50%; border-style: hidden; background-color:transparent" })
- .ReadOnly(true))
- </td>
- </tr>
- <tr style="display:none;">
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_AddressLine1)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].Origin_AddressLine1).HtmlAttributes(new { TabIndex = -1, @class = "street_number" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_AddressLine1)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_AddressLine1)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_Segment.CountyId)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Origin_Segment.CountyId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListCountyId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Origin_Segment.County).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_Segment.CountyId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_Segment.CountyId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_AddressLine1)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().TextBoxFor(model => model.Trips[0].Destination_AddressLine1).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_AddressLine1)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_AddressLine1)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_Segment.CountyId)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_Segment.CountyId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListCountyId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Destination_Segment.County).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_SegmentId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_SegmentId)
- </td>
- </tr>
- <tr style="display:none;">
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_AddressLine2)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Origin_AddressLine2)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListOrigin_SegmentId", "Trip", Request.QueryString.ToRouteValueDictionary())
- .Data("getOriginStreetValue")))
- .Events(events => events
- .Change("populateOriginFromStreetSegment"))
- .DefaultValue<StreetSegment>(Model.Trips[0].Origin_Segment.EntityState == Mindscape.LightSpeed.EntityState.New ? null : Model.Trips[0].Origin_Segment)
- .HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_SegmentId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_SegmentId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_Segment.CityId)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().ComboBoxFor(mode => Model.Trips[0].Origin_Segment.CityId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListCityId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Origin_Segment.City).HtmlAttributes(new { TabIndex = -1, @class = "locality" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_Segment.CityId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_Segment.CityId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_AddressLine2)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_AddressLine2)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListDestination_SegmentId", "Trip", Request.QueryString.ToRouteValueDictionary())
- .Data("getDestinationStreetValue")))
- .Events(events => events
- .Change("populateDestinationFromStreetSegment")).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_SegmentId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_SegmentId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_Segment.CityId)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_Segment.CityId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListCityId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Destination_Segment.City).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_SegmentId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_SegmentId)
- </td>
- </tr>
- <tr style="display:none;">
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_Segment.Country)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Origin_Segment.CountryId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListCountryId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Origin_Segment.Country).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_Segment.CountryId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_Segment.CountryId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_Segment.PostalCodeId)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Origin_Segment.PostalCodeId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListPostalCodeId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Origin_Segment.PostalCode)
- .HtmlAttributes(new { TabIndex = -1, @class = "postal_code" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_Segment.PostalCodeId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_Segment.PostalCodeId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_Segment.CountryId)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_Segment.CountryId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListCountryId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Destination_Segment.Country).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_SegmentId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_Segment)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_Segment.PostalCodeId)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_Segment.PostalCodeId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListPostalCodeId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Destination_Segment.PostalCode).HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_SegmentId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_SegmentId)
- </td>
- </tr>
- <tr style="display:none;">
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_Segment.StateId)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Origin_Segment.StateId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListStateId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Origin_Segment.State)
- .HtmlAttributes(new { TabIndex = -1, @class = "administrative_area_level_1" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_Segment.StateId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_Segment.StateId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_Segment.Primary_ZoneId)</td>
- <td class="l-field OriginStreetValues OriginLandmarkValues PickUpValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Origin_Segment.Primary_ZoneId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListPrimary_ZoneId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Origin_Segment.Primary_Zone)
- .HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Origin_Segment.Primary_ZoneId)
- @Html.ValidationMessageFor(model => model.Trips[0].Origin_Segment.Primary_ZoneId)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_Segment.State)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues DropOffValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_Segment.StateId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListStateId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Destination_Segment.State)
- .HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_SegmentId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_Segment)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Destination_Segment.Primary_ZoneId)</td>
- <td class="l-field DestinationStreetValues DestinationLandmarkValues PickUpValues">
- @(Html.Lss().ComboBoxFor(model => model.Trips[0].Destination_Segment.Primary_ZoneId)
- .DataSource(dataSource => dataSource
- .Read(read => read
- .Action("_GetListPrimary_ZoneId", "StreetSegment", Request.QueryString.ToRouteValueDictionary())))
- .DefaultValue(Model.Trips[0].Destination_Segment.Primary_Zone)
- .HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].Destination_Segment.Primary_ZoneId)
- @Html.ValidationMessageFor(model => model.Trips[0].Destination_Segment.Primary_ZoneId)
- </td>
- </tr>
- <tr >
- <td class="l-label">Comments</td>
- <td class="l-field" colspan="3">
- @(Html.Lss().TextAreaFor(model => model.Trips[0].OriginComments)
- .AddCssClass("k-input l-input-fs-wide").HtmlAttributes(new { TabIndex = 5, style = "width: 100%" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].OriginComments)
- @Html.ValidationMessageFor(model => model.Trips[0].OriginComments)
- </td>
- <td class="l-label">Comments</td>
- <td class="l-field DropOffValues" colspan="3">
- @(Html.Lss().TextAreaFor(model => model.Trips[0].DestinationComments)
- .AddCssClass("k-input l-input-fs-wide").HtmlAttributes(new { TabIndex = 7, style = "width: 100%" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].DestinationComments)
- @Html.ValidationMessageFor(model => model.Trips[0].DestinationComments)
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <script type="text/javascript">
- //var originSearchAddress = document.getElementById('originSearchTextField');
- //autocomplete = new google.maps.places.Autocomplete(originSearchAddress, options);
- //autocomplete.setBounds(circle.getBounds());
- //google.maps.event.addListener(autocomplete, 'place_changed', function () {
- // fillInAddress();
- //});
- //google.maps.event.addDomListener(originSearchAddress, 'keydown', function (e) {
- // if (e.keyCode == 13) {
- // e.preventDefault();
- // }
- //});
- //var destinationSearchAddress = document.getElementById('destinationSearchTextField');
- //destinationAutocomplete = new google.maps.places.Autocomplete(destinationSearchAddress, options);
- //destinationAutocomplete.setBounds(circle.getBounds());
- //google.maps.event.addListener(destinationAutocomplete, 'place_changed', function () {
- // fillInDestinationAddress();
- //});
- //google.maps.event.addDomListener(destinationSearchAddress, 'keydown', function (e) {
- // if (e.keyCode == 13) {
- // e.preventDefault();
- // }
- //});
- $(document).ready(function () {
- $("#Trips_0__OriginScheduledDate").on('change', function () {
- // $("#tripCount").html("20");
- if ($("#Trips_0__DestinationScheduledDate").val() == '') {
- // $("#Trips_0__DestinationScheduledDate").val($("#Trips_0__OriginScheduledDate").val());
- //$("#datetimepicker").kendoDateTimePicker();
- var datepicker = $("#Trips_0__DestinationScheduledDate").data("kendoDateTimePicker");
- datepicker.value($("#Trips_0__OriginScheduledDate").val());
- datepicker.trigger("change");
- }
- $.get("/Trip/_CountTripsForTime", { scheduledDateTime:$("#Trips_0__OriginScheduledDate").val() }, function (data) {
- $("#tripCount").html(data[0].Count );
- })
- });
- // var SiteCode = '@Session.SiteCode';
- // $.getScript("https://webservices.tranware.net/SaaS/customJS/"+SiteCode+".js");
- });
- /*
- var profileQuery = function (request, response) {
- jQuery.get("http://192.168.0.104:3000/API/contactLookup?name=", {
- term: request.term
- },
- function (data) {
- console.log(data);
- if (data.length > 0) {
- for (var i in data) {
- data[i].value = data[i].Fullname;
- data[i].label = data[i].Fullname;
- }
- response(data);
- } else {
- var data = {};
- response(data);
- }
- });
- }
- */
- function btnAddContact_Click() {
- var contact = $('#ContactId').val();
- var win = $.lss.window.openPopup({
- url: contactUrl + '?contact=' + contact
- });
- win.bind("close", selectContactId);
- }
- function sendContactId() {
- var combo = $('#ContactId').data("kendoComboBox");
- return {
- 'Id': combo.value()
- };
- }
- function selectContactId() {
- var comboBox = $('#ContactId').data('kendoComboBox');
- $.when(comboBox.dataSource.fetch()).then(function () {
- comboBox.trigger('change');
- });
- }
- function btnGetPriceEstimate_Click() {
- var rateId = $('#RateId').val();
- var tripId = $('#Trips_0__Id').val();
- var originLandmarkId = $('#Trips_0__Origin_LandmarkId').val();
- var destinationLandmarkId = $('#Trips_0__Destination_LandmarkId').val();
- var originSegmentId = $('#Trips_0__Origin_AddressLine2').val();
- var destinationSegmentId = $('#Trips_0__Destination_AddressLine2').val();
- var originZoneId = $('#Trips_0__Origin_Segment_Primary_ZoneId').val();
- var destinationZoneId = $('#Trips_0__Destination_Segment_Primary_ZoneId').val();
- var mileage = $('#Trips_0__TripMileage').val();
- if (mileage === '') {
- mileage = 0.0;
- }
- var originLatitude = $('#Trips_0__OriginLatitude').val();
- var originLongitude = $('#Trips_0__OriginLongitude').val();
- var destinationLatitude = $('#Trips_0__DestinationLatitude').val();
- var destinationLongitude = $('#Trips_0__DestinationLongitude').val();
- var additionalPassengers = $('#Trips_0__AdditionalPassengers').val();
- $.lss.window.openPopup({ url: tempTripPriceUrl + '?rateId=' + rateId + '&tripId=' + tripId});
- var data = {
- rateId: rateId, tripId: tripId, originLandmarkId: originLandmarkId, destinationLandmarkId: destinationLandmarkId,
- originSegmentId: originSegmentId, destinationSegmentId: destinationSegmentId, originZoneId: originZoneId, destinationZoneId: destinationZoneId,
- mileage: mileage, originLatitude: originLatitude, originLongitude: originLongitude, destinationLatitude: destinationLatitude, destinationLongitude: destinationLongitude,
- additionalPassengers: additionalPassengers
- };
- var url = '@Url.Action("Estimate","Trip_PriceTemp")';
- $.get(url, data)
- .done(function (d) {
- $('.l-trip-cost').html(kendo.toString(d.Estimate, "c"));
- $('#Trips_0__TripMileage').data('kendoNumericTextBox').value(d.Mileage);
- })
- .fail(function () {
- $.lss.notify.error();
- });
- }
- </script>
- <script src="https://webservices.tranware.net/SaaS/customJS/reservationtrip.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement