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">
- <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyBe0-8ZfLKlFrKqj3VrbqqaQhyFlcWRBMQ&libraries=places"></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">
- <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">
- @(Html.Lss().Button()
- .Name("btnCallerId")
- .OnClick("btnCallerId_Click('AccountId')")
- .InputType("button")
- .IconClass("l-i-phone2")
- )
- @Html.Lss().LabelFor(model => model.ContactId)
- </td>
- <td class="l-field">
- @(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 { TabIndex = 1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.ContactId)
- @Html.ValidationMessageFor(model => model.ContactId)
- </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")
- .OnClick(string.Format(
- @"$.lss.window.openPopup(
- {{
- url : '{0}' + '?Passenger_ContactId=' + $('#ContactId').val(),
- close: lookupClose
- }});",
- Url.Action("LookupPreviousTrips", "Grid", new
- {
- virtualAction = "LookupPreviousTrips"
- })
- )).HtmlAttributes(new { TabIndex = 2 }))
- </td>
- </tr>
- <tr>
- <td class="l-label">Contact Phone #</td>
- <td class="l-field">
- @(Html.Lss().TextBox().Name("PhoneNo").HtmlAttributes(new { TabIndex = 3 }))
- @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 = 9 }))
- @*.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">
- @(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 = 4 }))
- @*.HtmlAttributes(new { TabIndex = 4, style = "color: red;" }).SelectedIndex(2))*@
- @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">
- @(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)
- </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">
- <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 = 10 }))
- </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 = -1, style = "width:100%;height:2.13em;" }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].AdditionalPassengers)
- @Html.ValidationMessageFor(model => model.Trips[0].AdditionalPassengers)
- </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" class="k-textbox" type="text"/>
- <input id="searchTextField" type="text" placeholder="Search Origin Address" class="k-textbox" tabindex="5" style="display:none; width:100%;">
- </td>
- <td colspan="4" style="margin:10px;">
- <input id="jqautocompleteDestination" placeholder="location to search" class="k-textbox" type="text"/>
- <input id="destinationSearchTextField" type="text" placeholder="Search Destination Address" class="k-textbox" tabindex="7" 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)
- .HtmlAttributes(new { TabIndex = -1 }))
- @Html.Lss().RequiredFieldIndicatorFor(model => model.Trips[0].OriginScheduledDate)
- @Html.ValidationMessageFor(model => model.Trips[0].OriginScheduledDate)
- </td>
- <td class="l-label">@Html.Lss().LabelFor(model => model.Trips[0].Origin_AddressLine3)</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)
- .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="display:none;">
- <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 = 6 }))
- @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].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].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 = 8 }))
- @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].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>
- </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></td>
- <td class="l-field OriginStreetValues 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 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></td>
- <td class="l-field DestinationStreetValues 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>
- <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 = -1, 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 = -1, 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">
- $(document).ready(function () {
- $.getScript("https://webservices.tranware.net/SaaS/customJS/MCCS.js");
- $('head').append( $('<link rel="stylesheet" type="text/css" />').attr('href', "https://webservices.tranware.net/SaaS/customJS/standard.css") );
- });
- 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