sync
This commit is contained in:
parent
634e8b71ab
commit
0855ae42cd
12
BlazorApp1/App.razor
Normal file
12
BlazorApp1/App.razor
Normal file
@ -0,0 +1,12 @@
|
||||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
14
BlazorApp1/BlazorApp1.csproj
Normal file
14
BlazorApp1/BlazorApp1.csproj
Normal file
@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.5" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
18
BlazorApp1/Pages/Counter.razor
Normal file
18
BlazorApp1/Pages/Counter.razor
Normal file
@ -0,0 +1,18 @@
|
||||
@page "/counter"
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
57
BlazorApp1/Pages/FetchData.razor
Normal file
57
BlazorApp1/Pages/FetchData.razor
Normal file
@ -0,0 +1,57 @@
|
||||
@page "/fetchdata"
|
||||
@inject HttpClient Http
|
||||
|
||||
<PageTitle>Weather forecast</PageTitle>
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
|
||||
<p>This component demonstrates fetching data from the server.</p>
|
||||
|
||||
@if (forecasts == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var forecast in forecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@code {
|
||||
private WeatherForecast[]? forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
|
||||
}
|
||||
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public string? Summary { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
}
|
9
BlazorApp1/Pages/Index.razor
Normal file
9
BlazorApp1/Pages/Index.razor
Normal file
@ -0,0 +1,9 @@
|
||||
@page "/"
|
||||
|
||||
<PageTitle>Index</PageTitle>
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
|
||||
<SurveyPrompt Title="How is Blazor working for you?" />
|
11
BlazorApp1/Program.cs
Normal file
11
BlazorApp1/Program.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using BlazorApp1;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||
|
||||
await builder.Build().RunAsync();
|
23
BlazorApp1/Properties/PublishProfiles/FolderProfile.pubxml
Normal file
23
BlazorApp1/Properties/PublishProfiles/FolderProfile.pubxml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<PublishUrl>bin\Release\net7.0\browser-wasm\publish\</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
||||
<RunAOTCompilation>true</RunAOTCompilation>
|
||||
<ProjectGuid>96100c88-5479-465c-bb57-afb1f8ed8bfd</ProjectGuid>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
</Project>
|
30
BlazorApp1/Properties/launchSettings.json
Normal file
30
BlazorApp1/Properties/launchSettings.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:22316",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5042",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
17
BlazorApp1/Shared/MainLayout.razor
Normal file
17
BlazorApp1/Shared/MainLayout.razor
Normal file
@ -0,0 +1,17 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<div class="page">
|
||||
<div class="sidebar">
|
||||
<NavMenu />
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<div class="top-row px-4">
|
||||
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
|
||||
</div>
|
||||
|
||||
<article class="content px-4">
|
||||
@Body
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
81
BlazorApp1/Shared/MainLayout.razor.css
Normal file
81
BlazorApp1/Shared/MainLayout.razor.css
Normal file
@ -0,0 +1,81 @@
|
||||
.page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
justify-content: flex-end;
|
||||
height: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.top-row ::deep a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row:not(.auth) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.top-row.auth {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.top-row.auth ::deep a:first-child {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.top-row, article {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
}
|
39
BlazorApp1/Shared/NavMenu.razor
Normal file
39
BlazorApp1/Shared/NavMenu.razor
Normal file
@ -0,0 +1,39 @@
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">BlazorApp1</a>
|
||||
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
|
||||
<nav class="flex-column">
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
<span class="oi oi-home" aria-hidden="true"></span> Home
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="counter">
|
||||
<span class="oi oi-plus" aria-hidden="true"></span> Counter
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="fetchdata">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private bool collapseNavMenu = true;
|
||||
|
||||
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
||||
|
||||
private void ToggleNavMenu()
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
}
|
68
BlazorApp1/Shared/NavMenu.razor.css
Normal file
68
BlazorApp1/Shared/NavMenu.razor.css
Normal file
@ -0,0 +1,68 @@
|
||||
.navbar-toggler {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
height: 3.5rem;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.oi {
|
||||
width: 2rem;
|
||||
font-size: 1.1rem;
|
||||
vertical-align: text-top;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.nav-item:first-of-type {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-item:last-of-type {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.nav-item ::deep a {
|
||||
color: #d7d7d7;
|
||||
border-radius: 4px;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 3rem;
|
||||
}
|
||||
|
||||
.nav-item ::deep a.active {
|
||||
background-color: rgba(255,255,255,0.25);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-item ::deep a:hover {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
/* Never collapse the sidebar for wide screens */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav-scrollable {
|
||||
/* Allow sidebar to scroll for tall menus */
|
||||
height: calc(100vh - 3.5rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
16
BlazorApp1/Shared/SurveyPrompt.razor
Normal file
16
BlazorApp1/Shared/SurveyPrompt.razor
Normal file
@ -0,0 +1,16 @@
|
||||
<div class="alert alert-secondary mt-4">
|
||||
<span class="oi oi-pencil me-2" aria-hidden="true"></span>
|
||||
<strong>@Title</strong>
|
||||
|
||||
<span class="text-nowrap">
|
||||
Please take our
|
||||
<a target="_blank" class="font-weight-bold link-dark" href="https://go.microsoft.com/fwlink/?linkid=2186157">brief survey</a>
|
||||
</span>
|
||||
and tell us what you think.
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// Demonstrates how a parent component can supply parameters
|
||||
[Parameter]
|
||||
public string? Title { get; set; }
|
||||
}
|
10
BlazorApp1/_Imports.razor
Normal file
10
BlazorApp1/_Imports.razor
Normal file
@ -0,0 +1,10 @@
|
||||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http
|
||||
@using Microsoft.JSInterop
|
||||
@using BlazorApp1
|
||||
@using BlazorApp1.Shared
|
101
BlazorApp1/wwwroot/css/app.css
Normal file
101
BlazorApp1/wwwroot/css/app.css
Normal file
@ -0,0 +1,101 @@
|
||||
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
|
||||
|
||||
html, body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a, .btn-link {
|
||||
color: #0071c1;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 1.1rem;
|
||||
}
|
||||
|
||||
.valid.modified:not([type=checkbox]) {
|
||||
outline: 1px solid #26b050;
|
||||
}
|
||||
|
||||
.invalid {
|
||||
outline: 1px solid red;
|
||||
}
|
||||
|
||||
.validation-message {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
||||
.blazor-error-boundary {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||
padding: 1rem 1rem 1rem 3.7rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
|
||||
.loading-progress {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 8rem;
|
||||
height: 8rem;
|
||||
margin: 20vh auto 1rem auto;
|
||||
}
|
||||
|
||||
.loading-progress circle {
|
||||
fill: none;
|
||||
stroke: #e0e0e0;
|
||||
stroke-width: 0.6rem;
|
||||
transform-origin: 50% 50%;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.loading-progress circle:last-child {
|
||||
stroke: #1b6ec2;
|
||||
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
|
||||
transition: stroke-dasharray 0.05s ease-in-out;
|
||||
}
|
||||
|
||||
.loading-progress-text {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
|
||||
}
|
||||
|
||||
.loading-progress-text:after {
|
||||
content: var(--blazor-load-percentage-text, "Loading");
|
||||
}
|
7
BlazorApp1/wwwroot/css/bootstrap/bootstrap.min.css
vendored
Normal file
7
BlazorApp1/wwwroot/css/bootstrap/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
BlazorApp1/wwwroot/css/bootstrap/bootstrap.min.css.map
Normal file
1
BlazorApp1/wwwroot/css/bootstrap/bootstrap.min.css.map
Normal file
File diff suppressed because one or more lines are too long
86
BlazorApp1/wwwroot/css/open-iconic/FONT-LICENSE
Normal file
86
BlazorApp1/wwwroot/css/open-iconic/FONT-LICENSE
Normal file
@ -0,0 +1,86 @@
|
||||
SIL OPEN FONT LICENSE Version 1.1
|
||||
|
||||
Copyright (c) 2014 Waybury
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
21
BlazorApp1/wwwroot/css/open-iconic/ICON-LICENSE
Normal file
21
BlazorApp1/wwwroot/css/open-iconic/ICON-LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Waybury
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
114
BlazorApp1/wwwroot/css/open-iconic/README.md
Normal file
114
BlazorApp1/wwwroot/css/open-iconic/README.md
Normal file
@ -0,0 +1,114 @@
|
||||
[Open Iconic v1.1.1](https://github.com/iconic/open-iconic)
|
||||
===========
|
||||
|
||||
### Open Iconic is the open source sibling of [Iconic](https://github.com/iconic/open-iconic). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](https://github.com/iconic/open-iconic)
|
||||
|
||||
|
||||
|
||||
## What's in Open Iconic?
|
||||
|
||||
* 223 icons designed to be legible down to 8 pixels
|
||||
* Super-light SVG files - 61.8 for the entire set
|
||||
* SVG sprite—the modern replacement for icon fonts
|
||||
* Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats
|
||||
* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
|
||||
* PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](https://github.com/iconic/open-iconic) and [Reference](https://github.com/iconic/open-iconic) sections.
|
||||
|
||||
### General Usage
|
||||
|
||||
#### Using Open Iconic's SVGs
|
||||
|
||||
We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute).
|
||||
|
||||
```
|
||||
<img src="/open-iconic/svg/icon-name.svg" alt="icon name">
|
||||
```
|
||||
|
||||
#### Using Open Iconic's SVG Sprite
|
||||
|
||||
Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
|
||||
|
||||
Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `<svg>` *tag and a unique class name for each different icon in the* `<use>` *tag.*
|
||||
|
||||
```
|
||||
<svg class="icon">
|
||||
<use xlink:href="open-iconic.svg#account-login" class="icon-account-login"></use>
|
||||
</svg>
|
||||
```
|
||||
|
||||
Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `<svg>` tag with equal width and height dimensions.
|
||||
|
||||
```
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
```
|
||||
|
||||
Coloring icons is even easier. All you need to do is set the `fill` rule on the `<use>` tag.
|
||||
|
||||
```
|
||||
.icon-account-login {
|
||||
fill: #f00;
|
||||
}
|
||||
```
|
||||
|
||||
To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/).
|
||||
|
||||
#### Using Open Iconic's Icon Font...
|
||||
|
||||
|
||||
##### …with Bootstrap
|
||||
|
||||
You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}`
|
||||
|
||||
|
||||
```
|
||||
<link href="/open-iconic/font/css/open-iconic-bootstrap.css" rel="stylesheet">
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
<span class="oi oi-icon-name" title="icon name" aria-hidden="true"></span>
|
||||
```
|
||||
|
||||
##### …with Foundation
|
||||
|
||||
You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}`
|
||||
|
||||
```
|
||||
<link href="/open-iconic/font/css/open-iconic-foundation.css" rel="stylesheet">
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
<span class="fi-icon-name" title="icon name" aria-hidden="true"></span>
|
||||
```
|
||||
|
||||
##### …on its own
|
||||
|
||||
You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}`
|
||||
|
||||
```
|
||||
<link href="/open-iconic/font/css/open-iconic.css" rel="stylesheet">
|
||||
```
|
||||
|
||||
```
|
||||
<span class="oi" data-glyph="icon-name" title="icon name" aria-hidden="true"></span>
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
### Icons
|
||||
|
||||
All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
### Fonts
|
||||
|
||||
All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web).
|
1
BlazorApp1/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css
vendored
Normal file
1
BlazorApp1/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
Normal file
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
Normal file
Binary file not shown.
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
Normal file
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
Normal file
Binary file not shown.
543
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.svg
Normal file
543
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.svg
Normal file
@ -0,0 +1,543 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<!--
|
||||
2014-7-1: Created.
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014
|
||||
By P.J. Onori
|
||||
Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net)
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="open-iconic" horiz-adv-x="800" >
|
||||
<font-face
|
||||
font-family="Icons"
|
||||
font-weight="400"
|
||||
font-stretch="normal"
|
||||
units-per-em="800"
|
||||
panose-1="2 0 5 3 0 0 0 0 0 0"
|
||||
ascent="800"
|
||||
descent="0"
|
||||
bbox="-0.5 -101 802 800.126"
|
||||
underline-thickness="50"
|
||||
underline-position="-100"
|
||||
unicode-range="U+E000-E0DE"
|
||||
/>
|
||||
<missing-glyph />
|
||||
<glyph glyph-name="" unicode=""
|
||||
d="M300 700h500v-700h-500v100h400v500h-400v100zM400 500l200 -150l-200 -150v100h-400v100h400v100z" />
|
||||
<glyph glyph-name="1" unicode=""
|
||||
d="M300 700h500v-700h-500v100h400v500h-400v100zM200 500v-100h400v-100h-400v-100l-200 150z" />
|
||||
<glyph glyph-name="2" unicode=""
|
||||
d="M350 700c193 0 350 -157 350 -350v-50h100l-200 -200l-200 200h100v50c0 138 -112 250 -250 250s-250 -112 -250 -250c0 193 157 350 350 350z" />
|
||||
<glyph glyph-name="3" unicode=""
|
||||
d="M450 700c193 0 350 -157 350 -350c0 138 -112 250 -250 250s-250 -112 -250 -250v-50h100l-200 -200l-200 200h100v50c0 193 157 350 350 350z" />
|
||||
<glyph glyph-name="4" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM100 500h600v-100h-600v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="5" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h600v-100h-600v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="6" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM200 500h600v-100h-600v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="7" unicode=""
|
||||
d="M400 700c75 0 146 -23 206 -59l-75 -225l-322 234c57 31 122 50 191 50zM125 588l191 -138l-310 -222c-4 24 -6 47 -6 72c0 114 49 215 125 288zM688 575c69 -72 112 -168 112 -275c0 -35 -8 -68 -16 -100h-218zM216 253l112 -347c-128 23 -232 109 -287 222zM372 100
|
||||
h372c-64 -109 -177 -185 -310 -197z" />
|
||||
<glyph glyph-name="8" unicode="" horiz-adv-x="600"
|
||||
d="M200 800h100v-500h200l-247 -300l-253 300h200v500z" />
|
||||
<glyph glyph-name="9" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 700v-300h-200l300 -300l300 300h-200v300h-200z" />
|
||||
<glyph glyph-name="a" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300l300 -300v200h300v200h-300v200z" />
|
||||
<glyph glyph-name="b" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700v-200h-300v-200h300v-200l300 300z" />
|
||||
<glyph glyph-name="c" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300h200v-300h200v300h200z" />
|
||||
<glyph glyph-name="d" unicode=""
|
||||
d="M300 600v-200h500v-100h-500v-200l-300 247z" />
|
||||
<glyph glyph-name="e" unicode=""
|
||||
d="M500 600l300 -247l-300 -253v200h-500v100h500v200z" />
|
||||
<glyph glyph-name="f" unicode="" horiz-adv-x="600"
|
||||
d="M200 800h200v-500h200l-297 -300l-303 300h200v500z" />
|
||||
<glyph glyph-name="10" unicode=""
|
||||
d="M300 700v-200h500v-200h-500v-200l-300 297z" />
|
||||
<glyph glyph-name="11" unicode=""
|
||||
d="M500 700l300 -297l-300 -303v200h-500v200h500v200z" />
|
||||
<glyph glyph-name="12" unicode="" horiz-adv-x="600"
|
||||
d="M297 800l303 -300h-200v-500h-200v500h-200z" />
|
||||
<glyph glyph-name="13" unicode="" horiz-adv-x="600"
|
||||
d="M247 800l253 -300h-200v-500h-100v500h-200z" />
|
||||
<glyph glyph-name="14" unicode=""
|
||||
d="M400 800h100v-800h-100v800zM200 700h100v-600h-100v600zM600 600h100v-400h-100v400zM0 500h100v-200h-100v200z" />
|
||||
<glyph glyph-name="15" unicode=""
|
||||
d="M116 600l72 -72c-54 -54 -88 -126 -88 -209s34 -159 88 -213l-72 -72c-72 72 -116 175 -116 285s44 209 116 281zM684 600c72 -72 116 -171 116 -281s-44 -213 -116 -285l-72 72c54 54 88 130 88 213s-34 155 -88 209zM259 460l69 -72c-18 -18 -28 -41 -28 -69
|
||||
s10 -54 28 -72l-69 -72c-36 36 -59 89 -59 144s23 105 59 141zM541 459c36 -36 59 -85 59 -140s-23 -108 -59 -144l-69 72c18 18 28 44 28 72s-10 51 -28 69z" />
|
||||
<glyph glyph-name="16" unicode="" horiz-adv-x="400"
|
||||
d="M200 800c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM100 319c31 -11 65 -19 100 -19s68 8 100 19v-319l-100 100l-100 -100v319z" />
|
||||
<glyph glyph-name="17" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300c0 -66 21 -126 56 -175l419 419c-49 35 -109 56 -175 56zM644 575l-419 -419c49 -35 109 -56 175 -56c166 0 300 134 300 300
|
||||
c0 66 -21 126 -56 175z" />
|
||||
<glyph glyph-name="18" unicode=""
|
||||
d="M0 700h100v-600h700v-100h-800v700zM500 700h200v-500h-200v500zM200 500h200v-300h-200v300z" />
|
||||
<glyph glyph-name="19" unicode=""
|
||||
d="M397 800c13 1 23 -4 34 -13c2 -2 214 -254 241 -287h128v-100h-100v-366c0 -18 -16 -34 -34 -34h-532c-18 0 -34 16 -34 34v366h-100v100h128l234 281c9 11 22 18 35 19zM400 672l-144 -172h288zM250 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50
|
||||
v100c0 28 -22 50 -50 50zM550 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50v100c0 28 -22 50 -50 50z" />
|
||||
<glyph glyph-name="1a" unicode=""
|
||||
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9zM100 600v-400h500v400h-500z" />
|
||||
<glyph glyph-name="1b" unicode=""
|
||||
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9z" />
|
||||
<glyph glyph-name="1c" unicode=""
|
||||
d="M92 650c0 23 19 50 45 50h3h5h5h500c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-141c9 -17 120 -231 166 -309c16 -26 34 -61 34 -106c0 -39 -15 -77 -41 -103h-3c-26 -25 -62 -41 -100 -41h-512c-39 0 -77 15 -103 41s-41 64 -41 103c0 46 18 80 34 106
|
||||
c46 78 157 292 166 309v141h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51zM500 600h-200v-162l-6 -10s-63 -123 -119 -228h450c-56 105 -119 228 -119 228l-6 10v162z" />
|
||||
<glyph glyph-name="1d" unicode=""
|
||||
d="M400 800c110 0 200 -90 200 -200c0 -104 52 -198 134 -266c41 -34 66 -82 66 -134h-800c0 52 25 100 66 134c82 68 134 162 134 266c0 110 90 200 200 200zM300 100h200c0 -55 -45 -100 -100 -100s-100 45 -100 100z" />
|
||||
<glyph glyph-name="1e" unicode="" horiz-adv-x="600"
|
||||
d="M150 800h50l350 -250l-225 -147l225 -153l-350 -250h-50v250l-75 -75l-75 75l150 150l-150 150l75 75l75 -75v250zM250 650v-200l150 100zM250 350v-200l150 100z" />
|
||||
<glyph glyph-name="1f" unicode=""
|
||||
d="M0 800h500c110 0 200 -90 200 -200c0 -47 -17 -91 -44 -125c85 -40 144 -125 144 -225c0 -138 -112 -250 -250 -250h-550v100c55 0 100 45 100 100v400c0 55 -45 100 -100 100v100zM300 700v-200h100c55 0 100 45 100 100s-45 100 -100 100h-100zM300 400v-300h150
|
||||
c83 0 150 67 150 150s-67 150 -150 150h-150z" />
|
||||
<glyph glyph-name="20" unicode="" horiz-adv-x="600"
|
||||
d="M300 800v-300h200l-300 -500v300h-200z" />
|
||||
<glyph glyph-name="21" unicode=""
|
||||
d="M100 800h300v-300l100 100l100 -100v300h50c28 0 50 -22 50 -50v-550h-550c-28 0 -50 -22 -50 -50s22 -50 50 -50h550v-100h-550c-83 0 -150 67 -150 150v550l3 19c8 39 39 70 78 78z" />
|
||||
<glyph glyph-name="22" unicode="" horiz-adv-x="400"
|
||||
d="M0 800h400v-800l-200 200l-200 -200v800z" />
|
||||
<glyph glyph-name="23" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM0 600h300v-103h203v103h297v-591c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v591z" />
|
||||
<glyph glyph-name="24" unicode=""
|
||||
d="M300 800h200c55 0 100 -45 100 -100v-100h191c6 0 9 -3 9 -9v-241c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v241c0 6 3 9 9 9h191v100c0 55 45 100 100 100zM300 700v-100h200v100h-200zM0 209c16 -6 32 -9 50 -9h700c18 0 34 3 50 9v-200c0 -6 -3 -9 -9 -9h-782
|
||||
c-6 0 -9 3 -9 9v200z" />
|
||||
<glyph glyph-name="25" unicode="" horiz-adv-x="600"
|
||||
d="M300 800c58 0 110 -16 147 -53s53 -89 53 -147h-100c0 39 -11 61 -25 75s-36 25 -75 25c-35 0 -55 -10 -72 -31s-28 -55 -28 -94c0 -51 20 -107 28 -175h172v-100h-178c-14 -60 -49 -127 -113 -200h491v-100h-600v122l16 12c69 69 95 121 106 166h-122v100h125
|
||||
c-8 50 -25 106 -25 175c0 58 16 114 50 156c34 43 88 69 150 69z" />
|
||||
<glyph glyph-name="26" unicode=""
|
||||
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-700c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v700v2c0 20 15 42 34 48zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50zM350 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h300c28 0 50 22 50 50
|
||||
s-22 50 -50 50h-300zM100 400v-400h600v400h-600z" />
|
||||
<glyph glyph-name="27" unicode=""
|
||||
d="M744 797l6 -3l44 -44c4 -4 3 -8 0 -12l-266 -375l-15 -13l-25 -12c-23 72 -78 127 -150 150l12 25l13 15l375 266zM266 400c74 0 134 -60 134 -134c0 -147 -119 -266 -266 -266c-48 0 -95 12 -134 34c80 46 134 133 134 232c0 74 58 134 132 134z" />
|
||||
<glyph glyph-name="28" unicode=""
|
||||
d="M9 451c0 23 19 50 46 50c8 0 19 -3 26 -7l131 -66l29 22c-79 81 -1 250 118 250s197 -167 119 -250l28 -22l131 66c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-115 -56c9 -16 19 -33 25 -50h68c28 0 50 -22 50 -50s-22 -50 -50 -50h-50
|
||||
c0 -23 -2 -45 -6 -66l78 -40c21 -5 37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11l-65 35c-24 -46 -62 -86 -103 -110c-35 19 -60 45 -60 72v135v4v5v6v5v5v87c0 28 -22 50 -50 50c-24 0 -45 -17 -50 -40c1 -3 1 -8 1 -11s0 -8 -1 -11v-82v-4v-5v-144
|
||||
c0 -28 -24 -53 -59 -72c-41 25 -79 64 -103 110l-66 -35c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49l78 40c-4 21 -6 43 -6 66h-50h-5c-28 0 -50 22 -50 50c0 26 22 50 50 50h5h69c6 17 16 34 25 50l-116 56c-16 7 -28 27 -28 45z" />
|
||||
<glyph glyph-name="29" unicode=""
|
||||
d="M600 700h91c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-91v600zM210 503l290 147v-500l-250 125v-3c-15 0 -25 -8 -28 -22l75 -178c11 -25 0 -58 -25 -69s-58 0 -69 25l-103 272h-91c-6 0 -9 3 -9 9v182c0 6 3 9 9 9h182z" />
|
||||
<glyph glyph-name="2a" unicode=""
|
||||
d="M9 800h682c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM100 700v-200h500v200h-500zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-300h100v300h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
|
||||
<glyph glyph-name="2b" unicode=""
|
||||
d="M0 800h700v-200h-700v200zM0 500h700v-491c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v491zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
|
||||
<glyph glyph-name="2c" unicode=""
|
||||
d="M409 800h182c6 0 10 -4 12 -9l94 -182c2 -5 6 -9 12 -9h82c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v441c0 83 67 150 150 150h141c6 0 10 4 12 9l94 182c2 5 6 9 12 9zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z
|
||||
M500 500c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM500 400c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="2d" unicode=""
|
||||
d="M0 600h800l-400 -400z" />
|
||||
<glyph glyph-name="2e" unicode="" horiz-adv-x="400"
|
||||
d="M400 800v-800l-400 400z" />
|
||||
<glyph glyph-name="2f" unicode="" horiz-adv-x="400"
|
||||
d="M0 800l400 -400l-400 -400v800z" />
|
||||
<glyph glyph-name="30" unicode=""
|
||||
d="M400 600l400 -400h-800z" />
|
||||
<glyph glyph-name="31" unicode=""
|
||||
d="M0 550c0 23 20 50 46 50h3h5h4h200c17 0 37 -13 44 -28l38 -72h444c14 0 19 -12 15 -25l-81 -250c-4 -13 -21 -25 -35 -25h-350c-14 0 -30 12 -34 25c-27 83 -54 167 -81 250l-10 25h-150c-2 0 -5 -1 -7 -1c-28 0 -51 23 -51 51zM358 100c28 0 50 -22 50 -50
|
||||
s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM658 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="32" unicode=""
|
||||
d="M0 700h500v-100h-300v-300h-100l-100 -100v500zM300 500h500v-500l-100 100h-400v400z" />
|
||||
<glyph glyph-name="33" unicode=""
|
||||
d="M641 700l143 -141l-493 -493c-71 76 -146 148 -219 222l-72 71l141 141c50 -51 101 -101 153 -150c116 117 234 231 347 350z" />
|
||||
<glyph glyph-name="34" unicode=""
|
||||
d="M150 600l250 -250l250 250l150 -150l-400 -400l-400 400z" />
|
||||
<glyph glyph-name="35" unicode="" horiz-adv-x="600"
|
||||
d="M400 800l150 -150l-250 -250l250 -250l-150 -150l-400 400z" />
|
||||
<glyph glyph-name="36" unicode="" horiz-adv-x="600"
|
||||
d="M150 800l400 -400l-400 -400l-150 150l250 250l-250 250z" />
|
||||
<glyph glyph-name="37" unicode=""
|
||||
d="M400 600l400 -400l-150 -150l-250 250l-250 -250l-150 150z" />
|
||||
<glyph glyph-name="38" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM600 622l-250 -250l-100 100l-72 -72l172 -172l322 322z" />
|
||||
<glyph glyph-name="39" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM250 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
|
||||
<glyph glyph-name="3a" unicode=""
|
||||
d="M350 800c28 0 50 -22 50 -50v-50h75c14 0 25 -11 25 -25v-75h-300v75c0 14 11 25 25 25h75v50c0 28 22 50 50 50zM25 700h75v-200h500v200h75c14 0 25 -11 25 -25v-650c0 -14 -11 -25 -25 -25h-650c-14 0 -25 11 -25 25v650c0 14 11 25 25 25z" />
|
||||
<glyph glyph-name="3b" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM350 600h100v-181c23 -24 47 -47 72 -69l-72 -72c-27 30 -55 59 -84 88l-16 12
|
||||
v222z" />
|
||||
<glyph glyph-name="3c" unicode=""
|
||||
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-191v50c0 83 -67 150 -150 150s-150 -67 -150 -150v-50h-272c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM434 400h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1
|
||||
v-150h150l-200 -200l-200 200h150v150v2c0 20 15 42 34 48z" />
|
||||
<glyph glyph-name="3d" unicode=""
|
||||
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-141l-200 200l-200 -200h-222c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM450 350l250 -250h-200v-50c0 -28 -22 -50 -50 -50s-50 22 -50 50v50h-200z" />
|
||||
<glyph glyph-name="3e" unicode=""
|
||||
d="M450 700c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200s90 200 200 200c23 114 129 200 250 200z" />
|
||||
<glyph glyph-name="3f" unicode=""
|
||||
d="M250 800c82 0 154 -40 200 -100c-143 0 -270 -85 -325 -209c-36 -10 -70 -25 -100 -47c-16 33 -25 67 -25 106c0 138 112 250 250 250zM450 600c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200
|
||||
s90 200 200 200c23 114 129 200 250 200z" />
|
||||
<glyph glyph-name="40" unicode=""
|
||||
d="M500 700h100l-300 -600h-100zM100 600h100l-100 -200l100 -200h-100l-100 200zM600 600h100l100 -200l-100 -200h-100l100 200z" />
|
||||
<glyph glyph-name="41" unicode=""
|
||||
d="M350 800h100l50 -119l28 -12l119 50l72 -72l-50 -119l12 -28l119 -50v-100l-119 -50l-12 -28l50 -119l-72 -72l-119 50l-28 -12l-50 -119h-100l-50 119l-28 12l-119 -50l-72 72l50 119l-12 28l-119 50v100l119 50l12 28l-50 119l72 72l119 -50l28 12zM400 550
|
||||
c-83 0 -150 -67 -150 -150s67 -150 150 -150s150 67 150 150s-67 150 -150 150z" />
|
||||
<glyph glyph-name="42" unicode=""
|
||||
d="M0 800h800v-200h-800v200zM200 500h400l-200 -200zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="43" unicode=""
|
||||
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM500 600v-400l-200 200z" />
|
||||
<glyph glyph-name="44" unicode=""
|
||||
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM300 600l200 -200l-200 -200v400z" />
|
||||
<glyph glyph-name="45" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM400 500l200 -200h-400zM0 200h800v-200h-800v200z" />
|
||||
<glyph glyph-name="46" unicode=""
|
||||
d="M150 700c83 0 150 -67 150 -150v-50h100v50c0 83 67 150 150 150s150 -67 150 -150s-67 -150 -150 -150h-50v-100h50c83 0 150 -67 150 -150s-67 -150 -150 -150s-150 67 -150 150v50h-100v-50c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150h50v100h-50
|
||||
c-83 0 -150 67 -150 150s67 150 150 150zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h50v50c0 28 -22 50 -50 50zM550 600c-28 0 -50 -22 -50 -50v-50h50c28 0 50 22 50 50s-22 50 -50 50zM300 400v-100h100v100h-100zM150 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
|
||||
s50 22 50 50v50h-50zM500 200v-50c0 -28 22 -50 50 -50s50 22 50 50s-22 50 -50 50h-50z" />
|
||||
<glyph glyph-name="47" unicode=""
|
||||
d="M0 791c0 5 4 9 9 9h782c6 0 9 -4 9 -10v-790l-200 200h-591c-6 0 -9 3 -9 9v582z" />
|
||||
<glyph glyph-name="48" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM600 600l-100 -300l-300 -100l100 300zM400 450c-28 0 -50 -22 -50 -50
|
||||
s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="49" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700v-600c166 0 300 134 300 300s-134 300 -300 300z" />
|
||||
<glyph glyph-name="4a" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM0 600h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100zM750 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="4b" unicode=""
|
||||
d="M25 700h750c14 0 25 -11 25 -25v-75h-800v75c0 14 11 25 25 25zM0 500h800v-375c0 -14 -11 -25 -25 -25h-750c-14 0 -25 11 -25 25v375zM100 300v-100h100v100h-100zM300 300v-100h100v100h-100z" />
|
||||
<glyph glyph-name="4c" unicode=""
|
||||
d="M100 800h100v-100h450l100 100l50 -50l-100 -100v-450h100v-100h-100v-100h-100v100h-500v500h-100v100h100v100zM200 600v-350l350 350h-350zM600 550l-350 -350h350v350z" />
|
||||
<glyph glyph-name="4d" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z
|
||||
M200 452c0 20 15 42 34 48h3h3h8c12 0 28 -7 36 -16l91 -90l25 6c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100l6 25l-90 91c-9 8 -16 24 -16 36zM550 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="4e" unicode=""
|
||||
d="M300 800h200v-300h200l-300 -300l-300 300h200v300zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="4f" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM400 600l300 -300h-200v-300h-200v300h-200z" />
|
||||
<glyph glyph-name="50" unicode=""
|
||||
d="M200 700h600v-600h-600l-200 300zM350 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
|
||||
<glyph glyph-name="51" unicode=""
|
||||
d="M400 700c220 0 400 -180 400 -400h-100c0 166 -134 300 -300 300s-300 -134 -300 -300h-100c0 220 180 400 400 400zM341 491l59 -88l59 88c81 -25 141 -101 141 -191c0 -110 -90 -200 -200 -200s-200 90 -200 200c0 90 60 166 141 191z" />
|
||||
<glyph glyph-name="52" unicode=""
|
||||
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300zM100 600v-100h100v100h-100zM100 400v-100h100v100h-100zM100 200v-100h400v100h-400z" />
|
||||
<glyph glyph-name="53" unicode="" horiz-adv-x="600"
|
||||
d="M200 700h100v-100h75c30 0 58 -6 81 -22s44 -44 44 -78v-100h-100v94c-4 3 -13 6 -25 6h-250c-14 0 -25 -11 -25 -25v-50c0 -15 20 -40 34 -44l257 -65c66 -16 109 -73 109 -141v-50c0 -68 -57 -125 -125 -125h-75v-100h-100v100h-75c-30 0 -58 6 -81 22s-44 44 -44 78
|
||||
v100h100v-94c4 -3 13 -6 25 -6h250c14 0 25 11 25 25v50c0 15 -20 40 -34 44l-257 65c-66 16 -109 73 -109 141v50c0 68 57 125 125 125h75v100z" />
|
||||
<glyph glyph-name="54" unicode=""
|
||||
d="M0 700h300v-300l-300 -300v600zM500 700h300v-300l-300 -300v600z" />
|
||||
<glyph glyph-name="55" unicode=""
|
||||
d="M300 700v-600h-300v300zM800 700v-600h-300v300z" />
|
||||
<glyph glyph-name="56" unicode=""
|
||||
d="M300 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300zM800 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300z" />
|
||||
<glyph glyph-name="57" unicode=""
|
||||
d="M0 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300zM500 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300z" />
|
||||
<glyph glyph-name="58" unicode="" horiz-adv-x="600"
|
||||
d="M300 800l34 -34c11 -11 266 -270 266 -488c0 -165 -135 -300 -300 -300s-300 135 -300 300c0 218 255 477 266 488zM150 328c-28 0 -50 -22 -50 -50c0 -110 90 -200 200 -200c28 0 50 22 50 50s-22 50 -50 50c-55 0 -100 45 -100 100c0 28 -22 50 -50 50z" />
|
||||
<glyph glyph-name="59" unicode=""
|
||||
d="M400 800l400 -500h-800zM0 200h800v-200h-800v200z" />
|
||||
<glyph glyph-name="5a" unicode="" horiz-adv-x="600"
|
||||
d="M300 800l300 -300h-600zM0 300h600l-300 -300z" />
|
||||
<glyph glyph-name="5b" unicode=""
|
||||
d="M0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200z" />
|
||||
<glyph glyph-name="5c" unicode=""
|
||||
d="M0 700h800v-100l-400 -200l-400 200v100zM0 500l400 -200l400 200v-400h-800v400z" />
|
||||
<glyph glyph-name="5d" unicode=""
|
||||
d="M400 800l400 -200v-600h-800v600zM400 688l-300 -150v-188l300 -150l300 150v188zM200 500h400v-100l-200 -100l-200 100v100z" />
|
||||
<glyph glyph-name="5e" unicode=""
|
||||
d="M600 700c69 0 134 -19 191 -50l-16 -106c-49 35 -109 56 -175 56c-131 0 -240 -84 -281 -200h331l-16 -100h-334c0 -36 8 -68 19 -100h297l-16 -100h-222c55 -61 133 -100 222 -100c78 0 147 30 200 78v-122c-59 -35 -127 -56 -200 -56c-147 0 -274 82 -344 200h-256
|
||||
l19 100h197c-8 32 -16 66 -16 100h-200l25 100h191c45 172 198 300 384 300z" />
|
||||
<glyph glyph-name="5f" unicode=""
|
||||
d="M0 700h700v-100h-700v100zM0 500h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100z" />
|
||||
<glyph glyph-name="60" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM200 600h400l-200 -200zM0 200h800v-200h-800v200z" />
|
||||
<glyph glyph-name="61" unicode=""
|
||||
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM200 600l200 -200l-200 -200v400z" />
|
||||
<glyph glyph-name="62" unicode=""
|
||||
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM600 600v-400l-200 200z" />
|
||||
<glyph glyph-name="63" unicode=""
|
||||
d="M0 800h800v-200h-800v200zM400 400l200 -200h-400zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="64" unicode=""
|
||||
d="M0 800h200v-100h-100v-600h600v100h100v-200h-800v800zM400 800h400v-400l-150 150l-250 -250l-100 100l250 250z" />
|
||||
<glyph glyph-name="65" unicode=""
|
||||
d="M403 700c247 0 397 -300 397 -300s-150 -300 -397 -300c-253 0 -403 300 -403 300s150 300 403 300zM400 600c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM400 500c10 0 19 -3 28 -6c-16 -8 -28 -24 -28 -44c0 -28 22 -50 50 -50
|
||||
c20 0 36 12 44 28c3 -9 6 -18 6 -28c0 -55 -45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="66" unicode="" horiz-adv-x="900"
|
||||
d="M331 700h3h3c3 1 7 1 10 1c12 0 29 -8 37 -17l94 -93l66 65c57 57 155 57 212 0c58 -58 58 -154 0 -212l-65 -66l93 -94c10 -8 18 -25 18 -38c0 -28 -22 -50 -50 -50c-13 0 -32 9 -40 20l-62 65l-381 -381h-269v272l375 381l-63 63c-9 8 -16 24 -16 36c0 20 16 42 35 48z
|
||||
M447 481l-313 -315l128 -132l316 316z" />
|
||||
<glyph glyph-name="67" unicode=""
|
||||
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300z" />
|
||||
<glyph glyph-name="68" unicode=""
|
||||
d="M200 800c0 0 200 -100 200 -300s-298 -302 -200 -500c0 0 -200 100 -200 300s300 300 200 500zM500 500c0 0 200 -100 200 -300c0 -150 -60 -200 -100 -200h-300c0 200 300 300 200 500z" />
|
||||
<glyph glyph-name="69" unicode=""
|
||||
d="M0 800h100v-800h-100v800zM200 800h300v-100h300l-200 -203l200 -197h-400v100h-200v400z" />
|
||||
<glyph glyph-name="6a" unicode="" horiz-adv-x="400"
|
||||
d="M150 800h150l-100 -200h200l-150 -300h150l-300 -300l-100 300h134l66 200h-200z" />
|
||||
<glyph glyph-name="6b" unicode=""
|
||||
d="M0 800h300v-100h500v-100h-800v200zM0 500h800v-450c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v450z" />
|
||||
<glyph glyph-name="6c" unicode=""
|
||||
d="M150 800c83 0 150 -67 150 -150c0 -66 -41 -121 -100 -141v-118c15 5 33 9 50 9h200c28 0 50 22 50 50v59c-59 20 -100 75 -100 141c0 83 67 150 150 150s150 -67 150 -150c0 -66 -41 -121 -100 -141v-59c0 -82 -68 -150 -150 -150h-200c-14 0 -25 -7 -34 -16
|
||||
c50 -24 84 -74 84 -134c0 -83 -67 -150 -150 -150s-150 67 -150 150c0 66 41 121 100 141v218c-59 20 -100 75 -100 141c0 83 67 150 150 150z" />
|
||||
<glyph glyph-name="6d" unicode=""
|
||||
d="M0 800h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400zM500 400l150 -150l150 150v-400h-400l150 150l-150 150z" />
|
||||
<glyph glyph-name="6e" unicode=""
|
||||
d="M100 800l150 -150l150 150v-400h-400l150 150l-150 150zM400 400h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400z" />
|
||||
<glyph glyph-name="6f" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700c-56 0 -108 -17 -153 -44l22 -19c33 -18 13 -48 -13 -59c-30 -13 -77 10 -65 -41c13 -55 -27 -3 -47 -15c-42 -26 49 -152 31 -156l-59 34c-8 0 -13 -5 -16 -10
|
||||
c1 -30 10 -57 19 -84c28 -11 77 -2 100 -25c47 -28 97 -115 75 -159c34 -13 68 -22 106 -22c101 0 193 48 247 125c3 24 -8 44 -50 44c-69 0 -156 13 -153 97c2 46 101 108 66 143c-30 30 12 39 12 66c0 37 -65 32 -69 50s20 36 41 56c-30 10 -60 19 -94 19zM631 591
|
||||
c-38 -11 -94 -35 -87 -53c6 -15 52 -1 65 -13c11 -10 16 -59 44 -31l22 22v3c-11 26 -26 50 -44 72z" />
|
||||
<glyph glyph-name="70" unicode=""
|
||||
d="M703 800l97 -100l-400 -400l-100 100l-200 -203l-100 100l300 303l100 -100zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="71" unicode=""
|
||||
d="M0 700h100v-100h-100v100zM200 700h100v-100h-100v100zM400 700h100v-100h-100v100zM600 700h100v-100h-100v100zM0 500h100v-100h-100v100zM200 500h100v-100h-100v100zM400 500h100v-100h-100v100zM600 500h100v-100h-100v100zM0 300h100v-100h-100v100zM200 300h100
|
||||
v-100h-100v100zM400 300h100v-100h-100v100zM600 300h100v-100h-100v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100zM600 100h100v-100h-100v100z" />
|
||||
<glyph glyph-name="72" unicode=""
|
||||
d="M0 800h200v-200h-200v200zM300 800h200v-200h-200v200zM600 800h200v-200h-200v200zM0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200zM0 200h200v-200h-200v200zM300 200h200v-200h-200v200zM600 200h200v-200h-200v200z" />
|
||||
<glyph glyph-name="73" unicode=""
|
||||
d="M0 800h300v-300h-300v300zM500 800h300v-300h-300v300zM0 300h300v-300h-300v300zM500 300h300v-300h-300v300z" />
|
||||
<glyph glyph-name="74" unicode=""
|
||||
d="M19 800h662c11 0 19 -8 19 -19v-331c0 -28 -22 -50 -50 -50h-600c-28 0 -50 22 -50 50v331c0 11 8 19 19 19zM0 309c16 -6 32 -9 50 -9h600c18 0 34 3 50 9v-290c0 -11 -8 -19 -19 -19h-662c-11 0 -19 8 -19 19v290zM550 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
|
||||
s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="75" unicode=""
|
||||
d="M0 700h300v-100h-50c-28 0 -50 -22 -50 -50v-150h300v150c0 28 -22 50 -50 50h-50v100h300v-100h-50c-28 0 -50 -22 -50 -50v-400c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50v150h-300v-150c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50
|
||||
v400c0 28 -22 50 -50 50h-50v100z" />
|
||||
<glyph glyph-name="76" unicode=""
|
||||
d="M400 700c165 0 300 -135 300 -300v-100h50c28 0 50 -22 50 -50v-200c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v350c0 111 -89 200 -200 200s-200 -89 -200 -200v-350c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v200c0 28 22 50 50 50h50v100
|
||||
c0 165 135 300 300 300z" />
|
||||
<glyph glyph-name="77" unicode=""
|
||||
d="M0 500c0 109 91 200 200 200s200 -91 200 -200c0 109 91 200 200 200s200 -91 200 -200c0 -55 -23 -105 -59 -141l-341 -340l-341 340c-36 36 -59 86 -59 141z" />
|
||||
<glyph glyph-name="78" unicode=""
|
||||
d="M400 700l400 -300l-100 3v-403h-200v200h-200v-200h-200v400h-100z" />
|
||||
<glyph glyph-name="79" unicode=""
|
||||
d="M0 800h800v-800h-800v800zM100 700v-300l100 100l400 -400h100v100l-200 200l100 100l100 -100v300h-600z" />
|
||||
<glyph glyph-name="7a" unicode=""
|
||||
d="M19 800h762c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-762c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 600v-300h100l100 -100h200l100 100h100v300h-600z" />
|
||||
<glyph glyph-name="7b" unicode=""
|
||||
d="M200 600c80 0 142 -56 200 -122c58 66 119 122 200 122c131 0 200 -101 200 -200s-69 -200 -200 -200c-81 0 -142 56 -200 122c-58 -66 -121 -122 -200 -122c-131 0 -200 101 -200 200s69 200 200 200zM200 500c-74 0 -100 -54 -100 -100s26 -100 100 -100
|
||||
c42 0 88 47 134 100c-46 53 -92 100 -134 100zM600 500c-43 0 -88 -47 -134 -100c46 -53 91 -100 134 -100c74 0 100 54 100 100s-26 100 -100 100z" />
|
||||
<glyph glyph-name="7c" unicode="" horiz-adv-x="400"
|
||||
d="M300 800c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100zM150 550c83 0 150 -69 150 -150c0 -66 -100 -214 -100 -250c0 -28 22 -50 50 -50s50 22 50 50h100c0 -83 -67 -150 -150 -150s-150 64 -150 150s100 222 100 250s-22 50 -50 50
|
||||
s-50 -22 -50 -50h-100c0 83 67 150 150 150z" />
|
||||
<glyph glyph-name="7d" unicode=""
|
||||
d="M200 800h500v-100h-122c-77 -197 -156 -392 -234 -588l-6 -12h162v-100h-500v100h122c77 197 156 392 234 588l7 12h-163v100z" />
|
||||
<glyph glyph-name="7e" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="7f" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="80" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="81" unicode=""
|
||||
d="M550 800c138 0 250 -112 250 -250s-112 -250 -250 -250c-16 0 -32 0 -47 3l-3 -3v-100h-200v-200h-300v200l303 303c-3 15 -3 31 -3 47c0 138 112 250 250 250zM600 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
|
||||
<glyph glyph-name="82" unicode=""
|
||||
d="M134 600h3h4h4h5h500c28 0 50 -22 50 -50v-350h100v-150c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v150h100v350v2c0 20 15 42 34 48zM200 500v-300h100v-100h200v100h100v300h-400z" />
|
||||
<glyph glyph-name="83" unicode=""
|
||||
d="M0 800h400v-400h-400v400zM500 600h100v-400h-400v100h300v300zM700 400h100v-400h-400v100h300v300z" />
|
||||
<glyph glyph-name="84" unicode="" horiz-adv-x="600"
|
||||
d="M337 694c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-300 -150c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49zM437 544c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-400 -200c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50
|
||||
c0 21 16 44 37 49zM437 344c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-106 -56c24 -4 43 -26 43 -50c0 -28 -23 -51 -51 -51c-2 0 -6 1 -8 1h-200c-26 1 -48 24 -48 50c0 16 12 36 26 44zM151 -50c0 23 20 50 46 50h3h4h5h100c28 0 50 -22 50 -50
|
||||
s-22 -50 -50 -50h-100c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
|
||||
<glyph glyph-name="85" unicode=""
|
||||
d="M199 800h100v-200h-200v100h100v100zM586 797h1c18 1 38 1 56 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0l-44 -44
|
||||
c-8 -13 -27 -24 -42 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l43 44c32 33 72 53 128 56zM208 490c4 5 14 16 22 16h3c2 0 6 1 8 1c28 0 50 -22 50 -50c0 -11 -6 -27 -14 -35l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0l44 44c8 13 27 24 42 24
|
||||
c28 0 50 -22 50 -50c0 -15 -11 -35 -24 -43l-43 -44c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281zM499 200h200v-100h-100v-100h-100v200z" />
|
||||
<glyph glyph-name="86" unicode=""
|
||||
d="M586 797c18 1 39 1 57 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-62 -62 -132 -81 -182 -78s-69 17 -84 25s-26 27 -26 44c0 28 22 51 50 51c8 0 19 -3 26 -7c0 0 15 -11 41 -13s62 3 106 47l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0
|
||||
c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43c32 33 72 53 128 56zM386 566c50 -2 64 -17 85 -22s37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11c0 0 -19 9 -47 10s-63 -4 -103 -44l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0
|
||||
c8 13 27 24 42 24c28 0 50 -22 50 -50c0 -15 -10 -35 -23 -43c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281l150 150c60 60 128 78 178 76z" />
|
||||
<glyph glyph-name="87" unicode=""
|
||||
d="M0 700h300v-300h-300v300zM400 700h400v-100h-400v100zM400 500h300v-100h-300v100zM0 300h300v-300h-300v300zM400 300h400v-100h-400v100zM400 100h300v-100h-300v100z" />
|
||||
<glyph glyph-name="88" unicode=""
|
||||
d="M50 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 700h600v-100h-600v100zM50 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 500h600v-100h-600v100zM50 300c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
|
||||
s22 50 50 50zM200 300h600v-100h-600v100zM50 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="89" unicode=""
|
||||
d="M800 800l-400 -800l-100 300l-300 100z" />
|
||||
<glyph glyph-name="8a" unicode="" horiz-adv-x="600"
|
||||
d="M300 700c110 0 200 -90 200 -200v-100h100v-400h-600v400h100v100c0 110 90 200 200 200zM300 600c-56 0 -100 -44 -100 -100v-100h200v100c0 56 -44 100 -100 100z" />
|
||||
<glyph glyph-name="8b" unicode="" horiz-adv-x="600"
|
||||
d="M300 800c110 0 200 -90 200 -200v-200h100v-400h-600v400h400v200c0 56 -44 100 -100 100s-100 -44 -100 -100h-100c0 110 90 200 200 200z" />
|
||||
<glyph glyph-name="8c" unicode=""
|
||||
d="M400 700v-100c-111 0 -200 -89 -200 -200h100l-150 -200l-150 200h100c0 165 135 300 300 300zM650 600l150 -200h-100c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-100z" />
|
||||
<glyph glyph-name="8d" unicode=""
|
||||
d="M100 800h600v-300h100l-150 -250l-150 250h100v200h-400v-100h-100v200zM150 550l150 -250h-100v-200h400v100h100v-200h-600v300h-100z" />
|
||||
<glyph glyph-name="8e" unicode=""
|
||||
d="M600 700l200 -150l-200 -150v100h-500v-100h-100v100c0 55 45 100 100 100h500v100zM200 300v-100h500v100h100v-100c0 -55 -45 -100 -100 -100h-500v-100l-200 150z" />
|
||||
<glyph glyph-name="8f" unicode="" horiz-adv-x="900"
|
||||
d="M350 800c193 0 350 -157 350 -350c0 -60 -17 -117 -44 -166c5 -3 12 -8 16 -12l100 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 100c-4 3 -9 9 -12 13c-49 -26 -107 -41 -166 -41c-193 0 -350 157 -350 350s157 350 350 350zM350 200
|
||||
c142 0 250 108 250 250c0 139 -111 250 -250 250s-250 -111 -250 -250s111 -250 250 -250z" />
|
||||
<glyph glyph-name="90" unicode="" horiz-adv-x="600"
|
||||
d="M300 800c166 0 300 -134 300 -300c0 -200 -300 -500 -300 -500s-300 300 -300 500c0 166 134 300 300 300zM300 700c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200z" />
|
||||
<glyph glyph-name="91" unicode="" horiz-adv-x="900"
|
||||
d="M0 800h800v-541c1 -3 1 -8 1 -11s0 -7 -1 -10v-238h-800v800zM495 250c0 26 22 50 50 50h5h150v400h-600v-600h600v100h-150h-5c-28 0 -50 22 -50 50zM350 600c83 0 150 -67 150 -150c0 -100 -150 -250 -150 -250s-150 150 -150 250c0 83 67 150 150 150zM350 500
|
||||
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="92" unicode="" horiz-adv-x="600"
|
||||
d="M0 700h200v-600h-200v600zM400 700h200v-600h-200v600z" />
|
||||
<glyph glyph-name="93" unicode="" horiz-adv-x="600"
|
||||
d="M0 700l600 -300l-600 -300v600z" />
|
||||
<glyph glyph-name="94" unicode="" horiz-adv-x="600"
|
||||
d="M300 700c166 0 300 -134 300 -300s-134 -300 -300 -300s-300 134 -300 300s134 300 300 300z" />
|
||||
<glyph glyph-name="95" unicode=""
|
||||
d="M400 700v-600l-400 300zM400 400l400 300v-600z" />
|
||||
<glyph glyph-name="96" unicode=""
|
||||
d="M0 700l400 -300l-400 -300v600zM400 100v600l400 -300z" />
|
||||
<glyph glyph-name="97" unicode=""
|
||||
d="M0 700h200v-600h-200v600zM200 400l500 300v-600z" />
|
||||
<glyph glyph-name="98" unicode=""
|
||||
d="M0 700l500 -300l-500 -300v600zM500 100v600h200v-600h-200z" />
|
||||
<glyph glyph-name="99" unicode="" horiz-adv-x="600"
|
||||
d="M0 700h600v-600h-600v600z" />
|
||||
<glyph glyph-name="9a" unicode=""
|
||||
d="M200 800h400v-200h200v-400h-200v-200h-400v200h-200v400h200v200z" />
|
||||
<glyph glyph-name="9b" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 403h800v-100h-800v100zM0 103h800v-100h-800v100z" />
|
||||
<glyph glyph-name="9c" unicode="" horiz-adv-x="600"
|
||||
d="M278 700c7 2 13 4 22 4c55 0 100 -45 100 -100v-4v-200c0 -55 -45 -100 -100 -100s-100 45 -100 100v200v2c0 44 35 88 78 98zM34 500h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-50c0 -111 89 -200 200 -200s200 89 200 200v50c0 28 22 50 50 50s50 -22 50 -50v-50
|
||||
c0 -148 -109 -270 -250 -294v-106h50c55 0 100 -45 100 -100h-400c0 55 45 100 100 100h50v106c-141 24 -250 146 -250 294v50v2c0 20 15 42 34 48z" />
|
||||
<glyph glyph-name="9d" unicode=""
|
||||
d="M0 500h800v-200h-800v200z" />
|
||||
<glyph glyph-name="9e" unicode=""
|
||||
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-500c0 -28 -22 -50 -50 -50h-250v-100h100c55 0 100 -45 100 -100h-600c0 55 45 100 100 100h100v100h-250c-28 0 -50 22 -50 50v500v2c0 20 15 42 34 48zM100 600v-400h600v400h-600z" />
|
||||
<glyph glyph-name="9f" unicode=""
|
||||
d="M272 700c-14 -40 -22 -83 -22 -128c0 -221 179 -400 400 -400c45 0 88 8 128 22c-53 -158 -202 -272 -378 -272c-221 0 -400 179 -400 400c0 176 114 325 272 378z" />
|
||||
<glyph glyph-name="a0" unicode=""
|
||||
d="M350 700l150 -150h-100v-150h150v100l150 -150l-150 -150v100h-150v-150h100l-150 -150l-150 150h100v150h-150v-100l-150 150l150 150v-100h150v150h-100z" />
|
||||
<glyph glyph-name="a1" unicode=""
|
||||
d="M800 800v-550c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v206c-201 -6 -327 -27 -400 -50v-397c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v409s100 100 600 100z" />
|
||||
<glyph glyph-name="a2" unicode="" horiz-adv-x="700"
|
||||
d="M499 700c51 0 102 -20 141 -59c78 -78 78 -203 0 -281l-250 -244c-48 -48 -127 -48 -175 0s-48 127 0 175l96 97l69 -69l-90 -94l-7 -3c-10 -10 -10 -28 0 -38s28 -10 38 0l250 247c37 40 39 102 0 141s-104 40 -144 0l-278 -275c-66 -69 -68 -179 0 -247
|
||||
c69 -69 181 -69 250 0l9 12l116 113l69 -69l-125 -125c-107 -107 -281 -107 -388 0s-107 281 0 388l278 272c39 39 90 59 141 59z" />
|
||||
<glyph glyph-name="a3" unicode=""
|
||||
d="M600 800l200 -200l-100 -100l-200 200zM400 600l200 -200l-400 -400h-200v200z" />
|
||||
<glyph glyph-name="a4" unicode=""
|
||||
d="M550 800c83 0 150 -90 150 -200s-67 -200 -150 -200c-22 0 -40 8 -59 19c6 26 9 52 9 81c0 84 -27 158 -72 212c27 52 71 88 122 88zM250 700c83 0 150 -90 150 -200s-67 -200 -150 -200s-150 90 -150 200s67 200 150 200zM725 384c44 -22 75 -66 75 -118v-166h-200v66
|
||||
c0 50 -17 96 -44 134c66 2 126 33 169 84zM75 284c45 -53 106 -84 175 -84s130 31 175 84c44 -22 75 -66 75 -118v-166h-500v166c0 52 31 96 75 118z" />
|
||||
<glyph glyph-name="a5" unicode=""
|
||||
d="M400 800c110 0 200 -112 200 -250s-90 -250 -200 -250s-200 112 -200 250s90 250 200 250zM191 300c54 -61 128 -100 209 -100s155 39 209 100c106 -5 191 -92 191 -200v-100h-800v100c0 108 85 195 191 200z" />
|
||||
<glyph glyph-name="a6" unicode="" horiz-adv-x="600"
|
||||
d="M19 800h462c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-462c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 700v-500h300v500h-300zM250 150c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="a7" unicode=""
|
||||
d="M350 800c17 0 34 -1 50 -3v-397l-297 297c63 64 150 103 247 103zM500 694c169 -25 300 -168 300 -344c0 -193 -157 -350 -350 -350c-85 0 -161 31 -222 81l272 272v341zM91 562l237 -234l-212 -212c-70 55 -116 138 -116 234c0 84 35 158 91 212z" />
|
||||
<glyph glyph-name="a8" unicode=""
|
||||
d="M92 650c0 23 20 50 46 50h3h4h5h400c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-200h100c55 0 100 -45 100 -100h-300v-300l-56 -100l-44 100v300h-300c0 55 45 100 100 100h100v200h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
|
||||
<glyph glyph-name="a9" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 600v-400l300 200z" />
|
||||
<glyph glyph-name="aa" unicode=""
|
||||
d="M300 800h200v-300h300v-200h-300v-300h-200v300h-300v200h300v300z" />
|
||||
<glyph glyph-name="ab" unicode=""
|
||||
d="M300 800h100v-400h-100v400zM172 656l62 -78l-40 -31c-58 -46 -94 -117 -94 -197c0 -139 111 -250 250 -250s250 111 250 250c0 80 -39 151 -97 197l-37 31l62 78l38 -31c82 -64 134 -164 134 -275c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 111 53 211 134 275z
|
||||
" />
|
||||
<glyph glyph-name="ac" unicode=""
|
||||
d="M200 800h400v-200h-400v200zM9 500h782c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-91v200h-600v-200h-91c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM200 300h400v-300h-400v300z" />
|
||||
<glyph glyph-name="ad" unicode=""
|
||||
d="M0 700h100v-700h-100v700zM700 700h100v-700h-100v700zM200 600h200v-100h-200v100zM300 400h200v-100h-200v100zM400 200h200v-100h-200v100z" />
|
||||
<glyph glyph-name="ae" unicode=""
|
||||
d="M325 700c42 -141 87 -280 131 -419c29 74 59 148 88 222c30 -57 58 -114 87 -172h169v-100h-231l-13 28c-37 -92 -74 -184 -112 -275c-38 129 -79 257 -119 385c-42 -133 -83 -267 -125 -400c-28 88 -56 175 -84 262h-116v100h188l9 -34l3 -6c42 137 83 273 125 409z" />
|
||||
<glyph glyph-name="af" unicode=""
|
||||
d="M200 600c0 57 43 100 100 100s100 -43 100 -100c0 -28 -18 -48 -28 -72c-3 -6 -3 -16 -3 -28h231v-231c12 0 22 0 28 3c24 10 44 28 72 28c57 0 100 -43 100 -100s-43 -100 -100 -100c-28 0 -48 18 -72 28c-6 3 -16 3 -28 3v-231h-231c0 12 0 22 3 28c10 24 28 44 28 72
|
||||
c0 57 -43 100 -100 100s-100 -43 -100 -100c0 -28 18 -48 28 -72c3 -6 3 -16 3 -28h-231v600h231c0 12 0 22 -3 28c-10 24 -28 44 -28 72z" />
|
||||
<glyph glyph-name="b0" unicode="" horiz-adv-x="500"
|
||||
d="M247 700c84 0 148 -20 191 -59s59 -93 59 -141c0 -117 -69 -181 -119 -225s-81 -67 -81 -150v-25h-100v25c0 117 65 181 115 225s85 67 85 150c0 25 -8 48 -28 66s-56 34 -122 34s-97 -18 -116 -37s-27 -43 -31 -69l-100 12c5 38 19 88 59 128s103 66 188 66zM197 0h100
|
||||
v-100h-100v100z" />
|
||||
<glyph glyph-name="b1" unicode=""
|
||||
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -69 -48 -127 -112 -144c-22 55 -75 94 -138 94c-20 0 -39 -5 -56 -12c-17 64 -75 112 -144 112s-127 -48 -144 -112c-17 7 -36 12 -56 12c-37 0 -71 -12 -97 -34c-33 36 -53 82 -53 134
|
||||
c0 110 90 200 200 200c23 114 129 200 250 200zM334 300h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-200c0 -28 -22 -50 -50 -50s-50 22 -50 50v200v2c0 20 15 42 34 48zM134 200h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2
|
||||
c0 20 15 42 34 48zM534 200h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2c0 20 15 42 34 48z" />
|
||||
<glyph glyph-name="b2" unicode=""
|
||||
d="M600 800l200 -150l-200 -150v100h-50l-153 -191l175 -206l6 -3h22v100l200 -150l-200 -150v100h-25c-35 0 -56 12 -78 38l-166 190l-153 -190c-22 -27 -43 -38 -78 -38h-100v100h100l166 206l-163 191l-3 3h-100v100h100c34 0 56 -12 78 -38l153 -178l141 178
|
||||
c22 27 43 38 78 38h50v100z" />
|
||||
<glyph glyph-name="b3" unicode=""
|
||||
d="M400 800c110 0 209 -47 281 -119l119 119v-300h-300l109 109c-54 55 -126 91 -209 91c-166 0 -300 -134 -300 -300s134 -300 300 -300c83 0 158 34 212 88l72 -72c-72 -72 -174 -116 -284 -116c-220 0 -400 180 -400 400s180 400 400 400z" />
|
||||
<glyph glyph-name="b4" unicode=""
|
||||
d="M400 800h400v-400l-166 166l-400 -400l166 -166h-400v400l166 -166l400 400z" />
|
||||
<glyph glyph-name="b5" unicode="" horiz-adv-x="600"
|
||||
d="M250 800l250 -300h-200v-200h200l-250 -300l-250 300h200v200h-200z" />
|
||||
<glyph glyph-name="b6" unicode=""
|
||||
d="M300 600v-200h200v200l300 -250l-300 -250v200h-200v-200l-300 250z" />
|
||||
<glyph glyph-name="b7" unicode=""
|
||||
d="M0 800c441 0 800 -359 800 -800h-200c0 333 -267 600 -600 600v200zM0 500c275 0 500 -225 500 -500h-200c0 167 -133 300 -300 300v200zM0 200c110 0 200 -90 200 -200h-200v200z" />
|
||||
<glyph glyph-name="b8" unicode=""
|
||||
d="M100 800c386 0 700 -314 700 -700h-100c0 332 -268 600 -600 600v100zM100 600c276 0 500 -224 500 -500h-100c0 222 -178 400 -400 400v100zM100 400c165 0 300 -135 300 -300h-100c0 111 -89 200 -200 200v100zM100 200c55 0 100 -45 100 -100s-45 -100 -100 -100
|
||||
s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="b9" unicode=""
|
||||
d="M300 800h400c55 0 100 -45 100 -100v-200h-400v150c0 28 -22 50 -50 50s-50 -22 -50 -50v-250h400v-300c0 -55 -45 -100 -100 -100h-500c-55 0 -100 45 -100 100v200h100v-150c0 -28 22 -50 50 -50s50 22 50 50v550c0 55 45 100 100 100z" />
|
||||
<glyph glyph-name="ba" unicode=""
|
||||
d="M75 700h225v-100h-200v-500h400v100h100v-125c0 -41 -34 -75 -75 -75h-450c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM600 700l200 -200l-200 -200v100h-200c-94 0 -173 -65 -194 -153c23 199 189 353 394 353v100z" />
|
||||
<glyph glyph-name="bb" unicode=""
|
||||
d="M500 700l300 -284l-300 -316v200h-100c-200 0 -348 -102 -400 -300c0 295 100 500 500 500v200z" />
|
||||
<glyph glyph-name="bc" unicode=""
|
||||
d="M381 791l19 9l19 -9c127 -53 253 -108 381 -160v-31c0 -166 -67 -313 -147 -419c-40 -53 -83 -97 -125 -128s-82 -53 -128 -53s-86 22 -128 53s-85 75 -125 128c-80 107 -147 253 -147 419v31c128 52 254 107 381 160zM400 100v591l-294 -122c8 -126 58 -243 122 -328
|
||||
c35 -46 73 -86 106 -110s62 -31 66 -31z" />
|
||||
<glyph glyph-name="bd" unicode=""
|
||||
d="M600 800h100v-800h-100v800zM400 700h100v-700h-100v700zM200 500h100v-500h-100v500zM0 300h100v-300h-100v300z" />
|
||||
<glyph glyph-name="be" unicode=""
|
||||
d="M300 800h100v-200h200l100 -100l-100 -100h-200v-400h-100v500h-200l-100 100l100 100h200v100z" />
|
||||
<glyph glyph-name="bf" unicode=""
|
||||
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h200v-100h-200v100zM400 600h300v-100h-300v100zM400 400h400v-100h-400v100z" />
|
||||
<glyph glyph-name="c0" unicode=""
|
||||
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h400v-100h-400v100zM400 600h300v-100h-300v100zM400 400h200v-100h-200v100z" />
|
||||
<glyph glyph-name="c1" unicode=""
|
||||
d="M75 700h650c41 0 75 -34 75 -75v-550c0 -41 -34 -75 -75 -75h-650c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM100 600v-100h100v100h-100zM300 600v-100h400v100h-400zM100 400v-100h100v100h-100zM300 400v-100h400v100h-400zM100 200v-100h100v100h-100zM300 200
|
||||
v-100h400v100h-400z" />
|
||||
<glyph glyph-name="c2" unicode=""
|
||||
d="M400 800l100 -300h300l-250 -200l100 -300l-250 200l-250 -200l100 300l-250 200h300z" />
|
||||
<glyph glyph-name="c3" unicode=""
|
||||
d="M400 800c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM650 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 600c110 0 200 -90 200 -200
|
||||
s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM50 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM750 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
|
||||
s22 50 50 50zM650 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="c4" unicode=""
|
||||
d="M34 800h632c18 0 34 -16 34 -34v-732c0 -18 -16 -34 -34 -34h-632c-18 0 -34 16 -34 34v732c0 18 16 34 34 34zM100 700v-500h500v500h-500zM350 150c-38 0 -63 -42 -44 -75s69 -33 88 0s-6 75 -44 75z" />
|
||||
<glyph glyph-name="c5" unicode=""
|
||||
d="M0 800h300l500 -500l-300 -300l-500 500v300zM200 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
|
||||
<glyph glyph-name="c6" unicode=""
|
||||
d="M0 600h200l300 -300l-200 -200l-300 300v200zM340 600h160l300 -300l-200 -200l-78 78l119 122zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="c7" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200
|
||||
s90 200 200 200zM400 500c-56 0 -100 -44 -100 -100s44 -100 100 -100s100 44 100 100s-44 100 -100 100z" />
|
||||
<glyph glyph-name="c8" unicode=""
|
||||
d="M0 700h559l-100 -100h-359v-500h500v159l100 100v-359h-700v700zM700 700l100 -100l-400 -400l-200 200l100 100l100 -100z" />
|
||||
<glyph glyph-name="c9" unicode=""
|
||||
d="M9 800h782c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM150 722l-72 -72l100 -100l-100 -100l72 -72l172 172zM400 500v-100h300v100h-300z" />
|
||||
<glyph glyph-name="ca" unicode=""
|
||||
d="M0 800h800v-200h-50c0 55 -45 100 -100 100h-150v-550c0 -28 22 -50 50 -50h50v-100h-400v100h50c28 0 50 22 50 50v550h-150c-55 0 -100 -45 -100 -100h-50v200z" />
|
||||
<glyph glyph-name="cb" unicode=""
|
||||
d="M0 700h100v-400h-100v400zM200 700h350c21 0 39 -13 47 -31c0 0 103 -291 103 -319s-22 -50 -50 -50h-150c-28 0 -50 -25 -50 -50s39 -158 47 -184s-5 -55 -31 -63s-52 5 -66 31s-109 219 -128 238s-44 28 -72 28v400z" />
|
||||
<glyph glyph-name="cc" unicode=""
|
||||
d="M400 666c10 19 28 32 47 34l19 -3c26 -8 39 -37 31 -63s-47 -159 -47 -184s22 -50 50 -50h150c28 0 50 -22 50 -50s-103 -319 -103 -319c-8 -18 -26 -31 -47 -31h-350v400c28 0 53 9 72 28s114 212 128 238zM0 400h100v-400h-100v400z" />
|
||||
<glyph glyph-name="cd" unicode=""
|
||||
d="M200 700h300v-100h-100v-6c25 -4 50 -8 72 -16l-34 -94c-28 11 -58 16 -88 16c-139 0 -250 -111 -250 -250s111 -250 250 -250s250 111 250 250c0 31 -5 60 -16 88l91 37c14 -38 25 -81 25 -125c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 176 130 323 300 347v3
|
||||
h-100v100zM700 584c0 0 -296 -348 -316 -368s-48 -20 -68 0s-20 48 0 68s384 300 384 300z" />
|
||||
<glyph glyph-name="ce" unicode=""
|
||||
d="M600 700l200 -150l-200 -150v100h-600v100h600v100zM200 300v-100h600v-100h-600v-100l-200 150z" />
|
||||
<glyph glyph-name="cf" unicode=""
|
||||
d="M300 800h100c55 0 100 -45 100 -100h100c55 0 100 -45 100 -100h-700c0 55 45 100 100 100h100c0 55 45 100 100 100zM100 500h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-481c0 -11 -8 -19 -19 -19h-462
|
||||
c-11 0 -19 8 -19 19v481z" />
|
||||
<glyph glyph-name="d0" unicode=""
|
||||
d="M100 800h200v-400c0 -55 45 -100 100 -100s100 45 100 100v400h100v-400c0 -110 -90 -200 -200 -200h-50c-138 0 -250 90 -250 200v400zM0 100h700v-100h-700v100z" />
|
||||
<glyph glyph-name="d1" unicode=""
|
||||
d="M9 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM609 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282
|
||||
c0 6 3 9 9 9zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="d2" unicode=""
|
||||
d="M10 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 4 9 10 9zM610 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 5 9 10 9zM310 600h181c6 0 9 -3 9 -9v-91h-200v91c0 6 4 9 10 9zM0 400h800v-100h-800v100zM0 200h200v-191c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v191zM300 200
|
||||
h200v-91c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v91zM600 200h200v-191c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v191z" />
|
||||
<glyph glyph-name="d3" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM9 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM609 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182
|
||||
c-6 0 -9 3 -9 9v482c0 6 3 9 9 9z" />
|
||||
<glyph glyph-name="d4" unicode=""
|
||||
d="M50 600h500c28 0 50 -22 50 -50v-150l100 100h100v-300h-100l-100 100v-150c0 -28 -22 -50 -50 -50h-500c-28 0 -50 22 -50 50v400c0 28 22 50 50 50z" />
|
||||
<glyph glyph-name="d5" unicode=""
|
||||
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 600v100c26 0 52 -4 75 -10c130 -33 225 -150 225 -290s-95 -258 -225 -291h-3c-23 -6 -47 -9 -72 -9v100c17 0 34 2 50 6c86 22 150 100 150 194s-64 172 -150 194c-16 4 -33 6 -50 6zM500 500l25 -3
|
||||
c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
|
||||
<glyph glyph-name="d6" unicode="" horiz-adv-x="600"
|
||||
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 500l25 -3c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
|
||||
<glyph glyph-name="d7" unicode="" horiz-adv-x="400"
|
||||
d="M334 800h66v-800h-66l-134 200h-200v400h200z" />
|
||||
<glyph glyph-name="d8" unicode=""
|
||||
d="M309 800h82c6 0 10 -4 12 -9l294 -682l3 -19v-81c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v81l3 19l294 682c2 5 6 9 12 9zM300 500v-200h100v200h-100zM300 200v-100h100v100h-100z" />
|
||||
<glyph glyph-name="d9" unicode=""
|
||||
d="M375 800c138 0 269 -39 378 -109l-53 -82c-93 60 -205 91 -325 91c-119 0 -229 -32 -322 -91l-53 82c109 70 237 109 375 109zM375 500c78 0 154 -23 216 -62l-53 -85c-46 30 -104 47 -163 47c-60 0 -112 -17 -159 -47l-54 85c62 40 134 62 213 62zM375 200
|
||||
c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="da" unicode="" horiz-adv-x="900"
|
||||
d="M551 800c16 0 32 0 47 -3l-97 -97v-200h200l97 97c3 -15 3 -31 3 -47c0 -138 -112 -250 -250 -250c-32 0 -62 8 -90 19l-288 -291c-20 -20 -46 -28 -72 -28s-52 8 -72 28c-39 39 -39 105 0 144l291 287c-11 28 -19 59 -19 91c0 138 112 250 250 250zM101 150
|
||||
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="db" unicode=""
|
||||
d="M141 700c84 -84 169 -167 253 -250c82 83 167 165 247 250l143 -141l-253 -253c84 -82 167 -166 253 -247l-143 -143c-81 86 -165 169 -247 253l-253 -253l-141 143c85 80 167 164 250 247c-83 84 -166 169 -250 253z" />
|
||||
<glyph glyph-name="dc" unicode=""
|
||||
d="M0 800h100l231 -300h38l231 300h100l-225 -300h225v-100h-300v-100h300v-100h-300v-200h-100v200h-300v100h300v100h-300v100h225z" />
|
||||
<glyph glyph-name="dd" unicode="" horiz-adv-x="900"
|
||||
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
|
||||
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM300 600h100v-100h100v-100h-100v-100h-100v100h-100v100h100v100z" />
|
||||
<glyph glyph-name="de" unicode="" horiz-adv-x="900"
|
||||
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
|
||||
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM200 500h300v-100h-300v100z" />
|
||||
</font>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 54 KiB |
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
Normal file
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
Normal file
Binary file not shown.
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
Normal file
BIN
BlazorApp1/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
Normal file
Binary file not shown.
BIN
BlazorApp1/wwwroot/favicon.png
Normal file
BIN
BlazorApp1/wwwroot/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
BlazorApp1/wwwroot/icon-192.png
Normal file
BIN
BlazorApp1/wwwroot/icon-192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
32
BlazorApp1/wwwroot/index.html
Normal file
32
BlazorApp1/wwwroot/index.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>BlazorApp1</title>
|
||||
<base href="/" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="css/app.css" rel="stylesheet" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<link href="BlazorApp1.styles.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<svg class="loading-progress">
|
||||
<circle r="40%" cx="50%" cy="50%" />
|
||||
<circle r="40%" cx="50%" cy="50%" />
|
||||
</svg>
|
||||
<div class="loading-progress-text"></div>
|
||||
</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
27
BlazorApp1/wwwroot/sample-data/weather.json
Normal file
27
BlazorApp1/wwwroot/sample-data/weather.json
Normal file
@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"date": "2022-01-06",
|
||||
"temperatureC": 1,
|
||||
"summary": "Freezing"
|
||||
},
|
||||
{
|
||||
"date": "2022-01-07",
|
||||
"temperatureC": 14,
|
||||
"summary": "Bracing"
|
||||
},
|
||||
{
|
||||
"date": "2022-01-08",
|
||||
"temperatureC": -13,
|
||||
"summary": "Freezing"
|
||||
},
|
||||
{
|
||||
"date": "2022-01-09",
|
||||
"temperatureC": -16,
|
||||
"summary": "Balmy"
|
||||
},
|
||||
{
|
||||
"date": "2022-01-10",
|
||||
"temperatureC": -2,
|
||||
"summary": "Chilly"
|
||||
}
|
||||
]
|
@ -67,15 +67,6 @@
|
||||
<Reference Include="FIWinLib">
|
||||
<HintPath>..\Reflib\FIWinLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ForesightServicesClient">
|
||||
<HintPath>..\Reflib\ForesightServicesClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="iisitebase">
|
||||
<HintPath>..\Reflib\iisitebase.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="iisyslib">
|
||||
<HintPath>..\Reflib\iisyslib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\Reflib\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
@ -90,7 +81,6 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="IronIntelDebugHost.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
@ -1,14 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using IronIntel.Contractor.MapView;
|
||||
using IronIntel.Contractor.Users;
|
||||
using IronIntel.Contractor.Machines;
|
||||
using IronIntel.Contractor;
|
||||
using FI.FIC.Extention;
|
||||
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace ConsoleApplication1
|
||||
{
|
||||
@ -16,30 +10,112 @@ namespace ConsoleApplication1
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string fn = "IronIntel.Contractor.FICExtDataTable.AssetTripsDataTable,iicontractorbl";
|
||||
//string fn = "IronIntel.Contractor.FICExtDataTable.AssetTripsDataTable,iicontractorbl";
|
||||
|
||||
Type intftype = typeof(IExtDataTable);
|
||||
Type tp = Type.GetType(fn);
|
||||
if (!tp.IsAbstract && tp.IsClass &&tp.IsPublic&& tp.GetInterface(intftype.FullName) != null)
|
||||
{
|
||||
//Type intftype = typeof(IExtDataTable);
|
||||
//Type tp = Type.GetType(fn);
|
||||
//if (!tp.IsAbstract && tp.IsClass &&tp.IsPublic&& tp.GetInterface(intftype.FullName) != null)
|
||||
//{
|
||||
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
IExtDataTable ext = Activator.CreateInstance(tp) as IExtDataTable;
|
||||
//IExtDataTable ext = Activator.CreateInstance(tp) as IExtDataTable;
|
||||
|
||||
Console.WriteLine(ext.ID);
|
||||
//Console.WriteLine(ext.ID);
|
||||
|
||||
Guid gd = new Guid("10000000-0000-0000-0000-100000000001");
|
||||
//Guid gd = new Guid("10000000-0000-0000-0000-100000000001");
|
||||
|
||||
|
||||
//for (var a = 9; a >= 0; a--)
|
||||
//{
|
||||
// for (var b = 9; b >= 0; b--)
|
||||
// {
|
||||
// for (var c = 9; c >= 0; c--)
|
||||
// {
|
||||
// if ((2000 + a * 100 + b * 10 + c) % 13 == 0)
|
||||
// {
|
||||
// Console.WriteLine($"number is 2{a}{b}{c}");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
Console.ReadLine();
|
||||
//const string file = @"C:\Users\cl\Desktop\languages.csv";
|
||||
//var lines = File.ReadAllLines(file);
|
||||
//var xml = new XDocument();
|
||||
//var root = new XElement("Category");
|
||||
//root.Add(new XAttribute("desc", "Communication"));
|
||||
//xml.Add(root);
|
||||
//foreach (var line in lines)
|
||||
//{
|
||||
// var index = line.IndexOf(',');
|
||||
// var key = line.Substring(0, index);
|
||||
// var value = line.Substring(index + 1).Replace("\\n", "\n");
|
||||
// var xe = new XElement(key);
|
||||
// xe.Add(new XElement("en", value));
|
||||
// xe.Add(new XElement("fr", string.Empty));
|
||||
// xe.Add(new XElement("zh", string.Empty));
|
||||
// root.Add(xe);
|
||||
//}
|
||||
//Console.WriteLine(xml.ToString());
|
||||
|
||||
//var random = new Random();
|
||||
//var data = new byte[12];
|
||||
//for (var i = 0; i < 20; i++)
|
||||
//{
|
||||
// for (var j = 0; j < 12; j++)
|
||||
// {
|
||||
// data[j] = (byte)random.Next('0', '9');
|
||||
// }
|
||||
// Console.WriteLine(Convert.ToBase64String(data));
|
||||
//}
|
||||
|
||||
//var path = @"D:\IronIntel\Mobile\FleetViewMobile\FleetViewClientLib\FleetResources\TextResource.xml";
|
||||
//var pt = @"C:\Users\cl\Desktop\pt_langs.txt";
|
||||
//var dict = new Dictionary<string, string>();
|
||||
//foreach (var l in File.ReadAllLines(pt))
|
||||
//{
|
||||
// var arr = l.Split('\t');
|
||||
// if (dict.TryGetValue(arr[0], out var val))
|
||||
// {
|
||||
// Console.WriteLine($"duplicated item: {arr[0]}({val}), new value: {arr[1]}");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dict.Add(arr[0], arr[1]);
|
||||
// }
|
||||
//}
|
||||
//var ofile = @"C:\Users\cl\Downloads\TextResource.xml";
|
||||
//var doc = XDocument.Load(path);
|
||||
//var newDoc = new XDocument();
|
||||
//var newRoot = new XElement("root");
|
||||
//newDoc.Add(newRoot);
|
||||
//foreach (var node in doc.Root.Elements())
|
||||
//{
|
||||
// var key = node.Name.LocalName;
|
||||
// if (dict.TryGetValue(key, out string ptl))
|
||||
// {
|
||||
// node.Add(new XElement("pt", ptl));
|
||||
// var ele = newRoot.Element(key);
|
||||
// if (ele == null)
|
||||
// {
|
||||
// newRoot.Add(node);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine($"duplicate child node: {ele}, new node: {node}");
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine($"cannot find language id: {key}");
|
||||
// }
|
||||
//}
|
||||
//newDoc.Save(ofile);
|
||||
|
||||
Console.Write("done.");
|
||||
Console.ReadKey(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
BIN
Contractor.7z
Normal file
BIN
Contractor.7z
Normal file
Binary file not shown.
@ -61,7 +61,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FleetClientBase", "..\..\..
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FleetServiceClient", "..\..\..\ForesightServices\Service\DataModel\FleetServiceClient\FleetServiceClient.csproj", "{A872B915-D7F0-4E7F-81E7-742DBB4DBBBA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FIChartLib", "..\..\..\FI\FICore\FIChartLib\FIChartLib.csproj", "{C181BD0E-4B98-4ADC-BA92-BB389550D1F6}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FIChartLib", "..\..\..\FI\FICore\FIChartLib\FIChartLib.csproj", "{E5090CF1-A38C-42A3-8F55-636FE6A84C75}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorApp1", "BlazorApp1\BlazorApp1.csproj", "{96100C88-5479-465C-BB57-AFB1F8ED8BFD}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp1", "C:\Users\cl\source\repos\ConsoleApp1\ConsoleApp1.csproj", "{38577D80-8721-4532-9B9B-98B2106F350E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -133,10 +137,18 @@ Global
|
||||
{A872B915-D7F0-4E7F-81E7-742DBB4DBBBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A872B915-D7F0-4E7F-81E7-742DBB4DBBBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A872B915-D7F0-4E7F-81E7-742DBB4DBBBA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C181BD0E-4B98-4ADC-BA92-BB389550D1F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C181BD0E-4B98-4ADC-BA92-BB389550D1F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C181BD0E-4B98-4ADC-BA92-BB389550D1F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C181BD0E-4B98-4ADC-BA92-BB389550D1F6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E5090CF1-A38C-42A3-8F55-636FE6A84C75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E5090CF1-A38C-42A3-8F55-636FE6A84C75}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E5090CF1-A38C-42A3-8F55-636FE6A84C75}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E5090CF1-A38C-42A3-8F55-636FE6A84C75}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{96100C88-5479-465C-BB57-AFB1F8ED8BFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{96100C88-5479-465C-BB57-AFB1F8ED8BFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{96100C88-5479-465C-BB57-AFB1F8ED8BFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{96100C88-5479-465C-BB57-AFB1F8ED8BFD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{38577D80-8721-4532-9B9B-98B2106F350E}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{38577D80-8721-4532-9B9B-98B2106F350E}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{38577D80-8721-4532-9B9B-98B2106F350E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{38577D80-8721-4532-9B9B-98B2106F350E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -152,7 +164,7 @@ Global
|
||||
{8650F244-1D1A-4627-8B15-8FFA4B34932F} = {A29EDD95-7564-4A09-AD02-4FF284082DA9}
|
||||
{B0110465-8537-4FE7-BEE6-B10FAA0BA92D} = {B7B7275E-2530-4E8D-9AE3-C49B4BADCF67}
|
||||
{A872B915-D7F0-4E7F-81E7-742DBB4DBBBA} = {B7B7275E-2530-4E8D-9AE3-C49B4BADCF67}
|
||||
{C181BD0E-4B98-4ADC-BA92-BB389550D1F6} = {A29EDD95-7564-4A09-AD02-4FF284082DA9}
|
||||
{E5090CF1-A38C-42A3-8F55-636FE6A84C75} = {A29EDD95-7564-4A09-AD02-4FF284082DA9}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {BAE453CC-00EC-4D9C-902A-AF8F249C8653}
|
||||
|
@ -1,46 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="DbConntionString" value="Data Source=192.168.25.215\ironintel;Initial Catalog=FORESIGHT_FLV_IICON004;Integrated Security=false;User ID=fi;Password=database" />
|
||||
<add key="JRE_IronIntelDb" value="Data Source=192.168.25.215\ironintel;Initial Catalog=JRE_IRONINTEL;Integrated Security=false;User ID=fi;Password=database" />
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
<add key="DbConntionString" value="Data Source=192.168.25.215\ironintel;Initial Catalog=IRONINTEL_IRONDEV;Integrated Security=false;User ID=fi;Password=database"/>
|
||||
<add key="JRE_IronIntelDb" value="Data Source=192.168.25.215\ironintel;Initial Catalog=JRE_IRONINTEL;Integrated Security=false;User ID=fi;Password=database"/>
|
||||
<add key="ClientSettingsProvider.ServiceUri" value=""/>
|
||||
</appSettings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<system.web>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
<providers>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Data.SqlClient" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.6.1.1" newVersion="4.6.1.1" />
|
||||
<assemblyIdentity name="System.Data.SqlClient" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.6.1.1" newVersion="4.6.1.1"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
@ -3,94 +3,91 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Foresight.Cache;
|
||||
using Foresight.Service.Cache;
|
||||
using Foresight.Fleet.Services.SystemOption;
|
||||
using Foresight.Fleet.Services;
|
||||
using Foresight.Fleet.Services.Customer;
|
||||
|
||||
namespace IronIntel.Contractor
|
||||
{
|
||||
public static class CacheManager
|
||||
{
|
||||
private static CacheClient _Client = null;
|
||||
private static object _sycobj = new object();
|
||||
|
||||
private static CacheClient CreateRedisClient()
|
||||
private static string CacheRegion
|
||||
{
|
||||
string[] servers = FleetServiceClientHelper.CreateClient<SystemOptionProvider>().GetCacheServiceAddress(SystemParams.CompanyID);
|
||||
if ((servers == null) || (servers.Length == 0))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new CacheClient("IRONINTEL_" + SystemParams.CompanyID.ToUpper(), servers);
|
||||
}
|
||||
}
|
||||
|
||||
private static CacheClient Client
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Client == null)
|
||||
{
|
||||
lock (_sycobj)
|
||||
{
|
||||
if (_Client == null)
|
||||
{
|
||||
_Client = CreateRedisClient();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _Client;
|
||||
}
|
||||
get { return "FLEET_" + SystemParams.CompanyID.ToUpper(); }
|
||||
}
|
||||
|
||||
public static void Remove(string key)
|
||||
{
|
||||
if (Client != null)
|
||||
var client = FleetServiceClientHelper.CreateClient<SystemUtil>();
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
Client.Remove(key);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
client.RemoveCache(CacheRegion, key);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
public static void SetValue(string key, byte[] buffer, TimeSpan expire)
|
||||
{
|
||||
if (buffer == null)
|
||||
var client = FleetServiceClientHelper.CreateClient<SystemUtil>();
|
||||
try
|
||||
{
|
||||
Remove(key);
|
||||
}
|
||||
else if (Client != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
Client.SetValue(key, buffer, expire);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
client.SetCache(CacheRegion, key, buffer, (int)expire.TotalSeconds);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
public static byte[] GetValue(string key)
|
||||
{
|
||||
if (Client != null)
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
return Client.GetValue(key);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var client = FleetServiceClientHelper.CreateClient<SystemUtil>();
|
||||
return client.GetCache(CacheRegion, key);
|
||||
}
|
||||
else
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void RemoveCustomerCache(string key)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<CustomerProvider>();
|
||||
try
|
||||
{
|
||||
client.RemoveCustomerCacheData(SystemParams.CompanyID, key);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
public static void SetCustomerCacheData(string key, byte[] buffer, TimeSpan expire)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<CustomerProvider>();
|
||||
try
|
||||
{
|
||||
client.SetCustomerCacheData(SystemParams.CompanyID, key, buffer);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
public static byte[] GetCustomerCacheData(string key)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<CustomerProvider>();
|
||||
return client.GetCustomerCacheData(SystemParams.CompanyID, key);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>IronIntel.Contractor</RootNamespace>
|
||||
<AssemblyName>iicontractorbl</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
@ -31,7 +31,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>LHBIS.snk</AssemblyOriginatorKeyFile>
|
||||
@ -69,12 +69,6 @@
|
||||
<Reference Include="FIWinLib">
|
||||
<HintPath>..\Reflib\FIWinLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Foresight.Service.Client">
|
||||
<HintPath>..\Reflib\Foresight.Service.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Foresight.ServiceModel">
|
||||
<HintPath>..\Reflib\Foresight.ServiceModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="irondbobjlib">
|
||||
<HintPath>..\Reflib\irondbobjlib.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -411,7 +411,7 @@ namespace IronIntel.Contractor
|
||||
CacheManager.SetValue(key, tmp, TimeSpan.FromSeconds(expirationsecond));
|
||||
}
|
||||
|
||||
public void SetCacheDataTable(string key, DataTable dt, int expirationsecond, bool slidingExpiration, DateTime createTime)
|
||||
public void SetCacheDataTable(string key, string datatableIID, DataTable dt, int expirationsecond, bool slidingExpiration, DateTime createTime)
|
||||
{
|
||||
if (dt == null)
|
||||
{
|
||||
@ -757,6 +757,64 @@ namespace IronIntel.Contractor
|
||||
client.DocumentExportAuditTrail(SystemParams.CompanyID, useriid, doctype, docid, notes, filename, filetype, filedata);
|
||||
}
|
||||
|
||||
private static bool IsValidPhoneNumber(string number)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(number))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
string s1 = number.Replace(" ", string.Empty)
|
||||
.Replace("(", string.Empty)
|
||||
.Replace(")", string.Empty)
|
||||
.Replace("-", string.Empty);
|
||||
|
||||
if(string.IsNullOrWhiteSpace(s1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (char c in s1)
|
||||
{
|
||||
if (c < '0' || c > '9')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public long SendSMS(string source, string sourceid, string sendingnumber, string receiverphonenumber, string message, string sender)
|
||||
{
|
||||
if(!IsValidPhoneNumber(sendingnumber))
|
||||
{
|
||||
throw new Exception("Invalid phone number: " + sendingnumber);
|
||||
}
|
||||
if(!IsValidPhoneNumber(receiverphonenumber))
|
||||
{
|
||||
throw new Exception("Invalid phone number: " + receiverphonenumber);
|
||||
}
|
||||
var client = FleetServiceClientHelper.CreateClient<SystemUtil>();
|
||||
return client.SendSMS(SystemParams.CompanyID, source, sourceid, sendingnumber, receiverphonenumber, message, sender);
|
||||
}
|
||||
|
||||
public int GetSMSStatus(long smsid)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<SystemUtil>();
|
||||
return client.GetSMSStatus(SystemParams.CompanyID, smsid);
|
||||
}
|
||||
|
||||
public long SendEMail(MailMessage message)
|
||||
{
|
||||
return SystemParams.SendMail(message);
|
||||
}
|
||||
|
||||
public int GetEmailStatus(long mailid)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<SystemUtil>();
|
||||
return client.GetEmailStatus(SystemParams.CompanyID, mailid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -65,6 +66,7 @@ namespace IronIntel.Contractor.Machines
|
||||
/// 前端选择的时区的分钟偏移
|
||||
/// </summary>
|
||||
public int OffsetMinute { get; set; }
|
||||
public string TimeZone { get; set; }
|
||||
public string DataSource { get; set; }
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Foresight.Fleet.Services.Asset;
|
||||
using DocumentFormat.OpenXml.Office2010.CustomUI;
|
||||
using Foresight.Fleet.Services.Asset;
|
||||
using Foresight.ServiceModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -8,78 +9,24 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace IronIntel.Contractor.Machines
|
||||
{
|
||||
public class AssetBasicItem
|
||||
public class AssetBasicItem : AssetBasicInfo
|
||||
{
|
||||
public long ID { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Name2 { get; set; }
|
||||
public string MakeName { get; set; }
|
||||
public string ModelName { get; set; }
|
||||
|
||||
private double _EngineHours;
|
||||
public double EngineHours
|
||||
{
|
||||
get
|
||||
{
|
||||
return _EngineHours;
|
||||
}
|
||||
set
|
||||
{
|
||||
value = value > 0 ? value : 0;
|
||||
_EngineHours = Math.Round(value, 2);
|
||||
}
|
||||
}
|
||||
|
||||
public string CalampDeviceAirID { get; set; }//PairedDeviceSN
|
||||
public bool TelematicsEnabled { get; set; }
|
||||
public bool Hide { get; set; }
|
||||
public bool OnRoad { get; set; }
|
||||
public bool Attachment { get; set; }
|
||||
|
||||
public bool Preloaded { get; set; }
|
||||
public int MakeYear { get; set; }
|
||||
public string DealerID { get; set; }
|
||||
public string Dealer { get; set; }
|
||||
public string ContractorID { get; set; }
|
||||
public string Contractor { get; set; }
|
||||
public string TypeName { get; set; }
|
||||
public int ModelID { get; set; }
|
||||
public int TypeID { get; set; }
|
||||
public int MakeID { get; set; }
|
||||
public string VIN { get; set; }
|
||||
public DateTime? EngineHoursDate { get; set; }
|
||||
public AssetShareStatus ShareStatus { get; set; }
|
||||
public DateTime? AddedTime { get; set; }
|
||||
public DateTime? AddedLocalTime { get; set; }
|
||||
|
||||
public double Odometer;
|
||||
public string OdometerUOM { get; set; }
|
||||
public DateTime? OdometerDate { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string AcquisitionType { get; set; }
|
||||
public string PMPlans { get; set; }
|
||||
public string AssetGroups { get; set; }
|
||||
public string Jobsites { get; set; }
|
||||
public AssetCustomStatus CustomStatus { get; set; }
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
//DisplayName取值顺序为Name2,Name,VIN,ID用于前端显示
|
||||
string name = Name2;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = Name;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = VIN;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = ID.ToString();
|
||||
return name;
|
||||
}
|
||||
}
|
||||
private const char SPLITCHAR = (char)175;
|
||||
public string AddedTimeStr { get { return (AddedLocalTime == null || AddedLocalTime.Value <= Helper.DBMinDateTime) ? "" : AddedLocalTime.Value.ToShortDateString(); } }
|
||||
public string EngineHoursDateStr { get { return (EngineHoursDate == null || EngineHoursDate.Value <= Helper.DBMinDateTime) ? "" : EngineHoursDate.Value.ToShortDateString(); } }
|
||||
public string EngineHoursDateTimeStr { get { return (EngineHoursDate == null || EngineHoursDate.Value <= Helper.DBMinDateTime) ? "" : EngineHoursDate.Value.ToString(); } }
|
||||
public string OdometerDateStr { get { return (OdometerDate == null || OdometerDate.Value <= Helper.DBMinDateTime) ? "" : OdometerDate.Value.ToShortDateString(); } }
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(base.ToString());
|
||||
sb.Append(SPLITCHAR + AddedTimeStr);
|
||||
sb.Append(SPLITCHAR + EngineHoursDateStr);
|
||||
sb.Append(SPLITCHAR + EngineHoursDateTimeStr);
|
||||
sb.Append(SPLITCHAR + OdometerDateStr);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,6 +80,7 @@ namespace IronIntel.Contractor.Machines
|
||||
/// 前端选择的时区的分钟偏移
|
||||
/// </summary>
|
||||
public int OffsetMinute { get; set; }
|
||||
public string TimeZone { get; set; }
|
||||
public string DataSource { get; set; }
|
||||
}
|
||||
public class CalampOdometerInfo
|
||||
|
@ -1,6 +1,8 @@
|
||||
using Foresight.Fleet.Services.AssetHealth;
|
||||
using Foresight.Standard;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -9,8 +11,11 @@ namespace IronIntel.Contractor.Maintenance
|
||||
{
|
||||
public class AlertInfo
|
||||
{
|
||||
private const char SPLITCHAR = (char)175;
|
||||
private const char SPLITCHAR1 = (char)181;
|
||||
public long AlertID { get; set; }
|
||||
public long WorkOrderID { get; set; }
|
||||
public string WorkOrderNumber { get; set; }
|
||||
public string WorkOrderStatus { get; set; }
|
||||
public string AlertType { get; set; }
|
||||
public DateTime AlertTime_UTC { get; set; }
|
||||
@ -82,10 +87,64 @@ namespace IronIntel.Contractor.Maintenance
|
||||
public string AcknowledgedTime_LocalStr { get { return AcknowledgedTime_Local == DateTime.MinValue ? "" : AcknowledgedTime_Local.ToString(); } }
|
||||
|
||||
public string AcknowledgedComment { get; set; }
|
||||
public string Comment { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
TextableDTO.Append(sb, AlertID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, WorkOrderID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, WorkOrderStatus);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AlertType);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AlertTime_UTC);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AlertTime_UTCStr);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AlertLocalTime);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AlertLocalTimeStr);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Completed ? "1" : "0");
|
||||
TextableDTO.Append(sb, SPLITCHAR, MachineID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, ModelID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Model);
|
||||
TextableDTO.Append(sb, SPLITCHAR, MakeID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Make);
|
||||
TextableDTO.Append(sb, SPLITCHAR, VIN);
|
||||
TextableDTO.Append(sb, SPLITCHAR, MachineName);
|
||||
TextableDTO.Append(sb, SPLITCHAR, EngineHours);
|
||||
TextableDTO.Append(sb, SPLITCHAR, CurrentHours);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Description);
|
||||
TextableDTO.Append(sb, SPLITCHAR, ServiceDescription);
|
||||
TextableDTO.Append(sb, SPLITCHAR, ScheduleID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, IntervalID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Recurring ? "1" : "0");
|
||||
TextableDTO.Append(sb, SPLITCHAR, Priority);
|
||||
TextableDTO.Append(sb, SPLITCHAR, ExpectedCost);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AlertCount);
|
||||
if (RepeatedAlerts != null && RepeatedAlerts.Count > 0)
|
||||
{
|
||||
string repeatedalertsstr = string.Join(SPLITCHAR1.ToString(), RepeatedAlerts);
|
||||
TextableDTO.Append(sb, SPLITCHAR, repeatedalertsstr);
|
||||
}
|
||||
else
|
||||
TextableDTO.Append(sb, SPLITCHAR, "");
|
||||
TextableDTO.Append(sb, SPLITCHAR, OpenWorkOrderCount);
|
||||
TextableDTO.Append(sb, SPLITCHAR, PMType);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AcknowledgedBy);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AcknowledgedByName);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AcknowledgedTime_UTC);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AcknowledgedTime_UTCStr);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AcknowledgedTime_Local);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AcknowledgedTime_LocalStr);
|
||||
TextableDTO.Append(sb, SPLITCHAR, AcknowledgedComment);
|
||||
TextableDTO.Append(sb, SPLITCHAR, WorkOrderNumber);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Comment);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public class MachineInfoForAlert
|
||||
{
|
||||
private const char SPLITCHAR = (char)182;
|
||||
private const char SPLITCHAR1 = (char)180;
|
||||
public long MachineID { get; set; }
|
||||
public string VIN { get; set; }
|
||||
public string MachineName { get; set; }
|
||||
@ -113,6 +172,39 @@ namespace IronIntel.Contractor.Maintenance
|
||||
public string LatestAlertDateTimeStr { get { return LatestAlertDateTime == DateTime.MinValue ? "" : LatestAlertDateTime.ToString(); } }
|
||||
|
||||
public List<AlertInfo> Alerts { get; } = new List<AlertInfo>();
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
TextableDTO.Append(sb, MachineID);
|
||||
TextableDTO.Append(sb, SPLITCHAR, VIN);
|
||||
TextableDTO.Append(sb, SPLITCHAR, MachineName);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Make);
|
||||
TextableDTO.Append(sb, SPLITCHAR, Model);
|
||||
TextableDTO.Append(sb, SPLITCHAR, EngineHours);
|
||||
TextableDTO.Append(sb, SPLITCHAR, DTCAlertCount);
|
||||
TextableDTO.Append(sb, SPLITCHAR, PMAlertCount);
|
||||
TextableDTO.Append(sb, SPLITCHAR, InspectAlertCount);
|
||||
TextableDTO.Append(sb, SPLITCHAR, OpenWorkOrders);
|
||||
TextableDTO.Append(sb, SPLITCHAR, LatestAlertDateTime);
|
||||
TextableDTO.Append(sb, SPLITCHAR, LatestAlertDateTimeStr);
|
||||
if (Alerts != null && Alerts.Count > 0)
|
||||
{
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
foreach (AlertInfo ai in Alerts)
|
||||
{
|
||||
if (sb1.Length > 0)
|
||||
sb1.Append(SPLITCHAR1 + ai.ToString());
|
||||
else
|
||||
sb1.Append(ai.ToString());
|
||||
}
|
||||
TextableDTO.Append(sb, SPLITCHAR, sb1.ToString());
|
||||
}
|
||||
else
|
||||
TextableDTO.Append(sb, SPLITCHAR, "");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public class AssetAlertInfo
|
||||
|
@ -17,26 +17,10 @@ namespace IronIntel.Contractor.Maintenance
|
||||
{
|
||||
}
|
||||
|
||||
public StringKeyValue[] GetAlertTypes()
|
||||
{
|
||||
const string SQL = "select distinct ltrim(rtrim(ALERTTYPE)) as ALERTTYPE from ALERTS with(nolock) where ISNULL(ALERTTYPE,'')<>''";
|
||||
DataTable tb = GetDataTableBySQL(SQL);
|
||||
if (tb.Rows.Count == 0)
|
||||
{
|
||||
return new StringKeyValue[0];
|
||||
}
|
||||
List<StringKeyValue> list = new List<StringKeyValue>();
|
||||
foreach (DataRow dr in tb.Rows)
|
||||
{
|
||||
string type = FIDbAccess.GetFieldString(dr["ALERTTYPE"], string.Empty);
|
||||
StringKeyValue kv = new StringKeyValue();
|
||||
kv.Key = type;
|
||||
kv.Value = type;
|
||||
list.Add(kv);
|
||||
}
|
||||
return list.OrderBy(t => t.Key).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据WorkorderId获取Alert列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public AlertInfo[] GetAlertsByWorkOrder(long workorderid, Foresight.Fleet.Services.User.UserInfo user)
|
||||
{
|
||||
const string SQL = @"select a.ALERTID,ALERTTYPE,a.ALERTTIME_UTC,COMPLETED,a.MACHINEID,a.VIN,a.MACHINENAME,a.ENGINGHOURS,a.ALERTDESC,pit.SERVICEDESCRIPTION,a.PMTYPE from ALERTS a
|
||||
@ -60,7 +44,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
public void AcknowledgeAlert(string useriid, long[] alertids, string acknowledgmentcomment)
|
||||
{
|
||||
const string SQL = "update ALERTS set ACKNOWLEDGED=1,ACKNOWLEDGEDBY={1},ACKNOWLEDGMENTCOMMENT={2},ACKNOWLEDGEDDATE_UTC=GETUTCDATE() where ALERTID={0}";
|
||||
const string SQL_S = "select ALERTID from ALERTS where ISNULL(ACKNOWLEDGED,0)<>1 and ISNULL(COMPLETED,0)<>1 and MACHINEID=(select MACHINEID from ALERTS where ALERTID={0}) and ALERTDESC=(select ALERTDESC from ALERTS where ALERTID={0}) ";
|
||||
const string SQL_S = "select ALERTID from ALERTS a where ISNULL(ACKNOWLEDGED,0)<>1 and ISNULL(COMPLETED,0)<>1 and MACHINEID=(select MACHINEID from ALERTS where ALERTID={0}) and ALERTDESC=(select ALERTDESC from ALERTS where ALERTID={0}) and not exists(select 1 from WORKORDER_ALERTS woa where woa.ALERTID=a.ALERTID) ";
|
||||
|
||||
if (alertids != null && alertids.Length > 0)
|
||||
{
|
||||
|
@ -18,6 +18,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
public string BeginDate { get; set; }
|
||||
public string EndDate { get; set; }
|
||||
public bool IncludeunCompleted { get; set; }
|
||||
public string[] Category { get; set; }
|
||||
}
|
||||
|
||||
public class AutoAcknowledgeInfo : AutoAcknowledgeItem
|
||||
|
@ -9,6 +9,9 @@ using IronIntel.Contractor.Machines;
|
||||
|
||||
namespace IronIntel.Contractor.Maintenance
|
||||
{
|
||||
/// <summary>
|
||||
/// 已移到CurfewWinService服务中执行
|
||||
/// </summary>
|
||||
public class IATCAlertsSyncService
|
||||
{
|
||||
private static bool isrunning = false;
|
||||
|
@ -36,6 +36,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
|
||||
public PmIntervalItem[] Intervals { get; set; }
|
||||
public int[] AllIntervals { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class PmIntervalItem
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Foresight.Data;
|
||||
using DocumentFormat.OpenXml.Office2010.CustomUI;
|
||||
using Foresight.Data;
|
||||
using Foresight.Fleet.Services.Asset;
|
||||
using Foresight.Fleet.Services.AssetHealth;
|
||||
using Foresight.Fleet.Services.User;
|
||||
@ -18,6 +19,10 @@ namespace IronIntel.Contractor.Maintenance
|
||||
|
||||
#region PM SCHEDULES
|
||||
|
||||
/// <summary>
|
||||
/// 根据PM类型、PMId获取PM计划列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static PmScheduleInfo[] GetPmSchedule(string sessionid, string pmtype, string pmid, string filter)
|
||||
{
|
||||
var items = FleetServiceClientHelper.CreateClient<PMClient>(sessionid).GetPMScheduleItems(SystemParams.CompanyID, pmtype, filter, true);
|
||||
@ -34,6 +39,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
pm.PmScheduleUom = item.UOM;
|
||||
pm.PmScheduleType = item.ScheduleType;
|
||||
pm.Notes = item.Notes;
|
||||
pm.Enabled = item.Enabled;
|
||||
if (item.Intervals != null || item.Intervals.Count > 0)
|
||||
{
|
||||
List<PmIntervalItem> lsinterval = new List<PmIntervalItem>();
|
||||
@ -56,6 +62,10 @@ namespace IronIntel.Contractor.Maintenance
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据PM计划ID获取计划信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static PmScheduleInfo GetPMScheduleByID(string sessionid, string scheduleid)
|
||||
{
|
||||
var item = FleetServiceClientHelper.CreateClient<PMClient>(sessionid).GetPMScheduleItem(SystemParams.CompanyID, scheduleid, true);
|
||||
@ -65,6 +75,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
pm.PmScheduleUom = item.UOM;
|
||||
pm.PmScheduleType = item.ScheduleType;
|
||||
pm.Notes = item.Notes;
|
||||
pm.Enabled = item.Enabled;
|
||||
if (item.Intervals != null || item.Intervals.Count > 0)
|
||||
{
|
||||
List<PmIntervalItem> lsinterval = new List<PmIntervalItem>();
|
||||
@ -159,6 +170,10 @@ namespace IronIntel.Contractor.Maintenance
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据机器id获取PM计划列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static PMAssetAlertInfo[] GetPmScheduleByAsset(string sessionid, long assetid, bool includeinterval)
|
||||
{
|
||||
List<PMAssetAlertInfo> result = new List<PMAssetAlertInfo>();
|
||||
@ -225,6 +240,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
pm.UOM = si.PmScheduleUom;
|
||||
pm.ScheduleType = si.PmScheduleType;
|
||||
pm.Notes = si.Notes;
|
||||
pm.Enabled = si.Enabled;
|
||||
if (si.Intervals != null && si.Intervals.Length > 0)
|
||||
{
|
||||
List<PMIntervalItem> list = new List<PMIntervalItem>();
|
||||
@ -485,8 +501,8 @@ namespace IronIntel.Contractor.Maintenance
|
||||
public static WorkOrderListItemClient[] GetMaintenanceWorkOrders(string sessionid, string custid, string[] assignedusers, string[] asseitgroups, string filter, string useriid)
|
||||
{
|
||||
const string SQL = @"select m.MAINTENANCEID,m.COMPLETEDBY,(select USERNAME from USERS with(nolock) where USERS.USERIID=m.COMPLETEDBY) as ASSIGNEDTONAME,m.NOTES,m.MAINTENANCEDATE
|
||||
,b.MACHINEID,b.VIN,b.MACHINENAME,b.MACHINENAME2 from MAINTENANCELOG m with(nolock) left join MACHINES b with(nolock) on b.MACHINEID=m.MACHINEID
|
||||
where m.ALERTID not in (select ALERTID from WORKORDER_ALERTS with(nolock)) and m.MACHINEID = b.MACHINEID and ISNULL(b.HIDE,0)<>1 ";
|
||||
,b.MACHINEID,b.VIN,b.MACHINENAME,b.MACHINENAME2,b.MAKENAME,b.MODELNAME,b.JOBSITES,m.COMPLETED from MAINTENANCELOG m with(nolock) left join V_WORKORDER_MACHINES b with(nolock) on b.MACHINEID=m.MACHINEID left join WORKORDER_ALERTS woa on woa.ALERTID=m.ALERTID
|
||||
where woa.ALERTID is null and m.MACHINEID = b.MACHINEID";
|
||||
const string SQL_FILTER = " and (m.NOTES like {0} or b.MACHINEID like {0} or b.VIN like {0} or b.MACHINENAME like {0} or b.MACHINENAME2 like {0}) ";
|
||||
const string SQL_ORDERBY = " order by m.MAINTENANCEID";
|
||||
|
||||
@ -547,11 +563,26 @@ namespace IronIntel.Contractor.Maintenance
|
||||
wo.MaintenanceID = FIDbAccess.GetFieldString(dr["MAINTENANCEID"], string.Empty);
|
||||
wo.Description = FIDbAccess.GetFieldString(dr["NOTES"], string.Empty);
|
||||
wo.CompleteDate = FIDbAccess.GetFieldDateTime(dr["MAINTENANCEDATE"], DateTime.MinValue);
|
||||
wo.AssetName = FIDbAccess.GetFieldString(dr["MACHINENAME"], string.Empty);
|
||||
wo.Make = FIDbAccess.GetFieldString(dr["MAKENAME"], string.Empty);
|
||||
wo.Model = FIDbAccess.GetFieldString(dr["MODELNAME"], string.Empty);
|
||||
wo.CurrentJobsites = FIDbAccess.GetFieldString(dr["JOBSITES"], string.Empty);
|
||||
wo.VIN = FIDbAccess.GetFieldString(dr["VIN"], string.Empty);
|
||||
wo.AssetName = FIDbAccess.GetFieldString(dr["MACHINENAME2"], string.Empty);
|
||||
if (string.IsNullOrWhiteSpace(wo.AssetName))
|
||||
{
|
||||
wo.AssetName = FIDbAccess.GetFieldString(dr["MACHINENAME"], string.Empty);
|
||||
if (string.IsNullOrWhiteSpace(wo.AssetName))
|
||||
{
|
||||
wo.AssetName = wo.VIN;
|
||||
}
|
||||
}
|
||||
//var assignedTo = FIDbAccess.GetFieldString(dr["COMPLETEDBY"], string.Empty);
|
||||
//wo.AssignedToName = FIDbAccess.GetFieldString(dr["ASSIGNEDTONAME"], assignedTo);
|
||||
|
||||
wo.WorkOrderNumber = "";
|
||||
wo.Status = FIDbAccess.GetFieldInt(dr["COMPLETED"], 0) == 1 ? 100 : -1;
|
||||
if (!wo.Completed)
|
||||
wo.CompleteDate = null;
|
||||
|
||||
list.Add(wo);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
using Foresight.Fleet.Services.AssetHealth.WorkOrder;
|
||||
using Foresight.Fleet.Services.Customer;
|
||||
using Foresight.ServiceModel;
|
||||
using IronIntel.Contractor.Machines;
|
||||
using IronIntel.Contractor.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -34,6 +35,9 @@ namespace IronIntel.Contractor.Maintenance
|
||||
|
||||
public class WorkOrderListItemClient : WorkOrderListItem
|
||||
{
|
||||
const char SPLITCHAR = (char)170;
|
||||
const char SPLIT_CHAR182 = (char)182;
|
||||
const char SPLIT_CHAR183 = (char)183;
|
||||
public string DueDateStr { get { return DueDate == null ? "" : DueDate.Value.ToShortDateString(); } }
|
||||
public string CompleteDateStr { get { return CompleteDate == null ? "" : CompleteDate.Value.ToShortDateString(); } }
|
||||
public string NextFollowUpDateStr { get { return NextFollowUpDate == null ? "" : NextFollowUpDate.Value.ToShortDateString(); } }
|
||||
@ -88,6 +92,98 @@ namespace IronIntel.Contractor.Maintenance
|
||||
return rst;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(base.ToString());
|
||||
sb.Append(SPLITCHAR + DueDateStr);
|
||||
sb.Append(SPLITCHAR + CompleteDateStr);
|
||||
sb.Append(SPLITCHAR + NextFollowUpDateStr);
|
||||
sb.Append(SPLITCHAR + CreateDateStr);
|
||||
sb.Append(SPLITCHAR + CreationDateStr);
|
||||
sb.Append(SPLITCHAR + LastCommunicationDateStr);
|
||||
sb.Append(SPLITCHAR + LastInternalCommunicationDateStr);
|
||||
sb.Append(SPLITCHAR + PartsExpectedDateStr);
|
||||
sb.Append(SPLITCHAR + LastLaborDateStr);
|
||||
sb.Append(SPLITCHAR + MaintenanceID);
|
||||
sb.Append(SPLITCHAR + ((WorkOrderStatus != null && WorkOrderStatus.Length > 0) ? WorkOrderStatus[0].ToString() : ""));
|
||||
if (AssignedToUsers != null && AssignedToUsers.Length > 0)
|
||||
{
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
foreach (UserInfo user in AssignedToUsers)
|
||||
{
|
||||
string str = user.IID + SPLIT_CHAR183 + user.DisplayName;
|
||||
if (sb1.Length == 0)
|
||||
sb1.Append(str);
|
||||
else
|
||||
sb1.Append(SPLIT_CHAR182 + str);
|
||||
}
|
||||
sb.Append(SPLITCHAR + sb1.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(SPLITCHAR + "");
|
||||
}
|
||||
|
||||
if (Departments != null && Departments.Length > 0)
|
||||
{
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
foreach (DepartmentInfo dept in Departments)
|
||||
{
|
||||
string str = dept.Id.ToString() + SPLIT_CHAR183 + dept.Name;
|
||||
if (sb1.Length == 0)
|
||||
sb1.Append(str);
|
||||
else
|
||||
sb1.Append(SPLIT_CHAR182 + str);
|
||||
}
|
||||
sb.Append(SPLITCHAR + sb1.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(SPLITCHAR + "");
|
||||
}
|
||||
|
||||
if (Locations != null && Locations.Length > 0)
|
||||
{
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
foreach (CustomerLocation loc in Locations)
|
||||
{
|
||||
string str = loc.ID.ToString() + SPLIT_CHAR183 + loc.Name;
|
||||
if (sb1.Length == 0)
|
||||
sb1.Append(str);
|
||||
else
|
||||
sb1.Append(SPLIT_CHAR182 + str);
|
||||
}
|
||||
sb.Append(SPLITCHAR + sb1.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(SPLITCHAR + "");
|
||||
}
|
||||
|
||||
if (Salespersons != null && Salespersons.Length > 0)
|
||||
{
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
foreach (StringKeyValue sale in Salespersons)
|
||||
{
|
||||
string str = sale.Key + SPLIT_CHAR183 + sale.Value;
|
||||
if (sb1.Length == 0)
|
||||
sb1.Append(str);
|
||||
else
|
||||
sb1.Append(SPLIT_CHAR182 + str);
|
||||
}
|
||||
sb.Append(SPLITCHAR + sb1.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(SPLITCHAR + "");
|
||||
}
|
||||
sb.Append(SPLITCHAR + ContactsStr);
|
||||
sb.Append(SPLITCHAR + (Completed ? "1" : "0"));
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public class TextMessageClient : TextMessage
|
||||
|
@ -248,7 +248,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_HOURLYRATE", "Hourly Rate") + "</td><td>{0}</td></tr>", wo.HourlyRate);
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_TIMETOCOMPLATEHOURS", "Time To Complete(Hrs)") + "</td><td>{0}</td></tr>", wo.HoursToComplete);
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_TIMETOCOMPLATEHOURS", "Labor Hours") + "</td><td>{0}</td></tr>", wo.HoursToComplete);
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_COMPLETEDDATE", "Completed Date") + "</td><td>{0}</td></tr>", wo.CompleteDate == null ? "" : wo.CompleteDate.Value.ToShortDateString());
|
||||
str.AppendLine("");
|
||||
@ -256,7 +256,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_INVOICENUMBER", "Invoice Number") + "</td><td>{0}</td></tr>", HttpUtility.HtmlEncode(wo.InvoiceNumber));
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + "Billable" + "</td><td>{0}</td></tr>", wo.Billable ? "Yes" : "No");
|
||||
str.AppendFormat("<tr><td class='label'>" + "Billable" + "</td><td>{0}</td></tr>", wo.Billable ? SystemParams.GetTextByKey(lang, "P_UTILITY_YES", "Yes") : SystemParams.GetTextByKey(lang, "P_UTILITY_NO", "No"));
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + "Bill To Job" + "</td><td>{0}</td></tr>", wo.BillToJobName);
|
||||
str.AppendLine("");
|
||||
@ -287,11 +287,11 @@ namespace IronIntel.Contractor.Maintenance
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_COMPONENT", "Component") + "</td><td>{0}</td></tr>", se.Component);
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_COMPLETED", "Completed") + "</td><td>{0}</td></tr>", se.Completed ? "Yes" : "No");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_COMPLETED", "Completed") + "</td><td>{0}</td></tr>", se.Completed ? SystemParams.GetTextByKey(lang, "P_UTILITY_YES", "Yes") : SystemParams.GetTextByKey(lang, "P_UTILITY_NO", "No"));
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_COMPLETEDDATE", "Completed Date") + "</td><td>{0}</td></tr>", se.CompletedDate == null ? "" : se.CompletedDate.Value.ToShortDateString());
|
||||
str.AppendFormat("<tr><td class='label'>" + "Segment Type" + "</td><td>{0}</td></tr>", se.SegmentType);
|
||||
str.AppendFormat("<tr><td class='label'>" + "Billable" + "</td><td>{0}</td></tr>", se.Billable ? "Yes" : "No");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_SEGMENTTYPE", "Segment Type") + "</td><td>{0}</td></tr>", se.SegmentType);
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_BILLABLE", "Billable") + "</td><td>{0}</td></tr>", se.Billable ? SystemParams.GetTextByKey(lang, "P_UTILITY_YES", "Yes") : SystemParams.GetTextByKey(lang, "P_UTILITY_NO", "No"));
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_DESCRIPTION", "Description") + "</td><td>{0}</td></tr>", HttpUtility.HtmlEncode(se.Description));
|
||||
str.AppendLine("");
|
||||
str.AppendFormat("<tr><td class='label'>" + SystemParams.GetTextByKey(lang, "P_WO_NOTES", "Notes") + "</td><td>{0}</td></tr>", HttpUtility.HtmlEncode(se.Notes).Replace("\n", "<br>"));
|
||||
@ -646,6 +646,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
ai.Recurring = alertitem.Recurring;
|
||||
ai.Priority = alertitem.Priority;
|
||||
ai.ExpectedCost = alertitem.ExpectedCost;
|
||||
ai.Comment = alertitem.Comment;
|
||||
|
||||
return ai;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ using Foresight.Fleet.Services.Device;
|
||||
using Foresight.Fleet.Services.User;
|
||||
using System.Threading;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml.Drawing;
|
||||
|
||||
namespace IronIntel.Contractor.MapView
|
||||
{
|
||||
@ -136,7 +137,7 @@ namespace IronIntel.Contractor.MapView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取Dealer站点下多个Contractor机器几次信息列表
|
||||
/// 获取Dealer站点下多个Contractor机器基础信息列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static MapViewAssetItem[] GetDealerAssetBasicInfos(string sessionid, string companyids, string useriid)
|
||||
@ -197,7 +198,6 @@ namespace IronIntel.Contractor.MapView
|
||||
/// <summary>
|
||||
/// 根据机器ID获取机器基础信息列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static MapViewAssetItem[] GetAssetItemsByAssets(string sessionid, string companyid, string useriid, long[] assetids)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
@ -209,6 +209,10 @@ namespace IronIntel.Contractor.MapView
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据机器ID获取机器详细信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static AssetDetailViewItem GetAssetDetailItem(string sessionid, string companyid, long machineid, string datasource = null)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<AssetQueryClient>(companyid, sessionid);
|
||||
@ -294,6 +298,10 @@ namespace IronIntel.Contractor.MapView
|
||||
return mi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Contractorid获取机器组列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static AssetGroupViewItem[] GetAssetGroups(string sessionid, string companyid, string useriid, string searchtext)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<MapViewQueryClient>(companyid, sessionid);
|
||||
@ -311,6 +319,10 @@ namespace IronIntel.Contractor.MapView
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取Dealer站点下多个Contractor机器组列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static AssetGroupViewItem[] GetDealerAssetGroups(string sessionid, string companyids, string useriid, string searchtext)
|
||||
{
|
||||
string[] cids = null;
|
||||
@ -375,6 +387,10 @@ namespace IronIntel.Contractor.MapView
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Contractorid获取Jobsite列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static JobSiteViewItem[] GetJobsites(string sessionid, string companyid, string useriid, string searchtext)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
@ -444,6 +460,10 @@ namespace IronIntel.Contractor.MapView
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///获取Dealer站点下多个Contractor Jobsite列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static JobSiteViewItem[] GetDealerJobsites(string sessionid, string companyids, string useriid, string searchtext)
|
||||
{
|
||||
string[] cids = null;
|
||||
@ -508,7 +528,11 @@ namespace IronIntel.Contractor.MapView
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
public static AssetLocationHistoryViewItem GetMachineLocationHistory(string sessionid, string machineid, DateTime startTime, DateTime endTime, string companyid, bool notShow00loc, string datasource)
|
||||
/// <summary>
|
||||
/// 根据机器Id获取机器基本信息和位置历史记录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static AssetLocationHistoryViewItem GetMachineLocationHistory(string sessionid, string machineid, DateTime startTime, DateTime endTime, string companyid, bool notShow00loc, string datasource, string subsource)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -523,7 +547,7 @@ namespace IronIntel.Contractor.MapView
|
||||
&& d.Status == 1);
|
||||
|
||||
var locclient = FleetServiceClientHelper.CreateClient<AssetLocationQueryClient>(companyid, sessionid);
|
||||
AssetLocationInfo[] assetLocs = locclient.GetAssetBasicLocationHistory(companyid, long.Parse(machineid), startTime, endTime, datasource, "", !notShow00loc);
|
||||
AssetLocationInfo[] assetLocs = locclient.GetAssetBasicLocationHistory(companyid, long.Parse(machineid), startTime, endTime, datasource, subsource, !notShow00loc);
|
||||
|
||||
List<LocationViewItem> ls = new List<LocationViewItem>();
|
||||
foreach (AssetLocationInfo assetLoc in assetLocs)
|
||||
@ -544,11 +568,18 @@ namespace IronIntel.Contractor.MapView
|
||||
li.Street = assetLoc.Street;
|
||||
li.HarshDringEvent = assetLoc.HarshDringEvent;
|
||||
li.SpeedingBehavior = assetLoc.SpeedingBehavior;
|
||||
li.IconURL = GenerateLocationIconUrl(assetLoc, asset.OnRoad);
|
||||
bool abnormal = false;
|
||||
li.IconURL = GenerateLocationIconUrl(assetLoc, asset.OnRoad, out abnormal);
|
||||
li.Abnormal = abnormal;
|
||||
li.Heading = assetLoc.Heading;
|
||||
li.MoveStatus = (int)assetLoc.MoveStatus;
|
||||
li.SmartWitnessVideoUrl = assetLoc.SmartWitnessVideoUrl;
|
||||
|
||||
li.FromSmartWitness = device == null ? false : true;//11342 通过机器当前是否绑定SmartWitness来判断
|
||||
|
||||
li.SeatBelt = assetLoc.SeatBelt;
|
||||
li.DriverInsight = assetLoc.DriverInsight;
|
||||
|
||||
//ConvertSpeedUnitToMile(li);
|
||||
ls.Add(li);
|
||||
}
|
||||
@ -558,64 +589,88 @@ namespace IronIntel.Contractor.MapView
|
||||
return al;
|
||||
}
|
||||
|
||||
private static string GenerateLocationIconUrl(AssetLocationInfo loc, bool onRoad)
|
||||
/// <summary>
|
||||
/// 根据位置信息生成位置图标Url
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private static string GenerateLocationIconUrl(AssetLocationInfo loc, bool onRoad, out bool abnormal)
|
||||
{
|
||||
//http://iron.soft.rz/admin/machinetypeicon.ashx
|
||||
//http://iron.soft.rz/admin/machinemovingicon.ashx
|
||||
string path = SystemParams.MachineTypeMapViewIconUrl.ToLower().Replace("machinetypeicon.ashx", "machinemovingicon.ashx");
|
||||
const string PARAM = "?tp={0}&bkcolor={1}&heading={2}";
|
||||
string path = SystemParams.MachineMovingIconUrl;
|
||||
const string PARAM = "?tp={0}&bkcolor={1}&heading={2}&seatbelt={3}";
|
||||
|
||||
int tp = (int)HarshDrivingEvents.HardAccelerationEvent;
|
||||
abnormal = false;
|
||||
string color = "";
|
||||
if (onRoad)
|
||||
{
|
||||
switch (loc.HarshDringEvent)
|
||||
if (loc.DriverInsight != DriverInsights.None)
|
||||
{
|
||||
case HarshDrivingEvents.None:
|
||||
break;
|
||||
case HarshDrivingEvents.HardAccelerationEvent:
|
||||
color = "#ff3f48cc";
|
||||
break;
|
||||
case HarshDrivingEvents.HardBrakeEvent:
|
||||
color = "#ff00a8f3";
|
||||
break;
|
||||
case HarshDrivingEvents.HardTurnEvent:
|
||||
color = "#fffff200";
|
||||
break;
|
||||
return "";// path + "?legend=DriverInsights";
|
||||
}
|
||||
if (string.IsNullOrEmpty(color))
|
||||
else
|
||||
{
|
||||
if (loc.SpeedingBehavior == SpeedingBehaviors.MinorSpeeding)
|
||||
color = "#ffff7f27";
|
||||
else if (loc.SpeedingBehavior == SpeedingBehaviors.SevereSpeeding)
|
||||
color = "#ffec1c24";
|
||||
if (loc.HarshDringEvent != HarshDrivingEvents.None || loc.SpeedingBehavior != SpeedingBehaviors.None)
|
||||
abnormal = true;
|
||||
switch (loc.HarshDringEvent)
|
||||
{
|
||||
case HarshDrivingEvents.None:
|
||||
break;
|
||||
case HarshDrivingEvents.HardAccelerationEvent:
|
||||
color = "#ff3f48cc";
|
||||
break;
|
||||
case HarshDrivingEvents.HardBrakeEvent:
|
||||
color = "#ff00a8f3";
|
||||
break;
|
||||
case HarshDrivingEvents.HardTurnEvent:
|
||||
color = "#ffff89e6";
|
||||
break;
|
||||
}
|
||||
if (string.IsNullOrEmpty(color))
|
||||
{
|
||||
if (loc.SpeedingBehavior == SpeedingBehaviors.MinorSpeeding)
|
||||
color = "#ffff7f27";
|
||||
else if (loc.SpeedingBehavior == SpeedingBehaviors.SevereSpeeding)
|
||||
color = "#ffec1c24";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(color))
|
||||
{
|
||||
if (loc.MoveStatus == AssetMoveStatus.InMotion)
|
||||
color = "#ff228B22";
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(color) && loc.MoveStatus == AssetMoveStatus.InMotion)
|
||||
color = "#ff228B22";
|
||||
|
||||
if (loc.Speed <= 0 && loc.MoveStatus == AssetMoveStatus.Unknown)
|
||||
{
|
||||
loc.Heading = -1;
|
||||
abnormal = true;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(color))
|
||||
{
|
||||
if (loc.MoveStatus == AssetMoveStatus.StoppedOn)
|
||||
return path + "?legend=StoppedOn";
|
||||
return "";// path + "?legend=StoppedOn";
|
||||
else if (loc.MoveStatus == AssetMoveStatus.StoppedOff)
|
||||
return path + "?legend=StoppedOff";
|
||||
return "";// path + "?legend=StoppedOff";
|
||||
else if (loc.MoveStatus == AssetMoveStatus.ConnectivityRecovery)
|
||||
{
|
||||
abnormal = true;
|
||||
return path + "?legend=CGAIN";
|
||||
}
|
||||
else if (loc.MoveStatus == AssetMoveStatus.ConnectivityLose)
|
||||
{
|
||||
abnormal = true;
|
||||
return path + "?legend=CLOSS";
|
||||
}
|
||||
}
|
||||
color = HttpUtility.UrlEncode(color);
|
||||
path = path + string.Format(PARAM, tp, color, loc.Heading);
|
||||
path = abnormal ? path + string.Format(PARAM, tp, color, loc.Heading, loc.SeatBelt == SeatBeltStatus.NotDetected ? 1 : 0) : "";//角度在js 中实现
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据contractorid获取地图AlertView定义列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static MapAlertViewDefinitionItem[] GetMapAlertViews(string sessionid, string companyid, string selectedViewID)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(companyid))
|
||||
@ -639,6 +694,7 @@ namespace IronIntel.Contractor.MapView
|
||||
MapAlertViewDefinitionItem mi = new MapAlertViewDefinitionItem();
|
||||
mi.ID = ai.ID;
|
||||
mi.Name = ai.Name;
|
||||
mi.LocalNames.AddRange(ai.LocalNames);
|
||||
|
||||
if (viewInfo != null && viewInfo.ID.Equals(mi.ID, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@ -650,6 +706,7 @@ namespace IronIntel.Contractor.MapView
|
||||
mi.Layers[i].ID = layer.LayerId;
|
||||
mi.Layers[i].Title = layer.Title;
|
||||
mi.Layers[i].LegendUrl = layer.LegendUrl;
|
||||
mi.Layers[i].LocalTitles.AddRange(layer.LocalTitles);
|
||||
|
||||
if (layer.Pivots != null && layer.Pivots.Count > 0)
|
||||
mi.Layers[i].Pivots = ConvertPivotsDefine(layer.Pivots);
|
||||
@ -662,6 +719,10 @@ namespace IronIntel.Contractor.MapView
|
||||
return ls.OrderBy((mal) => mal.Name).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///获取Dealer站点下多个Contractor地图AlertView定义列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static MapAlertViewDefinitionItem[] GetDealerMapAlertViews(string sessionid, string companyids, string selectedViewID)
|
||||
{
|
||||
string[] cids = null;
|
||||
@ -707,6 +768,7 @@ namespace IronIntel.Contractor.MapView
|
||||
mi = new MapAlertViewDefinitionItem();
|
||||
mi.ID = ai.ID;
|
||||
mi.Name = ai.Name;
|
||||
mi.LocalNames.AddRange(ai.LocalNames);
|
||||
results.Add(mi);
|
||||
}
|
||||
|
||||
@ -720,6 +782,7 @@ namespace IronIntel.Contractor.MapView
|
||||
mi.Layers[i].ID = layer.LayerId;
|
||||
mi.Layers[i].Title = layer.Title;
|
||||
mi.Layers[i].LegendUrl = layer.LegendUrl;
|
||||
mi.Layers[i].LocalTitles.AddRange(layer.LocalTitles);
|
||||
|
||||
if (layer.Pivots != null && layer.Pivots.Count > 0)
|
||||
mi.Layers[i].Pivots = ConvertPivotsDefine(layer.Pivots);
|
||||
@ -781,6 +844,7 @@ namespace IronIntel.Contractor.MapView
|
||||
{
|
||||
AlertLayerPivotViewItem pi = new AlertLayerPivotViewItem();
|
||||
Helper.CloneProperty(pi, pd);
|
||||
pi.LocalCaptions.AddRange(pd.LocalCaptions);
|
||||
if (pi.DataType == DataTypes.Datetime)
|
||||
{
|
||||
try
|
||||
|
@ -91,5 +91,7 @@ namespace IronIntel.Contractor.MapView
|
||||
public bool IsAllAllowed { get; set; }
|
||||
public bool MutipleSelect { get; set; }
|
||||
public bool IsCriteriaSQL { get; set; }
|
||||
public List<KeyValuePair<string, string>> LocalCaptions { get; private set; } = new List<KeyValuePair<string, string>>();//不同language下的Title
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -145,6 +145,8 @@ namespace IronIntel.Contractor.MapView
|
||||
{
|
||||
public string ID { get; set; }
|
||||
public string Name { get; set; }
|
||||
public List<KeyValuePair<string, string>> LocalNames { get; private set; } = new List<KeyValuePair<string, string>>();
|
||||
|
||||
public MapAlertLayerDefinitionItem[] Layers { get; set; }
|
||||
public List<LookupDataSourceDataItem> LookupDataSources { get; set; } = new List<LookupDataSourceDataItem>();
|
||||
}
|
||||
@ -172,6 +174,8 @@ namespace IronIntel.Contractor.MapView
|
||||
public string IconColor { get; set; }
|
||||
public string AlertLayerType { get; set; }//Primary/Secondary
|
||||
public string LegendUrl { get; set; }
|
||||
public List<KeyValuePair<string, string>> LocalTitles { get; private set; } = new List<KeyValuePair<string, string>>();//不同language下的Title
|
||||
|
||||
public DbQueryParameterItem[] CriteriaSQLParameters { get; set; }
|
||||
public DbQueryParameterItem[] AlertSQLParameters { get; set; }
|
||||
public AlertLayerPivotViewItem[] Pivots { get; set; }
|
||||
@ -193,6 +197,8 @@ namespace IronIntel.Contractor.MapView
|
||||
public bool IsField { get; set; }//表明该参数名是一个数据库参数或是结果集的字段,如果是结果集的字段,则该定义必须要与lookupdatasource关联。
|
||||
public bool IsAllAllowed { get; set; }
|
||||
public bool MutipleSelect { get; set; }
|
||||
public List<KeyValuePair<string, string>> LocalCaptions { get; private set; } = new List<KeyValuePair<string, string>>();//不同language下的Title
|
||||
|
||||
}
|
||||
|
||||
public class QueryParameterSource
|
||||
@ -229,10 +235,17 @@ namespace IronIntel.Contractor.MapView
|
||||
public string PostedSpeedUnit { get; set; }
|
||||
public string Street { get; set; } = string.Empty;
|
||||
public string IconURL { get; set; } = string.Empty;
|
||||
public int Heading { get; set; } = 0;
|
||||
public int MoveStatus { get; set; } = 0;
|
||||
public bool Abnormal { get; set; }//是否是异常驾驶
|
||||
public List<KeyValuePair<string, string>> SmartWitnessVideoUrl { get; set; }
|
||||
public SpeedingBehaviors SpeedingBehavior { get; set; }
|
||||
public HarshDrivingEvents HarshDringEvent { get; set; }
|
||||
public bool FromSmartWitness { get; set; }
|
||||
|
||||
public SeatBeltStatus SeatBelt { get; set; }
|
||||
|
||||
public DriverInsights DriverInsight { get; set; }
|
||||
}
|
||||
|
||||
public class MachineTypeItem
|
||||
|
@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("23.5.11")]
|
||||
[assembly: AssemblyFileVersion("24.3.19")]
|
||||
|
@ -25,6 +25,7 @@ using Foresight.Fleet.Services.User;
|
||||
using Foresight.Fleet.Services.SystemOption;
|
||||
using Foresight;
|
||||
using DocumentFormat.OpenXml.Presentation;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
|
||||
namespace IronIntel.Contractor
|
||||
{
|
||||
@ -46,6 +47,8 @@ namespace IronIntel.Contractor
|
||||
public const string DefaultPORequired = "DefaultPORequired";
|
||||
public const string InvoiceMessage = "InvoiceMessage";
|
||||
|
||||
public const string AlertMappingDefaultCategory = "AlertMappingDefaultCategory";
|
||||
|
||||
private static string EncryptString(string s)
|
||||
{
|
||||
byte[] buf = Encoding.UTF8.GetBytes(s);
|
||||
@ -223,25 +226,6 @@ namespace IronIntel.Contractor
|
||||
}
|
||||
}
|
||||
|
||||
private static string _WebSocketURL = null;
|
||||
public static string WebSocketURL
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_WebSocketURL == null)
|
||||
{
|
||||
string url = GetStringParam("WebSocketURL");
|
||||
if (string.IsNullOrEmpty(url))
|
||||
url = FleetServiceClientHelper.CreateClient<SystemOptionProvider>().GetMasterSysParam("WebSocketURL");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
_WebSocketURL = string.Format("{0}?custid={1}", url, SystemParams.CompanyID);
|
||||
else
|
||||
_WebSocketURL = "";
|
||||
}
|
||||
return _WebSocketURL;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetStringParam(string paramname, string value)
|
||||
{
|
||||
FleetServiceClientHelper.CreateClient<CustomerProvider>().SetSystemParams(CompanyID, paramname, value);
|
||||
@ -255,7 +239,7 @@ namespace IronIntel.Contractor
|
||||
/// <returns>参数值</returns>
|
||||
public static string GetStringParam(string paramname, bool useCache = true, FISqlConnection db = null)
|
||||
{
|
||||
const string SQL = "select PARAMVALUE from SYSPARAMS where PARAMNAME={0}";
|
||||
const string SQL = "select PARAMVALUE from SYSPARAMS with(nolock) where PARAMNAME={0}";
|
||||
|
||||
string v = null;
|
||||
if (useCache && _Params.TryGetValue(paramname, out v))
|
||||
@ -348,6 +332,23 @@ namespace IronIntel.Contractor
|
||||
return FleetServiceClientHelper.CreateClient<CustomerProvider>().GetCustomerDetail(cid);
|
||||
}
|
||||
|
||||
private static CustomerParams _CurrentCustomerParams = null;
|
||||
|
||||
public static CustomerParams CurrentCustomerParams
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_CurrentCustomerParams == null)
|
||||
_CurrentCustomerParams = GetCustomerParams(CompanyID);
|
||||
return _CurrentCustomerParams;
|
||||
}
|
||||
}
|
||||
|
||||
public static CustomerParams GetCustomerParams(string cid)
|
||||
{
|
||||
return FleetServiceClientHelper.CreateClient<CustomerProvider>().GetConfiguredParams(cid);
|
||||
}
|
||||
|
||||
public static LicenseInfo GetLicense()
|
||||
{
|
||||
CustomerProvider ic = FleetServiceClientHelper.CreateClient<CustomerProvider>();
|
||||
@ -609,6 +610,19 @@ namespace IronIntel.Contractor
|
||||
return _MachineTypeMapViewIconUrl;
|
||||
}
|
||||
}
|
||||
private static string _MachineMovingIconUrl = string.Empty;
|
||||
public static string MachineMovingIconUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_MachineMovingIconUrl))
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<AssetClassProvider>();
|
||||
_MachineMovingIconUrl = client.GetMachineMovingIconUrl();
|
||||
}
|
||||
return _MachineMovingIconUrl;
|
||||
}
|
||||
}
|
||||
|
||||
public static CustUIStyle GetUIStyle(string useriid)
|
||||
{
|
||||
@ -633,18 +647,18 @@ namespace IronIntel.Contractor
|
||||
{
|
||||
var tzs = TimeZoneInfo.GetSystemTimeZones();
|
||||
List<StringKeyValue> result = new List<StringKeyValue>();
|
||||
|
||||
foreach (TimeZoneInfo tz in tzs)
|
||||
DateTime now = DateTime.UtcNow;
|
||||
foreach (TimeZoneInfo tz in tzs.OrderBy(tz => tz.GetUtcOffset(now)).ThenBy(tz => tz.Id))
|
||||
{
|
||||
StringKeyValue skv = new StringKeyValue();
|
||||
skv.Key = tz.Id;
|
||||
TimeSpan offset = tz.GetUtcOffset(DateTime.UtcNow);
|
||||
TimeSpan offset = tz.GetUtcOffset(now);//tz.BaseUtcOffset; BaseUtcOffset有问题
|
||||
skv.Value = string.Format("{0}{1}:{2}", offset.Hours >= 0 ? "+" : "", offset.Hours.ToString("00"), Math.Abs(offset.Minutes).ToString("00"));
|
||||
|
||||
skv.Tag1 = offset.TotalMinutes.ToString();
|
||||
result.Add(skv);
|
||||
}
|
||||
return result.OrderBy(tz => double.Parse(tz.Tag1)).ThenBy(tz => tz.Key).ToArray();
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
public static DateTime ConvertToUserTimeFromUtc(Foresight.Fleet.Services.User.UserInfo ui, DateTime utctime)
|
||||
@ -666,17 +680,31 @@ namespace IronIntel.Contractor
|
||||
return TimeZoneInfo.ConvertTimeFromUtc(new DateTime(utctime.Ticks), timeZone);
|
||||
}
|
||||
|
||||
public static string GetUserTimeZoneId(Foresight.Fleet.Services.User.UserInfo ui)
|
||||
{
|
||||
string tzid = ui.TimeZone;
|
||||
if (!string.IsNullOrWhiteSpace(tzid))
|
||||
return tzid;
|
||||
|
||||
if (ui.IsForesightUser)
|
||||
tzid = ForesightCustomerDetail.TimeZoneId;
|
||||
else
|
||||
tzid = CustomerDetail.TimeZoneId;
|
||||
|
||||
return tzid;
|
||||
}
|
||||
|
||||
public const string APPNAME = "IronIntelCustomerSite";
|
||||
private const string WORKING_COMPANY_HEADER = "WorkingCompanyID";
|
||||
|
||||
public static void SendMail(System.Net.Mail.MailMessage msg)
|
||||
public static long SendMail(System.Net.Mail.MailMessage msg)
|
||||
{
|
||||
SendMail(APPNAME, msg);
|
||||
return SendMail(APPNAME, msg);
|
||||
}
|
||||
|
||||
public static void SendMail(string appname, System.Net.Mail.MailMessage msg)
|
||||
public static long SendMail(string appname, System.Net.Mail.MailMessage msg)
|
||||
{
|
||||
FleetServiceClientHelper.CreateClient<SystemUtil>().SendMail(CompanyID, appname, msg);
|
||||
return FleetServiceClientHelper.CreateClient<SystemUtil>().SendMail(CompanyID, appname, msg);
|
||||
}
|
||||
|
||||
public static void WriteLog(string logType, string source, string message, string detail)
|
||||
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using Foresight.Data;
|
||||
using Foresight.Fleet.Services.User;
|
||||
using Foresight.Fleet.Services.AssetHealth;
|
||||
|
||||
namespace IronIntel.Contractor.Users
|
||||
{
|
||||
@ -83,7 +84,7 @@ namespace IronIntel.Contractor.Users
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<NavigateItem> GetMaintenanceNavigateItems(Tuple<Feature, Permissions>[] pmss)
|
||||
public List<NavigateItem> GetMaintenanceNavigateItems(Tuple<Feature, Permissions>[] pmss, UserInfo user)
|
||||
{
|
||||
List<NavigateItem> list = new List<NavigateItem>();
|
||||
|
||||
@ -117,6 +118,19 @@ namespace IronIntel.Contractor.Users
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.ALERTS_MANAGEMENT) != null)
|
||||
list.Add(item);
|
||||
|
||||
if (user.UserType == UserTypes.SupperAdmin)
|
||||
{
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_alertsmappings";
|
||||
item.FeatureID = Feature.ALERTS_MANAGEMENT;
|
||||
item.Title = "Alert Mappings";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "AlertsMapping.aspx";
|
||||
item.IconPath = "img/alert.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.ALERTS_MANAGEMENT) != null)
|
||||
list.Add(item);
|
||||
}
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_maintenanceschedule";
|
||||
item.FeatureID = Feature.PREVENTATIVE_MAINTENANCE;
|
||||
@ -249,7 +263,7 @@ namespace IronIntel.Contractor.Users
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.CURFEW_CONFIG) != null)
|
||||
list.Add(item);
|
||||
|
||||
if (user.UserType == UserTypes.SupperAdmin)
|
||||
if (!IronIntel.Contractor.SystemParams.IsDealer && user.UserType == UserTypes.SupperAdmin)
|
||||
{
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_curfewmt";
|
||||
@ -279,6 +293,16 @@ namespace IronIntel.Contractor.Users
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.MANAGE_ASSETS) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_assethistory";
|
||||
item.FeatureID = Feature.MANAGE_ASSETS;
|
||||
item.Title = "Asset History";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "AssetHistory.aspx";
|
||||
item.IconPath = "img/workorderhis.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.MANAGE_ASSETS) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_managrentals";
|
||||
item.FeatureID = Feature.MANAGE_ASSETS;
|
||||
@ -318,6 +342,18 @@ namespace IronIntel.Contractor.Users
|
||||
if (user.UserType >= UserTypes.Admin)
|
||||
list.Add(item);
|
||||
|
||||
bool license = SystemParams.HasLicense("ShareAsset");
|
||||
if (license && !SystemParams.IsDealer && pmss.FirstOrDefault(m => m.Item1.Id == Feature.MANAGE_DEVICES) != null)
|
||||
{
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_shareasset";
|
||||
item.Title = "Share Assets";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "ShareMachines.aspx";
|
||||
//item.IconPath = "img/model.png";
|
||||
list.Add(item);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ namespace IronIntel.Contractor.Users
|
||||
if (m.Id == FeatureModule.MODULE_JOBSITES)
|
||||
ami.SubItems = ami.GetJobsiteNavigateItems(pmss);
|
||||
else if (m.Id == FeatureModule.MODULE_ASSETHEALTH)
|
||||
ami.SubItems = ami.GetMaintenanceNavigateItems(pmss);
|
||||
ami.SubItems = ami.GetMaintenanceNavigateItems(pmss, user);
|
||||
else if (m.Id == FeatureModule.MODULE_SECURITY)
|
||||
ami.SubItems = ami.GetSecurityNavigateItems(pmss, user);
|
||||
else if (m.Id == FeatureModule.MODULE_MANAGEASSETS)
|
||||
@ -103,7 +103,7 @@ namespace IronIntel.Contractor.Users
|
||||
|
||||
string SQL = @"select w.IID,isnull(l.WorkSpaceName,w.WSPNAME) as WSPNAME,w.WSPDESCRIPTION from WORKSPACE w
|
||||
left join WorkSpaceLanguage l on w.IID=l.WorkspaceIID and l.LanguageCode='en-us'
|
||||
where (ISPUBLIC=1 or ISPUBLIC>10)";
|
||||
where (ISPUBLIC=1 or ISPUBLIC>10) or (ISPUBLIC=0 AND CREATER={0})";
|
||||
|
||||
FISqlConnection db = new FISqlConnection(SystemParams.FICDbConnectionString);
|
||||
if (user.UserType == UserTypes.Readonly)
|
||||
@ -114,7 +114,7 @@ namespace IronIntel.Contractor.Users
|
||||
|
||||
|
||||
|
||||
DataTable tb = db.GetDataTableBySQL(SQL);
|
||||
DataTable tb = db.GetDataTableBySQL(SQL, user.IID);
|
||||
List<AppModuleInfo> ls = new List<AppModuleInfo>();
|
||||
foreach (DataRow dr in tb.Rows)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
using FI.FIC;
|
||||
using FI.FIC.Contracts.DataObjects.BaseObject;
|
||||
using Foresight.Fleet.Services;
|
||||
using Foresight.Fleet.Services.Asset;
|
||||
using Foresight.Fleet.Services.JobSite;
|
||||
using Foresight.Fleet.Services.User;
|
||||
@ -15,16 +16,17 @@ namespace IronIntel.Contractor.Users
|
||||
{
|
||||
public class UserInfo
|
||||
{
|
||||
private static string[] ContactTypeNames = { "Foreman", "Driver", "Inventory Manager", "Rental Manager", "Service Manager", "Fleet Manager", "Technician", "Advisor", "Other" };
|
||||
public string IID { get; set; }
|
||||
public string ID { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string TextAddress { get; set; }
|
||||
public string TextAddressDisplayText { get; set; }
|
||||
public bool IsUser { get; set; }
|
||||
public ContactTypes ContactType { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public string MobilePhoneDisplayText { get; set; }
|
||||
public string BusinessPhone { get; set; }
|
||||
public string BusinessPhoneDisplayText { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public UserTypes UserType { get; set; }
|
||||
@ -58,15 +60,31 @@ namespace IronIntel.Contractor.Users
|
||||
public bool ExcelExports { get; set; }
|
||||
public LoginVerifyTypes LoginVerifyType { get; set; } = LoginVerifyTypes.OrganizationSetting;
|
||||
public UserInfo[] Managers { get; set; }
|
||||
public string ContactTypeName
|
||||
public string ContactTypeName { get; private set; }
|
||||
public void SetContactTypeName(string lang)
|
||||
{
|
||||
get
|
||||
{
|
||||
int cType = (int)ContactType;
|
||||
if (cType > 8)
|
||||
cType = 8;
|
||||
return ContactTypeNames[cType];
|
||||
}
|
||||
string cname = "";
|
||||
int cType = (int)ContactType;
|
||||
if (cType == 0)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_FOREMAN", "Foreman");
|
||||
else if (cType == 1)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_DRIVER", "Driver");
|
||||
else if (cType == 2)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_INVENTORYMANAGER", "Inventory Manager");
|
||||
else if (cType ==3)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_RENTALMANAGER", "Rental Manager");
|
||||
else if (cType == 4)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_SERVICEMANAGER", "Service Manager");
|
||||
else if (cType == 5)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_FLEETMANAGER", "Fleet Manager");
|
||||
else if (cType == 6)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_TECHNICIAN", "Technician");
|
||||
else if (cType == 7)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_ADVISOR", "Advisor");
|
||||
else if (cType > 8)
|
||||
cname = SystemParams.GetTextByKey(lang, "P_UM_OTHER", "Other");
|
||||
|
||||
ContactTypeName = cname;
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,7 +97,7 @@ namespace IronIntel.Contractor.Users
|
||||
public string UserAlertFilter { get; set; }
|
||||
|
||||
public EmailSchedule Schedule { get; set; }
|
||||
public StringKeyValue[] MessageTypes { get; set; }
|
||||
public MessageRestrictInfo[] MessageTypes { get; set; }
|
||||
public UserFilterTemplateItem[] FilterTemplates { get; set; }
|
||||
public int[] DeleteFilterTemplates { get; set; }
|
||||
}
|
||||
|
@ -17,7 +17,14 @@ namespace IronIntel.Contractor.Users
|
||||
{
|
||||
public static class UserManagement
|
||||
{
|
||||
public static UserInfo[] GetUsers(string companyid = null, string filter = null)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="companyid"></param>
|
||||
/// <param name="filter"></param>
|
||||
/// <param name="lang">ContactTypeName需根据用户语言获取</param>
|
||||
/// <returns></returns>
|
||||
public static UserInfo[] GetUsers(string companyid = null, string filter = null, string lang = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -29,7 +36,7 @@ namespace IronIntel.Contractor.Users
|
||||
List<UserInfo> list = new List<UserInfo>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
UserInfo u = ConvertUserItem(user);
|
||||
UserInfo u = ConvertUserItem(user, lang);
|
||||
if (maps.ContainsKey(u.IID))
|
||||
u.GroupNames = maps[u.IID].ToArray();
|
||||
list.Add(u);
|
||||
@ -62,7 +69,7 @@ namespace IronIntel.Contractor.Users
|
||||
return result;
|
||||
}
|
||||
|
||||
public static UserInfo[] GetActiveUsers(string sessionid, string companyid = null)
|
||||
public static UserInfo[] GetActiveUsers(string lang, string sessionid, string companyid = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -71,12 +78,29 @@ namespace IronIntel.Contractor.Users
|
||||
foreach (var user in users)
|
||||
{
|
||||
if (user.Active)
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
public static UserInfo[] GetSalespersons(string sessionid, string companyid = null, string filter = "")
|
||||
public static UserInfo[] GetAllFollowers(string lang, string sessionid, string companyid = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
var client = FleetServiceClientHelper.CreateClient<UserQueryClient>(companyid, sessionid);
|
||||
var users = client.GetUsersByCustomerID(companyid, "");
|
||||
var userattrs = client.GetUserAdditionalAttributeByCustomer(companyid);
|
||||
var followers = userattrs.Where(x => x.WorkOrderFollower).Select(x => x.UserIID);
|
||||
List<UserInfo> list = new List<UserInfo>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
if (user.Active && user.IsUser && followers.Contains(user.UID, StringComparer.OrdinalIgnoreCase))
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
public static UserInfo[] GetSalespersons(string sessionid, string lang, string companyid = null, string filter = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -87,20 +111,27 @@ namespace IronIntel.Contractor.Users
|
||||
if (user.Active)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(filter))
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
else
|
||||
{
|
||||
if (user.ID.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0
|
||||
|| user.Name.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0
|
||||
|| user.FOB.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
private static UserInfo ConvertUserItem(Foresight.Fleet.Services.User.UserInfo user)
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="lang">ContactTypeName需根据用户语言获取</param>
|
||||
/// <returns></returns>
|
||||
private static UserInfo ConvertUserItem(Foresight.Fleet.Services.User.UserInfo user, string lang = null)
|
||||
{
|
||||
if (user == null)
|
||||
return null;
|
||||
@ -111,9 +142,11 @@ namespace IronIntel.Contractor.Users
|
||||
u.UserType = (UserTypes)user.UserType;
|
||||
u.Active = user.Active;
|
||||
u.TextAddress = user.TextAddress;
|
||||
u.TextAddressDisplayText = user.TextAddressDisplayText;
|
||||
u.Mobile = user.Mobile;
|
||||
u.MobilePhoneDisplayText = user.MobilePhoneDisplayText;
|
||||
u.BusinessPhone = user.BusinessPhone;
|
||||
u.BusinessPhoneDisplayText = user.BusinessPhoneDisplayText;
|
||||
u.Notes = user.Remark;
|
||||
u.IsUser = user.IsUser;
|
||||
u.ContactType = (ContactTypes)user.ContactType;
|
||||
@ -135,6 +168,7 @@ namespace IronIntel.Contractor.Users
|
||||
if (!string.IsNullOrWhiteSpace(u.ManagerIID))
|
||||
u.Managers = new UserInfo[] { new UserInfo() { IID = u.ManagerIID, DisplayName = u.ManagerName } };
|
||||
|
||||
u.SetContactTypeName(string.IsNullOrWhiteSpace(lang) ? "en" : lang);
|
||||
return u;
|
||||
}
|
||||
|
||||
@ -172,7 +206,7 @@ namespace IronIntel.Contractor.Users
|
||||
return u;
|
||||
}
|
||||
|
||||
public static UserInfo[] GetUnmanagementUsers()
|
||||
public static UserInfo[] GetUnmanagementUsers(string lang)
|
||||
{
|
||||
var users = FleetServiceClientHelper.CreateClient<UserQueryClient>(SystemParams.CompanyID).GetUsersByCustomerID(SystemParams.CompanyID, "");
|
||||
List<UserInfo> list = new List<UserInfo>();
|
||||
@ -180,7 +214,7 @@ namespace IronIntel.Contractor.Users
|
||||
{
|
||||
if (user.IsUser && user.UserType < Foresight.Fleet.Services.User.UserTypes.Admin)
|
||||
{
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
}
|
||||
}
|
||||
return list.ToArray();
|
||||
@ -522,7 +556,7 @@ namespace IronIntel.Contractor.Users
|
||||
|
||||
#region User Machines/Jobsite/MachineType/Department/Location
|
||||
|
||||
public static UserInfo[] GetUsersByAssetID(string sessionid, long assetid, string companyid)
|
||||
public static UserInfo[] GetUsersByAssetID(string sessionid, long assetid, string companyid, string lang)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -530,12 +564,12 @@ namespace IronIntel.Contractor.Users
|
||||
List<UserInfo> list = new List<UserInfo>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
public static UserInfo[] GetWorkOrderAssignToUsers(string sessionid, string companyid, long assetid, int locid, int depid)
|
||||
public static UserInfo[] GetWorkOrderAssignToUsers(string sessionid, string companyid, long assetid, int locid, int depid, string lang)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -561,14 +595,14 @@ namespace IronIntel.Contractor.Users
|
||||
if (!user.AssignedWorkOrders && user.ContactType != Foresight.Fleet.Services.User.ContactTypes.Advisor) continue;
|
||||
if (depandlocusers == null || depandlocusers.Contains(user.UID, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
uids.Add(user.UID);
|
||||
}
|
||||
}
|
||||
return list.OrderBy(u => u.DisplayName).ToArray();
|
||||
}
|
||||
|
||||
public static UserInfo[] GetUsersByAssets(string sessionid, long[] assetids, string companyid)
|
||||
public static UserInfo[] GetUsersByAssets(string sessionid, long[] assetids, string companyid, string lang)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -576,12 +610,12 @@ namespace IronIntel.Contractor.Users
|
||||
List<UserInfo> list = new List<UserInfo>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
public static UserInfo[] GetUsersByJobsiteID(string sessionid, long jsid, string companyid)
|
||||
public static UserInfo[] GetUsersByJobsiteID(string sessionid, string lang, long jsid, string companyid)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -589,7 +623,7 @@ namespace IronIntel.Contractor.Users
|
||||
List<UserInfo> list = new List<UserInfo>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
list.Add(ConvertUserItem(user));
|
||||
list.Add(ConvertUserItem(user, lang));
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ namespace IronIntel.Contractor.Users
|
||||
|
||||
private const string _MapViewSearches = "MapViewSearches";
|
||||
private const string _LandingPage = "LandingPage";
|
||||
private const string _BreadcrumbLocationSource = "BreadcrumbLocationSource";
|
||||
|
||||
public static UserParamInfo GetUserParams(string sessionid, string useriid)
|
||||
{
|
||||
@ -94,6 +95,9 @@ namespace IronIntel.Contractor.Users
|
||||
case _LandingPage:
|
||||
userParams.LandingPage = value;
|
||||
break;
|
||||
case _BreadcrumbLocationSource:
|
||||
userParams.BreadcrumbLocationSource = int.Parse(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
userParams.MapViewSearches = GetMapViewSearches(sessionid, useriid);
|
||||
@ -110,10 +114,20 @@ namespace IronIntel.Contractor.Users
|
||||
else
|
||||
userParams.MapRefreshInterval = 60;
|
||||
userParams.MachineIconURL = SystemParams.MachineTypeMapViewIconUrl;
|
||||
userParams.MachineMovingIconURL = SystemParams.MachineMovingIconUrl;
|
||||
|
||||
var uc = FleetServiceClientHelper.CreateClient<UserQueryClient>();
|
||||
userParams.PreferredLanguage = uc.GetUserPreferredLanguageByIID(useriid);
|
||||
userParams.TimeZone = uc.GetUserTimeZoneByIID(useriid);
|
||||
if (userParams.BreadcrumbLocationSource < 0)//用户参数未设置,取系统参数
|
||||
{
|
||||
string locsourcestr = SystemParams.GetStringParam(_BreadcrumbLocationSource);
|
||||
int locsource = 0;
|
||||
int.TryParse(locsourcestr, out locsource);
|
||||
userParams.BreadcrumbLocationSource = locsource;
|
||||
}
|
||||
if (userParams.BreadcrumbLocationSource < 0)
|
||||
userParams.BreadcrumbLocationSource = 0;
|
||||
|
||||
return userParams;
|
||||
}
|
||||
@ -196,6 +210,10 @@ namespace IronIntel.Contractor.Users
|
||||
else
|
||||
db.ExecSQL(SQL_Delete, useriid, _LandingPage);
|
||||
|
||||
if (userParams.BreadcrumbLocationSource >= 0)
|
||||
db.ExecSQL(SQL, useriid, _BreadcrumbLocationSource, userParams.BreadcrumbLocationSource);
|
||||
else
|
||||
db.ExecSQL(SQL_Delete, useriid, _BreadcrumbLocationSource);
|
||||
}
|
||||
|
||||
public static string GetStringParameter(string useriid, string paramname)
|
||||
@ -251,7 +269,7 @@ namespace IronIntel.Contractor.Users
|
||||
}
|
||||
}
|
||||
|
||||
public static MapViewSearchItem[] SaveMapViewSearch(string sessionid, string useriid, MapViewSearchItem search)
|
||||
public static MapViewSearchItem[] SaveMapViewSearch(string sessionid, string useriid, MapViewSearchItem search, string lang)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<UserProfileProvider>(sessionid);
|
||||
string xmlstr = client.GetUserParams(SystemParams.CompanyID, useriid, _MapViewSearches);
|
||||
@ -269,8 +287,7 @@ namespace IronIntel.Contractor.Users
|
||||
}
|
||||
}
|
||||
searches.Add(search);
|
||||
|
||||
client.SetUserParam(SystemParams.CompanyID, useriid, _MapViewSearches, MapViewSearcheHelper.ToXml(searches).InnerXml);
|
||||
client.SetUserParam(SystemParams.CompanyID, useriid, _MapViewSearches, MapViewSearcheHelper.ToXml(searches, lang).InnerXml);
|
||||
return searches.OrderByDescending(s => s.IsDefault).ThenBy(s => s.Name).ToArray();
|
||||
}
|
||||
|
||||
@ -297,7 +314,7 @@ namespace IronIntel.Contractor.Users
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
public static MapViewSearchItem[] DeleteMapViewSearch(string sessionid, string useriid, string searchName)
|
||||
public static MapViewSearchItem[] DeleteMapViewSearch(string sessionid, string useriid, string searchName, string lang)
|
||||
{
|
||||
var client = FleetServiceClientHelper.CreateClient<UserProfileProvider>(sessionid);
|
||||
string xmlstr = client.GetUserParams(SystemParams.CompanyID, useriid, _MapViewSearches);
|
||||
@ -306,7 +323,7 @@ namespace IronIntel.Contractor.Users
|
||||
if (item != null)// remove it
|
||||
searches.Remove(item);
|
||||
|
||||
client.SetUserParam(SystemParams.CompanyID, useriid, _MapViewSearches, MapViewSearcheHelper.ToXml(searches).InnerXml);
|
||||
client.SetUserParam(SystemParams.CompanyID, useriid, _MapViewSearches, MapViewSearcheHelper.ToXml(searches, lang).InnerXml);
|
||||
return searches.OrderByDescending(s => s.IsDefault).ThenBy(s => s.Name).ToArray();
|
||||
}
|
||||
|
||||
@ -330,6 +347,7 @@ namespace IronIntel.Contractor.Users
|
||||
public string SystemStyleID { get; set; }
|
||||
public int MapRefreshInterval { get; set; }
|
||||
public string MachineIconURL { get; set; }
|
||||
public string MachineMovingIconURL { get; set; }
|
||||
public string AssetDefaultSearch { get; set; }
|
||||
public string JobSiteDefaultSearch { get; set; }
|
||||
public string AssetGroupDefaultSearch { get; set; }
|
||||
@ -344,6 +362,7 @@ namespace IronIntel.Contractor.Users
|
||||
public string LandingPage { get; set; }
|
||||
public string PreferredLanguage { get; set; }
|
||||
public string TimeZone { get; set; }
|
||||
public int BreadcrumbLocationSource { get; set; } = -1;
|
||||
}
|
||||
|
||||
public class MapViewSearcheHelper
|
||||
@ -398,7 +417,7 @@ namespace IronIntel.Contractor.Users
|
||||
}
|
||||
return item;
|
||||
}
|
||||
public static XmlDocument ToXml(List<MapViewSearchItem> searches)
|
||||
public static XmlDocument ToXml(List<MapViewSearchItem> searches, string lang)
|
||||
{
|
||||
XmlDocument doc = XmlHelper.CreateXmlDocument();
|
||||
XmlNode node = XmlHelper.AppendChildNode(doc.DocumentElement, "Searches", "");
|
||||
@ -409,7 +428,7 @@ namespace IronIntel.Contractor.Users
|
||||
var sn = AddSubNode(node, "Search", "");
|
||||
|
||||
AddSubNode(sn, "Name", search.Name);
|
||||
AddSubNode(sn, "IsDefault", search.IsDefault ? "Yes" : "No");
|
||||
AddSubNode(sn, "IsDefault", search.IsDefault ? SystemParams.GetTextByKey(lang, "P_UTILITY_YES", "Yes") : SystemParams.GetTextByKey(lang, "P_UTILITY_NO", "No"));
|
||||
if (!string.IsNullOrEmpty(search.AssetDefaultSearch))
|
||||
AddSubNode(sn, "AssetDefaultSearch", search.AssetDefaultSearch);
|
||||
if (!string.IsNullOrEmpty(search.JobSiteDefaultSearch))
|
||||
|
@ -16,6 +16,10 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Foresight.Standard;
|
||||
using Foresight.Fleet.Services.Customer;
|
||||
using Foresight.Fleet.Services.AssetHealth.WorkOrder;
|
||||
using IronIntel.Contractor.Site.Maintenance;
|
||||
using System.Drawing;
|
||||
|
||||
namespace IronIntel.Contractor.Site.Asset
|
||||
{
|
||||
@ -34,6 +38,9 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
case "GETMACHINESBYCOMPANY":
|
||||
result = GetMachinesByCompany();
|
||||
break;
|
||||
case "GETMACHINESBYCOMPANY1":
|
||||
result = GetMachinesByCompany1();
|
||||
break;
|
||||
case "GETMACHINEINFO":
|
||||
result = GetMachineInfo();
|
||||
break;
|
||||
@ -79,6 +86,15 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
case "GETASSETDATASOURCES":
|
||||
result = GetAssetDatasources();
|
||||
break;
|
||||
case "GETASSETS":
|
||||
result = GetAssets();
|
||||
break;
|
||||
case "GETASSETHISTORYS":
|
||||
result = GetAssetHistorys();
|
||||
break;
|
||||
case "GETASSETDETAILINFO":
|
||||
result = GetAssetDetailInfo();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -91,6 +107,33 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
Response.Write(json);
|
||||
Response.End();
|
||||
}
|
||||
|
||||
private object GetAssetDetailInfo()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var custid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetidstr = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
long assetid = -1;
|
||||
long.TryParse(assetidstr, out assetid);
|
||||
if (string.IsNullOrWhiteSpace(custid))
|
||||
custid = SystemParams.CompanyID;
|
||||
|
||||
AssetDetailInfo info = CreateClient<AssetQueryClient>(custid).GetAssetDetailInfo(custid, assetid);
|
||||
return new { ID = info.ID, Name = info.DisplayName + " " + info.VIN };
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object GetMachinesByCompany()
|
||||
{
|
||||
try
|
||||
@ -114,7 +157,13 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
//GpsDeviceInfo[] devs = SystemParams.DeviceProvider.GetDeviceItems(contractorid, "");
|
||||
|
||||
AssetBasicInfo[] assets = CreateClient<AssetQueryClient>(companyid).GetAssetBasicInfoByUser(companyid, searchtxt, session.User.UID, att);
|
||||
List<AssetBasicItem> list = new List<AssetBasicItem>();
|
||||
|
||||
if (assets == null || assets.Length == 0)
|
||||
return string.Empty;
|
||||
|
||||
assets = assets.OrderBy((m) => m.VIN).ToArray();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (var a in assets)
|
||||
{
|
||||
if (!showHidden && a.Hide) continue;
|
||||
@ -122,12 +171,17 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
Helper.CloneProperty(asset, a);
|
||||
asset.EngineHours = a.EngineHours == null ? 0 : a.EngineHours.Value;
|
||||
asset.Odometer = a.Odometer == null ? 0 : a.Odometer.Value;
|
||||
list.Add(asset);
|
||||
|
||||
sb.Append(SPLIT_CHAR180 + asset.ToString());
|
||||
}
|
||||
return list.OrderBy((m) => m.VIN).ToArray();
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
return sb.ToString().Substring(1);
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return new MachineItem[0];
|
||||
return string.Empty;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -136,6 +190,38 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
}
|
||||
}
|
||||
|
||||
private object GetMachinesByCompany1()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
string companyid = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
|
||||
AssetBasicInfo[] assets = CreateClient<AssetQueryClient>(companyid).GetAssetBasicInfoByUser(companyid, "", session.User.UID, 0);
|
||||
|
||||
if (assets == null || assets.Length == 0)
|
||||
return new AssetBasicInfo[0];
|
||||
|
||||
var items = assets.Select((a) => new { ID = a.ID, Name = a.DisplayName + (string.IsNullOrWhiteSpace(a.VIN) ? "" : ("----" + a.VIN)) });
|
||||
|
||||
items = items.OrderBy((m) => m.Name).ToArray();
|
||||
|
||||
return items;
|
||||
}
|
||||
else
|
||||
return new AssetBasicInfo[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("ERROR", "AssetBasePage.GetMachinesByCompany1", ex.Message, ex.ToString());
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private object GetMachineInfo()
|
||||
{
|
||||
try
|
||||
@ -185,9 +271,6 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
// assetItem.MachineRental = rental;
|
||||
//}
|
||||
|
||||
if (assetItem.UnderCarriageHours != null)
|
||||
assetItem.UnderCarriageHours = Math.Round(assetItem.UnderCarriageHours.Value, 2);
|
||||
|
||||
return assetItem;
|
||||
}
|
||||
else
|
||||
@ -213,7 +296,7 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
AssetDetailItem2 asset = JsonConvert.DeserializeObject<AssetDetailItem2>(clientdata);
|
||||
|
||||
if (SystemParams.IsDealer && string.IsNullOrWhiteSpace(asset.ContractorID))
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
|
||||
string connectionStr = string.Empty;
|
||||
string customerid = string.Empty;
|
||||
@ -288,7 +371,7 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (BusinessException bex)
|
||||
@ -380,10 +463,10 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -633,9 +716,11 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
custid = SystemParams.CompanyID;
|
||||
|
||||
StringKeyValue kv = new StringKeyValue();
|
||||
kv.Key = SystemParams.GetStringParam("CustomerTimeZone", false, db);
|
||||
TimeZoneInfo tz = SystemParams.GetTimeZoneInfo(custid);
|
||||
DateTime time = SystemParams.ConvertToUserTimeFromUtc(session.User, DateTime.Now.ToUniversalTime());
|
||||
|
||||
//kv.Key = CreateClient<CustomerProvider>(custid).GetCustomerTimeZone(custid);
|
||||
kv.Key = SystemParams.GetUserTimeZoneId(session.User);
|
||||
//TimeZoneInfo tz = SystemParams.GetTimeZoneInfo(custid);
|
||||
DateTime time = SystemParams.ConvertToUserTimeFromUtc(session.User, DateTime.UtcNow);
|
||||
kv.Value = time.ToString("MM/dd/yyyy HH:mm:ss");//此处格式不能修改
|
||||
return kv;
|
||||
}
|
||||
@ -674,9 +759,9 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
}
|
||||
MachineManagement.ChangeMachineIconFile(Convert.ToInt64(kv.Value), uploadFile == null ? "" : uploadFile.FileName, iconfilebyte, db);
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -731,7 +816,7 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
client.GenerateMissedPMAlert(SystemParams.CompanyID, p.SelectedIntervalID, pmAsset.AssetId);
|
||||
}
|
||||
}
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -754,7 +839,7 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
|
||||
CreateClient<PMClient>().DeleteAssetsFromSchedule(SystemParams.CompanyID, ps[1], new long[] { assetid }, session.User.UID);
|
||||
}
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -788,7 +873,7 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -820,7 +905,7 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -865,6 +950,98 @@ namespace IronIntel.Contractor.Site.Asset
|
||||
}
|
||||
}
|
||||
|
||||
#region Asset History
|
||||
private object GetAssets()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var companyid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
|
||||
var items = CreateClient<AssetQueryClient>(companyid).GetAssetListItemsByUser(companyid, session.User.UID, string.Empty, true, 0, false, null, null, null);
|
||||
return items.OrderBy(g => g.VIN).Select(i => new
|
||||
{
|
||||
i.Id,
|
||||
DisplayName = GetDisplayName(i),
|
||||
}).ToArray();
|
||||
}
|
||||
else
|
||||
return new AssetGroupInfo[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("ERROR", "MachineDeviceBasePage.GetAssetList", ex.Message, ex.ToString());
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private object GetAssetHistorys()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
string clientdata = Request.Params["ClientData"];
|
||||
string[] ps = JsonConvert.DeserializeObject<string[]>(clientdata);
|
||||
|
||||
var companyid = ps[0];
|
||||
long assetid = Convert.ToInt64(ps[1]);
|
||||
DateTime beginDate = Helper.DBMinDateTime;
|
||||
DateTime endDate = DateTime.MaxValue;
|
||||
if (!DateTime.TryParse(ps[2], out beginDate))
|
||||
beginDate = Helper.DBMinDateTime;
|
||||
if (!DateTime.TryParse(ps[3], out endDate))
|
||||
endDate = DateTime.MaxValue;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
|
||||
AssetHistoryInfo[] items = CreateClient<AssetQueryClient>(companyid).GetAssetHistorys(companyid, assetid, beginDate, endDate, "");
|
||||
if (items == null || items.Length == 0)
|
||||
return new AssetHistoryItem[0];
|
||||
|
||||
List<AssetHistoryItem> ls = new List<AssetHistoryItem>();
|
||||
foreach (AssetHistoryInfo item in items)
|
||||
{
|
||||
AssetHistoryItem his = new AssetHistoryItem();
|
||||
Helper.CloneProperty(his, item);
|
||||
ls.Add(his);
|
||||
}
|
||||
return ls.ToArray();
|
||||
}
|
||||
else
|
||||
return new AssetHistoryItem[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private string GetDisplayName(AssetListItemInfo a)
|
||||
{
|
||||
//Name取值顺序为Name2,Name,VIN,ID用于前端显示
|
||||
string name = a.Name2;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = a.Name;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = a.VIN;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = a.Id.ToString();
|
||||
return name;
|
||||
}
|
||||
class AssetHistoryItem : AssetHistoryInfo
|
||||
{
|
||||
public string DateTimeStr { get { return DateTime == null ? "" : DateTime.Value.ToString(); } }
|
||||
}
|
||||
#endregion
|
||||
|
||||
class PMScheduleAssetItem
|
||||
{
|
||||
public long AssetId { get; set; }
|
||||
|
@ -39,18 +39,22 @@ namespace IronIntel.Contractor.Site
|
||||
}
|
||||
string opacity;
|
||||
string fore;
|
||||
string ctrlbgcolor = "lightgray";
|
||||
try
|
||||
{
|
||||
var c = ColorTranslator.FromHtml(color);
|
||||
opacity = string.Format("rgb({0} {1} {2}/60%)", c.R, c.G, c.B);
|
||||
fore = (.299 * c.R + .587 * c.G + .114 * c.B) < 127.5 ? "#f0f0f0" : "#0f0f0f";
|
||||
var g = .299 * c.R + .587 * c.G + .114 * c.B;
|
||||
fore = g < 127.5 ? "#f0f0f0" : "#0f0f0f";
|
||||
ctrlbgcolor = g < 221 ? color : "lightgray";//221为light的计算值
|
||||
}
|
||||
catch
|
||||
{
|
||||
opacity = "rgb(247 142 30/60%)";
|
||||
fore = "#0f0f0f";
|
||||
ctrlbgcolor = "lightgray";
|
||||
}
|
||||
StyleVariables = $"--title-color: {fore}; --title-bg-color: {color}; --title-bg-opacity-color: {opacity}";
|
||||
StyleVariables = $"--title-color: {fore}; --title-bg-color: {color}; --title-bg-opacity-color: {opacity};--title-ctrlbg-color: {ctrlbgcolor}; ";
|
||||
}
|
||||
return new StyleInfo
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ namespace IronIntel.Contractor.Site.Contact
|
||||
UserInfo[] items = null;
|
||||
if (session != null)
|
||||
{
|
||||
items = UserManagement.GetUsers();
|
||||
items = UserManagement.GetUsers(string.Empty, string.Empty, GetLanguageCookie());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -16,6 +16,14 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
public class ContractorBasePage : IronIntelBasePage
|
||||
{
|
||||
public const char SPLIT_CHAR175 = (char)175;//\u00af
|
||||
public const char SPLIT_CHAR180 = (char)180;//\u00b4
|
||||
public const char SPLIT_CHAR181 = (char)181;//'µ'
|
||||
public const char SPLIT_CHAR182 = (char)182;//'¶'
|
||||
public const char SPLIT_CHAR183 = (char)183;//'·'
|
||||
public const char SPLIT_CHAR184 = (char)182;//'\u00b8'
|
||||
public const string OkResult = "OK";
|
||||
public const string FailedResult = "Failed";
|
||||
public static string AppVersion
|
||||
{
|
||||
get
|
||||
|
@ -319,6 +319,10 @@ namespace IronIntel.Contractor.Site.Credentials
|
||||
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Description))
|
||||
{
|
||||
item.Description = HttpUtility.UrlDecode(item.Description);
|
||||
}
|
||||
CredentialProvider crd = FleetServiceClientHelper.CreateClient<CredentialProvider>();
|
||||
crd.UpdateApiCredentialDefs(SystemParams.CompanyID, item, GetCurrentUser().IID);
|
||||
}
|
||||
|
@ -316,8 +316,8 @@ namespace IronIntel.Contractor.Site.Customer
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
var users = UserManagement.GetActiveUsers(session.SessionID);
|
||||
return users.Where(u => u.IsUser).ToArray();
|
||||
var users = UserManagement.GetAllFollowers(GetLanguageCookie(), session.SessionID);
|
||||
return users;
|
||||
}
|
||||
else
|
||||
return new UserInfo[0];
|
||||
@ -565,7 +565,7 @@ namespace IronIntel.Contractor.Site.Customer
|
||||
var clientdata = Request.Form["ClientData"];
|
||||
string searchtxt = HttpUtility.HtmlDecode(clientdata);
|
||||
|
||||
var users = UserManagement.GetSalespersons(session.SessionID, SystemParams.CompanyID, searchtxt);
|
||||
var users = UserManagement.GetSalespersons(session.SessionID, GetLanguageCookie(), SystemParams.CompanyID, searchtxt);
|
||||
users = users.Where(m => !string.IsNullOrWhiteSpace(m.FOB)).OrderBy(m => m.FOB).ToArray();
|
||||
return users;
|
||||
}
|
||||
|
52
IronIntelContractorSiteLib/GridData.cs
Normal file
52
IronIntelContractorSiteLib/GridData.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IronIntel.Contractor.Site
|
||||
{
|
||||
public class GridData<T>
|
||||
{
|
||||
[JsonProperty("columns")]
|
||||
public GridColumnDefinition[] Columns { get; set; }
|
||||
|
||||
[JsonProperty("source")]
|
||||
public T[] Source { get; set; }
|
||||
|
||||
[JsonProperty("rowHeight")]
|
||||
public double RowHeight { get; set; }
|
||||
|
||||
[JsonProperty("sortKey")]
|
||||
public string SortKey { get; set; }
|
||||
|
||||
[JsonProperty("sortArray")]
|
||||
public GridColumnSortDefinition[] SortArray { get; set; }
|
||||
}
|
||||
|
||||
public class GridColumnDefinition
|
||||
{
|
||||
[JsonProperty("key")]
|
||||
public string Key { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("caption")]
|
||||
public string Caption { get; set; }
|
||||
|
||||
[JsonProperty("width")]
|
||||
public double Width { get; set; }
|
||||
|
||||
[JsonProperty("align")]
|
||||
public string Align { get; set; }
|
||||
|
||||
[JsonProperty("visible")]
|
||||
public bool Visible { get; set; }
|
||||
}
|
||||
|
||||
public class GridColumnSortDefinition
|
||||
{
|
||||
[JsonProperty("column")]
|
||||
public string Column { get; set; }
|
||||
|
||||
[JsonProperty("order")]
|
||||
public string Order { get; set; }
|
||||
}
|
||||
}
|
@ -74,6 +74,9 @@ namespace IronIntel.Contractor.Site
|
||||
case "GetAssetTypes":
|
||||
result = GetAssetTypes();
|
||||
break;
|
||||
case "GetAssetGroups":
|
||||
result = GetAssetGroups();
|
||||
break;
|
||||
case "GetInspectItems":
|
||||
result = GetInspectItems();
|
||||
break;
|
||||
@ -270,8 +273,6 @@ namespace IronIntel.Contractor.Site
|
||||
|
||||
string filter = HttpUtility.HtmlDecode(ps[3]);
|
||||
|
||||
WorkOrderListItem[] allworkorders = CreateClient<WorkOrderProvider>().GetWorkOrderItems(SystemParams.CompanyID, null, null, null, null, "", -1, null, null, null);
|
||||
|
||||
if (teamintelligence)
|
||||
{
|
||||
var client = CreateClient<TeamIntelligenceClient>();
|
||||
@ -305,25 +306,12 @@ namespace IronIntel.Contractor.Site
|
||||
inspect.WorkOrderNumber = "Not Assigned";
|
||||
}
|
||||
|
||||
if (allworkorders != null && allworkorders.Length > 0)
|
||||
{
|
||||
List<WorkOrderListItem> lswo = new List<WorkOrderListItem>();
|
||||
lswo = allworkorders.Where(m => m.AssetId == inspect.AssetId).ToList();
|
||||
if (inspect.WorkOrderId > 0)
|
||||
{
|
||||
WorkOrderListItem curwo = allworkorders.FirstOrDefault(m => m.Id == inspect.WorkOrderId);
|
||||
if (curwo == null)
|
||||
{
|
||||
//curwo = new WorkOrderListItem() { Id = inspect.WorkOrderId, WorkOrderNumber = inspect.WorkOrderNumber };
|
||||
//lswo.Add(curwo);
|
||||
inspect.WorkOrderId = -1;
|
||||
inspect.WorkOrderNumber = "Not Assigned";
|
||||
}
|
||||
}
|
||||
lswo = lswo.OrderByDescending(w => !w.Completed).ThenBy(w => w.WorkOrderNumber).ToList();
|
||||
lswo.Insert(0, new WorkOrderListItem() { Id = -1, WorkOrderNumber = "Not Assigned" });
|
||||
inspect.WorkOrders = lswo.ToArray();
|
||||
}
|
||||
List<WorkOrderListItem> lswo = new List<WorkOrderListItem>();
|
||||
lswo.Add(new WorkOrderListItem() { Id = -1, WorkOrderNumber = "Not Assigned" });
|
||||
if (inspect.WorkOrderId > 0)
|
||||
lswo.Add(new WorkOrderListItem() { Id = inspect.WorkOrderId, WorkOrderNumber = inspect.WorkOrderNumber });
|
||||
inspect.WorkOrders = lswo.ToArray();
|
||||
|
||||
list.Add(inspect);
|
||||
}
|
||||
return list.ToArray();
|
||||
@ -643,13 +631,15 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
var client = CreateClient<TeamIntelligenceClient>();
|
||||
report = client.GetInspection(SystemParams.CompanyID, id);
|
||||
layout = client.GetInspectReportLayout(SystemParams.CompanyID, id);
|
||||
if (report != null)
|
||||
layout = client.GetInspectReportLayout(SystemParams.CompanyID, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
var client = CreateClient<AssetInspectClient>();
|
||||
report = client.GetInspection(SystemParams.CompanyID, id);
|
||||
layout = client.GetInspectReportLayout(SystemParams.CompanyID, id);
|
||||
if (report != null)
|
||||
layout = client.GetInspectReportLayout(SystemParams.CompanyID, id);
|
||||
}
|
||||
|
||||
if (report == null)
|
||||
@ -905,12 +895,9 @@ namespace IronIntel.Contractor.Site
|
||||
int makeid = -1;
|
||||
if (!int.TryParse(ps[3], out makeid))
|
||||
makeid = -1;
|
||||
int modelid = -1;
|
||||
if (!int.TryParse(ps[4], out modelid))
|
||||
modelid = -1;
|
||||
int typeid = -1;
|
||||
if (!int.TryParse(ps[5], out typeid))
|
||||
typeid = -1;
|
||||
int[] modelids = JsonConvert.DeserializeObject<int[]>(ps[4]);
|
||||
int[] typeids = JsonConvert.DeserializeObject<int[]>(ps[5]);
|
||||
string[] groupids = JsonConvert.DeserializeObject<string[]>(ps[6]);
|
||||
|
||||
FormTemplateItem[] templates = null;
|
||||
if (teamintelligence)
|
||||
@ -921,7 +908,7 @@ namespace IronIntel.Contractor.Site
|
||||
else
|
||||
{
|
||||
var client = CreateClient<AssetInspectClient>();
|
||||
templates = client.GetAssetTemplateItems(SystemParams.CompanyID, filter, makeid, modelid, typeid, user.IID, state);
|
||||
templates = client.GetAssetTemplateItems(SystemParams.CompanyID, filter, makeid, modelids, typeids, groupids, user.IID, state);
|
||||
}
|
||||
return templates;
|
||||
}
|
||||
@ -1099,8 +1086,7 @@ namespace IronIntel.Contractor.Site
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(templateinfo.IssueId)
|
||||
|| (user.UserType < Users.UserTypes.SupperAdmin && !templateinfo.Editable))
|
||||
if (user.UserType < Users.UserTypes.SupperAdmin && !templateinfo.Editable)
|
||||
{
|
||||
if (teamintelligence)
|
||||
{
|
||||
@ -1119,7 +1105,7 @@ namespace IronIntel.Contractor.Site
|
||||
|
||||
client.SetTemplateEmailList(SystemParams.CompanyID, templateinfo.Id, useriids, templateinfo.Emails);
|
||||
}
|
||||
return new string[] { templateinfo.Id.ToString(), "Saved successfully." };
|
||||
return templateinfo.Id;
|
||||
}
|
||||
|
||||
FormTemplateInfo newtemp = null;
|
||||
@ -1133,7 +1119,12 @@ namespace IronIntel.Contractor.Site
|
||||
var client = CreateClient<AssetInspectClient>();
|
||||
newtemp = client.UpdateTemplate(SystemParams.CompanyID, templateinfo, session.User.UID);
|
||||
}
|
||||
return new string[] { newtemp.Id.ToString(), "Saved successfully." };
|
||||
if (templateinfo.Id < 0)
|
||||
{
|
||||
// add template, need return some properties like Editable, IssueId
|
||||
return newtemp;
|
||||
}
|
||||
return newtemp.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1549,20 +1540,30 @@ namespace IronIntel.Contractor.Site
|
||||
if (session != null)
|
||||
{
|
||||
AssetType[] types = CreateClient<AssetClassProvider>().GetAssetTypes(SystemParams.CompanyID);
|
||||
types = types.OrderBy((t) => t.Name).ToArray();
|
||||
List<StringKeyValue> list = new List<StringKeyValue>();
|
||||
foreach (AssetType md in types)
|
||||
{
|
||||
StringKeyValue kv = new StringKeyValue();
|
||||
kv.Key = md.ID.ToString();
|
||||
kv.Value = md.Name;
|
||||
list.Add(kv);
|
||||
}
|
||||
return list.ToArray();
|
||||
return types;
|
||||
|
||||
}
|
||||
else
|
||||
return new StringKeyValue[0];
|
||||
return new AssetType[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private object GetAssetGroups()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
var groups = CreateClient<AssetQueryClient>(SystemParams.CompanyID).GetAssetGroups(SystemParams.CompanyID, "", session.User.UID);
|
||||
return groups.OrderBy(g => g.Name).ToArray();
|
||||
}
|
||||
else
|
||||
return new AssetGroupInfo[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -2226,7 +2227,8 @@ namespace IronIntel.Contractor.Site
|
||||
long assetid = 0;
|
||||
if (long.TryParse(clientdata, out assetid))
|
||||
{
|
||||
return CreateClient<WorkOrderProvider>().GetWorkOrderItemsByAsset(SystemParams.CompanyID, assetid);
|
||||
var wos = CreateClient<WorkOrderProvider>().GetWorkOrderItemsByAsset(SystemParams.CompanyID, assetid);
|
||||
return wos.OrderByDescending(w => !w.Completed).ThenBy(w => w.WorkOrderNumber).ToArray();
|
||||
}
|
||||
|
||||
return new WorkOrderListItem[0];
|
||||
|
@ -9,7 +9,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>IronIntel.Contractor.Site</RootNamespace>
|
||||
<AssemblyName>iicontractorsitelib</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
@ -31,7 +31,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>LHBIS.snk</AssemblyOriginatorKeyFile>
|
||||
@ -111,6 +111,7 @@
|
||||
<Compile Include="FITrackerBasePage.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="GridData.cs" />
|
||||
<Compile Include="InspectionBasePage.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
|
@ -288,11 +288,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
return new string[] { req.Assets[0].DispatchId.ToString(), "OK" };
|
||||
}
|
||||
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -316,11 +316,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
long id = Convert.ToInt64(kv.Key);
|
||||
|
||||
CreateClient<JobSiteDispatchProvider>().DeleteRequirment(SystemParams.CompanyID, id, kv.Value);
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -429,18 +429,22 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
var clientdata = Request.Form["ClientData"];
|
||||
bool activeonly = clientdata == "1";
|
||||
|
||||
JobSitesAndRegionsItem item = new JobSitesAndRegionsItem();
|
||||
|
||||
MapViewJobSiteInfo[] jss = CreateClient<MapViewQueryClient>().GetAvailableJobSites(SystemParams.CompanyID, session.User.UID, string.Empty, false);
|
||||
//MapViewJobSiteInfo[] jss = CreateClient<MapViewQueryClient>().GetAvailableJobSites(SystemParams.CompanyID, session.User.UID, string.Empty, false);
|
||||
JobSiteItem[] jss = CreateClient<JobSiteProvider>().GetJobSiteItems(SystemParams.CompanyID, "", null, activeonly);
|
||||
List<StringKeyValue> list = new List<StringKeyValue>();
|
||||
foreach (MapViewJobSiteInfo js in jss)
|
||||
foreach (JobSiteItem js in jss)
|
||||
{
|
||||
StringKeyValue kv = new StringKeyValue();
|
||||
kv.Key = js.ID.ToString();
|
||||
kv.Value = js.Name;
|
||||
kv.Tag1 = js.StartDate == null ? "" : js.StartDate.Value.ToShortDateString();
|
||||
kv.Tag2 = js.EndDate == null ? "" : js.EndDate.Value.ToShortDateString();
|
||||
kv.Tag3 = js.ReginId.ToString();
|
||||
kv.Tag3 = js.RegionId.ToString();
|
||||
list.Add(kv);
|
||||
}
|
||||
|
||||
@ -482,12 +486,15 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
if (session != null)
|
||||
{
|
||||
MachineTypeItem[] types = JobSitesManagement.GetMachineTypes();
|
||||
var typesinuse = CreateClient<AssetDataAdjustClient>().GetAssetTypesInUse(SystemParams.CompanyID);
|
||||
|
||||
List<StringKeyValue> list = new List<StringKeyValue>();
|
||||
foreach (MachineTypeItem type in types)
|
||||
{
|
||||
StringKeyValue kv = new StringKeyValue();
|
||||
kv.Key = type.ID.ToString();
|
||||
kv.Value = type.Name;
|
||||
kv.Tag1 = typesinuse.Contains(type.ID) ? "1" : "0";
|
||||
list.Add(kv);
|
||||
}
|
||||
|
||||
@ -631,6 +638,7 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
HasSchedule = selMinDate != DateTime.MaxValue,
|
||||
BeginDate = selMinDate,
|
||||
TotalDays = selMinDate != DateTime.MaxValue ? (selMaxDate - selMinDate).Days + 1 : 0,
|
||||
RelatedRequirementAssets = reqinfo.RelatedRequirementAssets,
|
||||
DispatchAssets = items
|
||||
};
|
||||
}
|
||||
@ -654,11 +662,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
var clientdata = Request.Form["ClientData"];
|
||||
clientdata = HttpUtility.HtmlDecode(clientdata);
|
||||
UserParams.SetStringParameter(session.User.UID, "RequirmentsDefault", clientdata);
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -717,6 +725,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
{
|
||||
JobSiteAssetDispatchItem item = new JobSiteAssetDispatchItem();
|
||||
Helper.CloneProperty(item, re);
|
||||
if (!item.Completed)
|
||||
{
|
||||
item.CompletedTime = null;
|
||||
item.CompletedBy = "";
|
||||
}
|
||||
ls.Add(item);
|
||||
}
|
||||
|
||||
@ -830,11 +843,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
disids = item.ObjectIDs;
|
||||
|
||||
CreateClient<JobSiteDispatchProvider>().AssignDispatch(SystemParams.CompanyID, disids, item.AssetID);
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -854,9 +867,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var id = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var data = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
var disassetsstr = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
JobSiteAssetDispatchInfo[] assts = JsonConvert.DeserializeObject<JobSiteAssetDispatchInfo[]>(data);
|
||||
DispatchAssetInfo[] disassets = JsonConvert.DeserializeObject<DispatchAssetInfo[]>(disassetsstr);
|
||||
|
||||
long[] dispatchids = CreateClient<JobSiteDispatchProvider>().AddDispatch(SystemParams.CompanyID, Convert.ToInt64(id), assts);
|
||||
long[] dispatchids = CreateClient<JobSiteDispatchProvider>().AddDispatch(SystemParams.CompanyID, Convert.ToInt64(id), assts, disassets);
|
||||
|
||||
return dispatchids;
|
||||
}
|
||||
@ -897,11 +912,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
{
|
||||
}
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -924,11 +939,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
DispatchItem item = JsonConvert.DeserializeObject<DispatchItem>(clientdata);
|
||||
|
||||
CreateClient<JobSiteDispatchProvider>().DeleteDispatch(SystemParams.CompanyID, item.DispatchId, item.DeleteNotes);
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -962,11 +977,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
|
||||
SendDispatchRequest(items, si);
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -1056,11 +1071,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
bool compeleted = Helper.IsTrue(kv.Value);
|
||||
CreateClient<JobSiteDispatchProvider>().UpdateDispatchCompleted(SystemParams.CompanyID, dispatchid, compeleted, user.IID);
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -1079,7 +1094,7 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
string clientdata = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
long[] ps = JsonConvert.DeserializeObject<long[]>(clientdata);
|
||||
|
||||
var items = UserManagement.GetUsersByAssets(session.SessionID, ps, SystemParams.CompanyID);
|
||||
var items = UserManagement.GetUsersByAssets(session.SessionID, ps, SystemParams.CompanyID, GetLanguageCookie());
|
||||
return items;
|
||||
}
|
||||
else
|
||||
@ -1116,11 +1131,11 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
|
||||
if (!DateTime.TryParse(ps[6], out endDate))
|
||||
endDate = DateTime.MaxValue;
|
||||
bool unscheduled = ps[7] == "1";
|
||||
int scheduled = Convert.ToInt32(ps[7]);
|
||||
|
||||
DispatchAssetInfo[] infos = CreateClient<JobSiteDispatchProvider>().GetAssetSchedulers(SystemParams.CompanyID, jss, regions, assetGroups, assetTypes, beginDate, endDate, unscheduled, searchtxt);
|
||||
DispatchAssetInfo[] infos = CreateClient<JobSiteDispatchProvider>().GetAssetSchedulers(SystemParams.CompanyID, jss, regions, assetGroups, assetTypes, beginDate, endDate, scheduled, searchtxt);
|
||||
|
||||
var items = DispatchAssetItem.Convert(infos, beginDate, endDate).OrderBy(m => m.AssetName).ToArray();
|
||||
var items = DispatchAssetItem.Convert(infos, beginDate, endDate, true).OrderBy(m => m.AssetName).ToArray();
|
||||
if (items.Count() == 0)
|
||||
return null;
|
||||
|
||||
@ -1216,8 +1231,15 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
public int ConflictDays { get; set; }
|
||||
public DateTime? BeginDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? FinishDate { get; set; }
|
||||
public string NextJobSite { get; set; }
|
||||
public int DurationDays { get; set; }
|
||||
public string BeginDateStr { get { return BeginDate == null ? "" : BeginDate.Value.ToString("M/d/yyyy"); } }
|
||||
public string EndDateStr { get { return EndDate == null ? "" : EndDate.Value.ToString("M/d/yyyy"); } }
|
||||
public string StartDateStr { get { return StartDate == null ? "" : StartDate.Value.ToString("M/d/yyyy"); } }
|
||||
public string FinishDateStr { get { return FinishDate == null ? "" : FinishDate.Value.ToString("M/d/yyyy"); } }
|
||||
|
||||
public string DistanceStr
|
||||
{
|
||||
get
|
||||
@ -1266,7 +1288,7 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
}
|
||||
}
|
||||
|
||||
public static DispatchAssetItem[] Convert(IEnumerable<DispatchAssetInfo> infos, DateTime begindate, DateTime enddate)
|
||||
public static DispatchAssetItem[] Convert(IEnumerable<DispatchAssetInfo> infos, DateTime begindate, DateTime enddate, bool schedulerlist = false)
|
||||
{
|
||||
List<DispatchAssetItem> items = new List<DispatchAssetItem>();
|
||||
foreach (var i in infos)
|
||||
@ -1277,6 +1299,7 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
item.DistanceToDestJobSite = Math.Round(item.DistanceToDestJobSite.Value, 2);
|
||||
if (begindate > DateTime.Now.AddYears(-5) && enddate < DateTime.Now.AddYears(5))
|
||||
item.ConflictDays = GetConflictDays(i, begindate, enddate);
|
||||
item.AttachedAssets.AddRange(i.AttachedAssets);
|
||||
foreach (var s in i.Schedules)
|
||||
{
|
||||
AssetScheduleItem si = new AssetScheduleItem();
|
||||
@ -1284,6 +1307,17 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
item.Schedules.Add(si);
|
||||
}
|
||||
item.ComputeSchedules();
|
||||
if (schedulerlist)
|
||||
{ //schedulerlist
|
||||
if (item.Schedules.Count > 0)
|
||||
{
|
||||
var sch = item.Schedules[0];
|
||||
item.StartDate = sch.BeginDate;
|
||||
item.FinishDate = sch.EndDate;
|
||||
item.NextJobSite = sch.JobSiteName;
|
||||
item.DurationDays = (sch.EndDate - sch.BeginDate).Days + 1;
|
||||
}
|
||||
}
|
||||
items.Add(item);
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,10 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
{
|
||||
if (GetCurrentLoginSession() != null)
|
||||
{
|
||||
var jss = CreateClient<JobSiteProvider>().GetJobSiteItems(SystemParams.CompanyID, "", null, true);
|
||||
var companyid = Request.Form["ClientData"];
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
var jss = CreateClient<JobSiteProvider>().GetJobSiteItems(companyid, "", null, true);
|
||||
var js = jss.OrderBy(g => g.Name).Select(i => new
|
||||
{
|
||||
i.ID,
|
||||
@ -695,7 +698,7 @@ namespace IronIntel.Contractor.Site.JobSite
|
||||
{
|
||||
if (GetCurrentLoginSession() != null)
|
||||
{
|
||||
Users.UserInfo[] items = UserManagement.GetUsers(null, string.Empty);
|
||||
Users.UserInfo[] items = UserManagement.GetUsers(string.Empty, string.Empty, GetLanguageCookie());
|
||||
items = items.Where(m => m.Active).OrderBy(u => u.ID).ToArray();
|
||||
return items;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Foresight.Data;
|
||||
using FI.FIC.Contracts.DataObjects.BaseObject;
|
||||
using Foresight.Data;
|
||||
using Foresight.Fleet.Services;
|
||||
using Foresight.Fleet.Services.Asset;
|
||||
using Foresight.Fleet.Services.Customer;
|
||||
@ -47,6 +48,12 @@ namespace IronIntel.Contractor.Site
|
||||
case "GETGPSSOURCES":
|
||||
result = GetGPSSources();
|
||||
break;
|
||||
case "GETDEVICETYPES":
|
||||
result = GetDeviceTypes();
|
||||
break;
|
||||
case "GETNIMBELINGTYPES":
|
||||
result = GetNimbelingTypes();
|
||||
break;
|
||||
case "CHANGEGPSCONTRACTOR":
|
||||
result = ChangeGPSContractor();
|
||||
break;
|
||||
@ -345,6 +352,7 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var companyid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetid = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
var viewalertstypes = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -352,7 +360,7 @@ namespace IronIntel.Contractor.Site
|
||||
if (string.IsNullOrWhiteSpace(companyid) && SystemParams.IsDealer)
|
||||
return new AssetSummaryItem();
|
||||
AssetExtItem item = new AssetExtItem();
|
||||
AssetExtInfo ext = CreateClient<AssetQueryClient>(companyid).GetAssetExtInfo(companyid, Convert.ToInt64(assetid));
|
||||
AssetExtInfo ext = CreateClient<AssetQueryClient>(companyid).GetAssetExtInfo(companyid, Convert.ToInt64(assetid), viewalertstypes);
|
||||
Helper.CloneProperty(item, ext);
|
||||
if (item.InspectReportItem != null)
|
||||
{
|
||||
@ -857,7 +865,46 @@ namespace IronIntel.Contractor.Site
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object GetDeviceTypes()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (GetCurrentLoginSession() != null)
|
||||
{
|
||||
List<string[]> data = new List<string[]>();
|
||||
data.Add(DeviceInfo.SmartWitnessTypes);
|
||||
data.Add(DeviceInfo.IDriveTypes);
|
||||
return data;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<string[]>();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private object GetNimbelingTypes()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (GetCurrentLoginSession() != null)
|
||||
{
|
||||
return CreateClient<DeviceProvider>().GetNimbelinkTypes();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new KeyValuePair<string, string>();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object GetDeviceComments()
|
||||
{
|
||||
try
|
||||
@ -1290,6 +1337,7 @@ namespace IronIntel.Contractor.Site
|
||||
i.VIN,
|
||||
i.MakeName,
|
||||
i.ModelName,
|
||||
i.TypeID,
|
||||
i.TypeName,
|
||||
EngineHours = Math.Round(i.EngineHours ?? 0, 2),
|
||||
Odometer = Math.Round(i.Odometer ?? 0, 2),
|
||||
@ -1714,7 +1762,7 @@ namespace IronIntel.Contractor.Site
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
|
||||
users = UserManagement.GetActiveUsers(session.SessionID, companyid);
|
||||
users = UserManagement.GetActiveUsers(GetLanguageCookie(), session.SessionID, companyid);
|
||||
users = users.OrderBy(u => u.DisplayName).ToArray();
|
||||
}
|
||||
else
|
||||
@ -1850,7 +1898,7 @@ namespace IronIntel.Contractor.Site
|
||||
if (string.IsNullOrEmpty(doc.CustomerID))
|
||||
doc.CustomerID = SystemParams.CompanyID;
|
||||
|
||||
CreateClient<AssetDocumentProvider>(doc.CustomerID).UpdateAssetDocument(doc.CustomerID, doc.Id, doc.Name, doc.Description, doc.VisibleOnWorkOrder, doc.VisibleOnMap, doc.VisibleOnMobile, loginsession.User.UID);
|
||||
CreateClient<AssetDocumentProvider>(doc.CustomerID).UpdateAssetDocument(doc.CustomerID, doc.Id, doc.Name, doc.Description, doc.VisibleOnWorkOrder, doc.VisibleOnMap, doc.VisibleOnMobile, doc.Url, loginsession.User.UID);
|
||||
|
||||
return "OK";
|
||||
}
|
||||
@ -1932,6 +1980,7 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var customerid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetid = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
string timezonestr = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
if (string.IsNullOrEmpty(customerid))
|
||||
customerid = SystemParams.CompanyID;
|
||||
|
||||
@ -1940,11 +1989,13 @@ namespace IronIntel.Contractor.Site
|
||||
if (odometers == null || odometers.Length <= 0)
|
||||
return new CalampOdoInfo[0];
|
||||
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(timezonestr);//前端页面选中的timezone
|
||||
List<CalampOdometerInfo> list = new List<CalampOdometerInfo>();
|
||||
foreach (CalampOdoInfo odo in odometers)
|
||||
{
|
||||
CalampOdometerInfo item = new CalampOdometerInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -1972,6 +2023,11 @@ namespace IronIntel.Contractor.Site
|
||||
p.CustomerID = SystemParams.CompanyID;
|
||||
|
||||
DateTime utctime = p.OdometerDate.AddMinutes(-p.OffsetMinute);
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(p.TimeZone);//前端页面选中的timezone
|
||||
if (timezone != null)
|
||||
{
|
||||
utctime = TimeZoneInfo.ConvertTimeToUtc(p.OdometerDate, timezone);
|
||||
}
|
||||
|
||||
CalampOdoInfo[] odometers = CreateClient<AssetDataAdjustClient>(p.CustomerID).GetCalampOdometerHistoryPreview(p.CustomerID, p.AssetID, p.Odometer, p.UOM, utctime);
|
||||
if (odometers == null || odometers.Length <= 0)
|
||||
@ -1982,7 +2038,10 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
CalampOdometerInfo item = new CalampOdometerInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
if (timezone != null)
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
else
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -2007,6 +2066,7 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var customerid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetid = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
string timezonestr = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
if (string.IsNullOrEmpty(customerid))
|
||||
customerid = SystemParams.CompanyID;
|
||||
|
||||
@ -2015,11 +2075,13 @@ namespace IronIntel.Contractor.Site
|
||||
if (odometers == null || odometers.Length <= 0)
|
||||
return new CalampOdoInfo[0];
|
||||
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(timezonestr);//前端页面选中的timezone
|
||||
List<PedigreeOdometerInfo> list = new List<PedigreeOdometerInfo>();
|
||||
foreach (PedigreeOdoInfo odo in odometers)
|
||||
{
|
||||
PedigreeOdometerInfo item = new PedigreeOdometerInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -2047,6 +2109,11 @@ namespace IronIntel.Contractor.Site
|
||||
p.CustomerID = SystemParams.CompanyID;
|
||||
|
||||
DateTime utctime = p.OdometerDate.AddMinutes(-p.OffsetMinute);
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(p.TimeZone);//前端页面选中的timezone
|
||||
if (timezone != null)
|
||||
{
|
||||
utctime = TimeZoneInfo.ConvertTimeToUtc(p.OdometerDate, timezone);
|
||||
}
|
||||
|
||||
PedigreeOdoInfo[] odometers = CreateClient<AssetDataAdjustClient>(p.CustomerID).GetPedigreeOdometerHistoryPreview(p.CustomerID, p.AssetID, p.Odometer, p.UOM, utctime);
|
||||
if (odometers == null || odometers.Length <= 0)
|
||||
@ -2057,7 +2124,10 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
PedigreeOdometerInfo item = new PedigreeOdometerInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
if (timezone != null)
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
else
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -2082,6 +2152,7 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var customerid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetid = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
string timezonestr = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
if (string.IsNullOrEmpty(customerid))
|
||||
customerid = SystemParams.CompanyID;
|
||||
|
||||
@ -2090,11 +2161,13 @@ namespace IronIntel.Contractor.Site
|
||||
if (odometers == null || odometers.Length <= 0)
|
||||
return new CalampOdoInfo[0];
|
||||
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(timezonestr);//前端页面选中的timezone
|
||||
List<SmartWitnessOdometerInfo> list = new List<SmartWitnessOdometerInfo>();
|
||||
foreach (SmartWitnessOdoInfo odo in odometers)
|
||||
{
|
||||
SmartWitnessOdometerInfo item = new SmartWitnessOdometerInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
//item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -2122,6 +2195,11 @@ namespace IronIntel.Contractor.Site
|
||||
p.CustomerID = SystemParams.CompanyID;
|
||||
|
||||
DateTime utctime = p.OdometerDate.AddMinutes(-p.OffsetMinute);
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(p.TimeZone);//前端页面选中的timezone
|
||||
if (timezone != null)
|
||||
{
|
||||
utctime = TimeZoneInfo.ConvertTimeToUtc(p.OdometerDate, timezone);
|
||||
}
|
||||
|
||||
SmartWitnessOdoInfo[] odometers = CreateClient<AssetDataAdjustClient>(p.CustomerID).GetSmartWitnessOdometerHistoryPreview(p.CustomerID, p.AssetID, p.Odometer, p.UOM, utctime);
|
||||
if (odometers == null || odometers.Length <= 0)
|
||||
@ -2132,7 +2210,10 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
SmartWitnessOdometerInfo item = new SmartWitnessOdometerInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
if (timezone != null)
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
else
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
//item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -2265,6 +2346,7 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var customerid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetid = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
string timezonestr = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
if (string.IsNullOrEmpty(customerid))
|
||||
customerid = SystemParams.CompanyID;
|
||||
|
||||
@ -2273,11 +2355,13 @@ namespace IronIntel.Contractor.Site
|
||||
if (eninehours == null || eninehours.Length <= 0)
|
||||
return new CalampEngineHoursInfo[0];
|
||||
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(timezonestr);//前端页面选中的timezone
|
||||
List<CalampEngineHoursInfo> list = new List<CalampEngineHoursInfo>();
|
||||
foreach (CalampHourInfo eng in eninehours)
|
||||
{
|
||||
CalampEngineHoursInfo item = new CalampEngineHoursInfo();
|
||||
Helper.CloneProperty(item, eng);
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -2305,6 +2389,11 @@ namespace IronIntel.Contractor.Site
|
||||
p.CustomerID = SystemParams.CompanyID;
|
||||
|
||||
DateTime utctime = p.EngineHoursDate.AddMinutes(-p.OffsetMinute);
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(p.TimeZone);//前端页面选中的timezone
|
||||
if (timezone != null)
|
||||
{
|
||||
utctime = TimeZoneInfo.ConvertTimeToUtc(p.EngineHoursDate, timezone);
|
||||
}
|
||||
|
||||
CalampHourInfo[] odometers = CreateClient<AssetQueryClient>(p.CustomerID).GetCalampHourHistoryPreview(p.CustomerID, p.AssetID, p.EngineHours, "Hour", utctime);
|
||||
if (odometers == null || odometers.Length <= 0)
|
||||
@ -2315,7 +2404,10 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
CalampEngineHoursInfo item = new CalampEngineHoursInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
if (timezone != null)
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
else
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
item.Gps_Calc = Math.Round(item.Gps_Calc, 2);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
@ -2340,6 +2432,7 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var customerid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetid = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
string timezonestr = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
if (string.IsNullOrEmpty(customerid))
|
||||
customerid = SystemParams.CompanyID;
|
||||
|
||||
@ -2348,11 +2441,13 @@ namespace IronIntel.Contractor.Site
|
||||
if (eninehours == null || eninehours.Length <= 0)
|
||||
return new PedigreeEngineHoursInfo[0];
|
||||
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(timezonestr);//前端页面选中的timezone
|
||||
List<PedigreeEngineHoursInfo> list = new List<PedigreeEngineHoursInfo>();
|
||||
foreach (PedigreeHourInfo eng in eninehours)
|
||||
{
|
||||
PedigreeEngineHoursInfo item = new PedigreeEngineHoursInfo();
|
||||
Helper.CloneProperty(item, eng);
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
}
|
||||
@ -2379,6 +2474,11 @@ namespace IronIntel.Contractor.Site
|
||||
p.CustomerID = SystemParams.CompanyID;
|
||||
|
||||
DateTime utctime = p.EngineHoursDate.AddMinutes(-p.OffsetMinute);
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(p.TimeZone);//前端页面选中的timezone
|
||||
if (timezone != null)
|
||||
{
|
||||
utctime = TimeZoneInfo.ConvertTimeToUtc(p.EngineHoursDate, timezone);
|
||||
}
|
||||
|
||||
PedigreeHourInfo[] eninehours = CreateClient<AssetDataAdjustClient>(p.CustomerID).GetPedigreeHourHistoryPreview(p.CustomerID, p.AssetID, p.EngineHours, "Hour", utctime);
|
||||
if (eninehours == null || eninehours.Length <= 0)
|
||||
@ -2389,7 +2489,10 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
PedigreeEngineHoursInfo item = new PedigreeEngineHoursInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
if (timezone != null)
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
else
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
item.VBUS_Calc = Math.Round(item.VBUS_Calc, 2);
|
||||
list.Add(item);
|
||||
}
|
||||
@ -2414,6 +2517,7 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var customerid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetid = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
string timezonestr = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
if (string.IsNullOrEmpty(customerid))
|
||||
customerid = SystemParams.CompanyID;
|
||||
|
||||
@ -2422,11 +2526,13 @@ namespace IronIntel.Contractor.Site
|
||||
if (eninehours == null || eninehours.Length <= 0)
|
||||
return new OEMDD2EngineHoursInfo[0];
|
||||
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(timezonestr);//前端页面选中的timezone
|
||||
List<OEMDD2EngineHoursInfo> list = new List<OEMDD2EngineHoursInfo>();
|
||||
foreach (OEMDD2HourInfo eng in eninehours)
|
||||
{
|
||||
OEMDD2EngineHoursInfo item = new OEMDD2EngineHoursInfo();
|
||||
Helper.CloneProperty(item, eng);
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
item.Calculated = Math.Round(item.Calculated, 2);
|
||||
list.Add(item);
|
||||
}
|
||||
@ -2453,6 +2559,11 @@ namespace IronIntel.Contractor.Site
|
||||
p.CustomerID = SystemParams.CompanyID;
|
||||
|
||||
DateTime utctime = p.EngineHoursDate.AddMinutes(-p.OffsetMinute);
|
||||
TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById(p.TimeZone);//前端页面选中的timezone
|
||||
if (timezone != null)
|
||||
{
|
||||
utctime = TimeZoneInfo.ConvertTimeToUtc(p.EngineHoursDate, timezone);
|
||||
}
|
||||
|
||||
OEMDD2HourInfo[] eninehours = CreateClient<AssetDataAdjustClient>(p.CustomerID).GetOEMDD2HourHistoryPreview(p.CustomerID, p.AssetID, p.EngineHours, "Hour", utctime);
|
||||
if (eninehours == null || eninehours.Length <= 0)
|
||||
@ -2463,7 +2574,10 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
OEMDD2EngineHoursInfo item = new OEMDD2EngineHoursInfo();
|
||||
Helper.CloneProperty(item, odo);
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
if (timezone != null)
|
||||
item.AsofTimeLocal = TimeZoneInfo.ConvertTimeFromUtc(item.AsofTime, timezone);
|
||||
else
|
||||
item.AsofTimeLocal = item.AsofTime.AddMinutes(p.OffsetMinute);
|
||||
item.Raw = Math.Round(item.Raw, 2);
|
||||
item.Calculated = Math.Round(item.Calculated, 2);
|
||||
list.Add(item);
|
||||
@ -2858,7 +2972,7 @@ namespace IronIntel.Contractor.Site
|
||||
|
||||
if (hourstime < mintime)
|
||||
return 1;
|
||||
if (hourstime > maxtime.AddMinutes(1) || hourstime > DateTime.UtcNow)
|
||||
if (hourstime > maxtime.AddMinutes(1) || hourstime > DateTime.UtcNow.AddMinutes(1))
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
@ -3188,6 +3302,8 @@ namespace IronIntel.Contractor.Site
|
||||
case "ATU-RB-5":
|
||||
case "ATU-RB-6":
|
||||
case "ATU-RB-8":
|
||||
case "ATU-RB-9":
|
||||
case "ATU-RB-10":
|
||||
device.DeviceType = t;
|
||||
break;
|
||||
default:
|
||||
@ -3363,7 +3479,6 @@ namespace IronIntel.Contractor.Site
|
||||
asset.MakeID = -1;
|
||||
asset.ModelID = -1;
|
||||
asset.MakeYear = -1;
|
||||
//asset.UnderCarriageHours = -1;
|
||||
//asset.Odometer = -1;
|
||||
//asset.EngineHours = -1;
|
||||
foreach (StringKeyValue kv in kvs)
|
||||
@ -3569,18 +3684,6 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
asset.Description = dr[kv.Value].ToString().Trim();
|
||||
}
|
||||
else if (string.Compare(kv.Key, "Undercarriage Replacement Interval(Hours)", true) == 0)
|
||||
{
|
||||
string eh = dr[kv.Value].ToString().Trim();
|
||||
if (string.IsNullOrEmpty(eh) || eh == "0")
|
||||
{
|
||||
asset.UnderCarriageHours = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
asset.UnderCarriageHours = Helper.ConvertToDouble(eh);
|
||||
}
|
||||
}
|
||||
else if (string.Compare(kv.Key, "Odometer", true) == 0)
|
||||
{
|
||||
string eh = dr[kv.Value].ToString().Trim();
|
||||
@ -4133,6 +4236,12 @@ namespace IronIntel.Contractor.Site
|
||||
public string EventLocalTimeStr { get { return (EventLocalTime == null || EventLocalTime == DateTime.MinValue) ? "" : EventLocalTime.ToString("M/d/yyyy"); } }
|
||||
|
||||
}
|
||||
|
||||
public class DeviceTypeItem
|
||||
{
|
||||
public List<StringKeyValue> SmartWitnessTypes { get; set; }
|
||||
public List<StringKeyValue> IDriveTypes { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class AssetDocumentItem : AssetDocumentInfo
|
||||
|
@ -1,14 +1,20 @@
|
||||
using Foresight.Data;
|
||||
using FI.FIC.Contracts.DataObjects.BLObject;
|
||||
using Foresight.Data;
|
||||
using Foresight.Fleet.Services.Asset;
|
||||
using Foresight.Fleet.Services.AssetHealth;
|
||||
using Foresight.Fleet.Services.AssetHealth.WorkOrder;
|
||||
using Foresight.Fleet.Services.Device;
|
||||
using Foresight.Fleet.Services.JobSite;
|
||||
using Foresight.Fleet.Services.User;
|
||||
using Foresight.ServiceModel;
|
||||
using IronIntel.Contractor.ExportExcel;
|
||||
using IronIntel.Contractor.Machines;
|
||||
using IronIntel.Contractor.Maintenance;
|
||||
using Microsoft.SqlServer.Server;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -64,6 +70,9 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
case "GETJOBSITES":
|
||||
result = GetJobsites();
|
||||
break;
|
||||
case "GETALERTCATEGORY":
|
||||
result = GetAlertCategory();
|
||||
break;
|
||||
case "SAVEAUTOACKNOWLEDGEALERTTYPES":
|
||||
result = SaveAutoAcknowledgeAlertTypes();
|
||||
break;
|
||||
@ -85,6 +94,42 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
case "GETASSIGNTOS":
|
||||
result = GetAssignTos();
|
||||
break;
|
||||
case "GETALERTMAPPINGS":
|
||||
result = GetAlertMappings();
|
||||
break;
|
||||
case "SAVEALERTMAPPING":
|
||||
result = SaveAlertMapping();
|
||||
break;
|
||||
case "DELETEALERTMAPPING":
|
||||
result = DeleteAlertMapping();
|
||||
break;
|
||||
case "SAVEALERTMAPPINGITEM":
|
||||
result = SaveAlertMappingItem();
|
||||
break;
|
||||
case "DELETEALERTMAPPINGITEM":
|
||||
result = DeleteAlertMappingItem();
|
||||
break;
|
||||
case "GETALLALERTMAPPINGDATASOURCE":
|
||||
result = GetAllAlertMappingDataSource();
|
||||
break;
|
||||
case "ADDALERTMAPPINGSOURCE":
|
||||
result = AddAlertMappingSource();
|
||||
break;
|
||||
case "GETIMPORTALERTMAPPINGSCOLUMNS":
|
||||
result = GetImportAlertMappingsColumns();
|
||||
break;
|
||||
case "IMPORTALERTMAPPINGS":
|
||||
result = ImportAlertMappings();
|
||||
break;
|
||||
case "GETALERTMAPPINGDEFAULTCATEGORY":
|
||||
result = GetAlertMappingDefaultCategory();
|
||||
break;
|
||||
case "SETALERTMAPPINGDEFAULTCATEGORY":
|
||||
result = SetAlertMappingDefaultCategory();
|
||||
break;
|
||||
case "UPDATEALERTCOMMENT":
|
||||
result = UpdateAlertComment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -98,6 +143,566 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
#region Alert Mappings
|
||||
private object GetAlertMappings()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
var clientdata = Request.Form["ClientData"];
|
||||
var searchtxt = HttpUtility.HtmlDecode(clientdata);
|
||||
|
||||
AlertMappingInfo[] mappings = CreateClient<AlertProvider>().GetAlertMappings(SystemParams.CompanyID, searchtxt, true);
|
||||
if (mappings == null || mappings.Length == 0)
|
||||
return new AlertMappingInfo[0];
|
||||
|
||||
return mappings;
|
||||
}
|
||||
else
|
||||
return new AlertMappingInfo[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object SaveAlertMapping()
|
||||
{
|
||||
try
|
||||
{
|
||||
LoginSession se = GetCurrentLoginSession();
|
||||
if (se != null)
|
||||
{
|
||||
var clientdata = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
AlertMappingInfo ami = JsonConvert.DeserializeObject<AlertMappingInfo>(clientdata);
|
||||
long id = CreateClient<AlertProvider>().SaveAlertMapping(SystemParams.CompanyID, ami);
|
||||
|
||||
return id;
|
||||
}
|
||||
else
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Foresight.Standard.BusinessException ex)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private string DeleteAlertMapping()
|
||||
{
|
||||
try
|
||||
{
|
||||
LoginSession se = GetCurrentLoginSession();
|
||||
if (se != null)
|
||||
{
|
||||
var clientdata = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
CreateClient<AlertProvider>().DeleteAlertMapping(SystemParams.CompanyID, Convert.ToInt64(clientdata));
|
||||
|
||||
return "";
|
||||
}
|
||||
else
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private object SaveAlertMappingItem()
|
||||
{
|
||||
try
|
||||
{
|
||||
LoginSession se = GetCurrentLoginSession();
|
||||
if (se != null)
|
||||
{
|
||||
var clientdata = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
AlertMappingItem ami = JsonConvert.DeserializeObject<AlertMappingItem>(clientdata);
|
||||
long itemid = CreateClient<AlertProvider>().SaveAlertMappingItem(SystemParams.CompanyID, ami);
|
||||
|
||||
return itemid;
|
||||
}
|
||||
else
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Foresight.Standard.BusinessException ex)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private string DeleteAlertMappingItem()
|
||||
{
|
||||
try
|
||||
{
|
||||
LoginSession se = GetCurrentLoginSession();
|
||||
if (se != null)
|
||||
{
|
||||
var clientdata = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
CreateClient<AlertProvider>().DeleteAlertMappingItem(SystemParams.CompanyID, Convert.ToInt64(clientdata));
|
||||
|
||||
return "";
|
||||
}
|
||||
else
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object AddAlertMappingSource()
|
||||
{
|
||||
try
|
||||
{
|
||||
LoginSession se = GetCurrentLoginSession();
|
||||
if (se != null)
|
||||
{
|
||||
var clientdata = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
AlertMappingSourceInfo source = JsonConvert.DeserializeObject<AlertMappingSourceInfo>(clientdata);
|
||||
long id = CreateClient<AlertProvider>().AddAlertMappingSource(SystemParams.CompanyID, source);
|
||||
|
||||
return id;
|
||||
}
|
||||
else
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private object GetAlertMappingDefaultCategory()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
return SystemParams.GetStringParam(SystemParams.AlertMappingDefaultCategory);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object SetAlertMappingDefaultCategory()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
string clientdata = Request.Form["ClientData"];
|
||||
clientdata = HttpUtility.HtmlDecode(clientdata);
|
||||
|
||||
SystemParams.SetStringParam(SystemParams.AlertMappingDefaultCategory, clientdata);
|
||||
|
||||
return "";
|
||||
}
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object GetAllAlertMappingDataSource()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
var ap = CreateClient<AssetClassProvider>();
|
||||
AssetMake[] makes = ap.GetAssetMakes("");
|
||||
AssetModel[] models = ap.GetAssetModels(-1, "");
|
||||
StringBuilder sbmake = new StringBuilder();
|
||||
foreach (var m in makes)
|
||||
{
|
||||
sbmake.Append(SPLIT_CHAR180 + m.ID.ToString() + SPLIT_CHAR175 + m.Name);
|
||||
}
|
||||
if (sbmake.Length > 0)
|
||||
sbmake = sbmake.Remove(0, 1);
|
||||
|
||||
StringBuilder sbmodel = new StringBuilder();
|
||||
foreach (var m in models)
|
||||
{
|
||||
sbmodel.Append(SPLIT_CHAR180 + m.ID.ToString() + SPLIT_CHAR175 + m.Name + SPLIT_CHAR175 + m.MakeId);
|
||||
}
|
||||
if (sbmodel.Length > 0)
|
||||
sbmodel = sbmodel.Remove(0, 1);
|
||||
|
||||
|
||||
AlertMappingSourceInfo[] amsources = CreateClient<AlertProvider>().GetAlertMappingSource(SystemParams.CompanyID, -1);
|
||||
AlertMappingSourceInfo[] descs = amsources.Where(d => d.Type == 1).OrderBy(d => d.Value).ToArray();
|
||||
AlertMappingSourceInfo[] categories = amsources.Where(d => d.Type == 2).OrderBy(c => c.Value).ToArray();
|
||||
StringBuilder sbdescs = new StringBuilder();
|
||||
foreach (var d in descs)
|
||||
{
|
||||
sbdescs.Append(SPLIT_CHAR180 + d.ToString());
|
||||
}
|
||||
if (sbdescs.Length > 0)
|
||||
sbdescs = sbdescs.Remove(0, 1);
|
||||
|
||||
StringBuilder sbcategorys = new StringBuilder();
|
||||
foreach (var c in categories)
|
||||
{
|
||||
sbcategorys.Append(SPLIT_CHAR180 + c.ToString());
|
||||
}
|
||||
if (sbcategorys.Length > 0)
|
||||
sbcategorys = sbcategorys.Remove(0, 1);
|
||||
|
||||
return new
|
||||
{
|
||||
Makes = sbmake.ToString(),
|
||||
Models = sbmodel.ToString(),
|
||||
Descriptions = sbdescs.ToString(),
|
||||
Categories = sbcategorys.ToString()
|
||||
};
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private object GetImportAlertMappingsColumns()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
string woid = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
|
||||
HttpPostedFile uploadFile = null;
|
||||
byte[] iconfilebyte = null;
|
||||
if (Request.Files.Count > 0)
|
||||
{
|
||||
uploadFile = Request.Files[0];
|
||||
iconfilebyte = ConvertFile2bytes(uploadFile);
|
||||
}
|
||||
|
||||
if (iconfilebyte != null)
|
||||
{
|
||||
string[] columns = new ImportFromExcel().LoadExcelColumnHead(iconfilebyte);
|
||||
if (columns != null && columns.Length > 0)
|
||||
return columns;
|
||||
}
|
||||
}
|
||||
return new string[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
public class ImportResult
|
||||
{
|
||||
public int Count = -1;
|
||||
public List<AlertMappingClient> Datas = new List<AlertMappingClient>();
|
||||
}
|
||||
|
||||
private object ImportAlertMappings()
|
||||
{
|
||||
try
|
||||
{
|
||||
int count = 0;
|
||||
var session = GetCurrentLoginSession();
|
||||
ImportResult result = new ImportResult();
|
||||
if (session != null)
|
||||
{
|
||||
string p = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
bool getData = Convert.ToBoolean(HttpUtility.HtmlDecode(Request.Form["Get"]));
|
||||
string selected = HttpUtility.HtmlDecode(Request.Form["SelectedData"]);
|
||||
StringKeyValue[] kvs = JsonConvert.DeserializeObject<StringKeyValue[]>(p);
|
||||
HttpPostedFile uploadFile = null;
|
||||
|
||||
byte[] iconfilebyte = null;
|
||||
if (Request.Files.Count > 0)
|
||||
{
|
||||
uploadFile = Request.Files[0];
|
||||
iconfilebyte = ConvertFile2bytes(uploadFile);
|
||||
}
|
||||
|
||||
if (iconfilebyte != null)
|
||||
{
|
||||
if (!CheckRight(SystemParams.CompanyID, Feature.ALERTS_MANAGEMENT))
|
||||
return 0;
|
||||
DataTable dt = new ImportFromExcel().LoadExcelData(iconfilebyte);
|
||||
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
List<string> sels = new List<string>();
|
||||
if (!string.IsNullOrEmpty(selected))
|
||||
{
|
||||
string[] ss = selected.Split(',');
|
||||
sels = ss.ToList();
|
||||
}
|
||||
int index = 0;
|
||||
AlertProvider client = CreateClient<AlertProvider>();
|
||||
string[] alerttypes = new string[] { "", "Red", "Yellow", "Info" };
|
||||
var ap = CreateClient<AssetClassProvider>();
|
||||
AssetMake[] makes = ap.GetAssetMakes("");
|
||||
List<AssetMake> tempmakes = new List<AssetMake>();
|
||||
tempmakes.Add(new AssetMake() { ID = -1, Name = "(All)" });
|
||||
tempmakes.AddRange(makes);
|
||||
makes = tempmakes.ToArray();
|
||||
|
||||
AssetModel[] models = ap.GetAssetModels(-1, "");
|
||||
List<AssetModel> tempmodels = new List<AssetModel>();
|
||||
tempmodels.Add(new AssetModel() { ID = -1, Name = "(All)", MakeId = -1 });
|
||||
tempmodels.AddRange(models);
|
||||
models = tempmodels.ToArray();
|
||||
|
||||
AlertMappingInfo[] allmappings = client.GetAlertMappings(SystemParams.CompanyID, string.Empty, true);
|
||||
var sources = client.GetAlertMappingSource(SystemParams.CompanyID, -1);
|
||||
List<AlertMappingSourceInfo> all_source = new List<AlertMappingSourceInfo>();
|
||||
all_source.AddRange(sources);
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
if (!getData && sels.Count > 0 && sels.Count >= index + 1 && (sels[index] == "false"))
|
||||
{
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
index++;
|
||||
AlertMappingClient mappinginfo = null;
|
||||
try
|
||||
{
|
||||
mappinginfo = ConvertToImportAlertMappingInfo(dr, kvs, makes, models);
|
||||
if (!getData)
|
||||
{
|
||||
if (allmappings == null || allmappings.Length == 0)
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
continue;
|
||||
}
|
||||
if (string.IsNullOrEmpty(mappinginfo.Source) || string.IsNullOrEmpty(mappinginfo.Description))
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mappinginfo.Make >= -1 && mappinginfo.Models != null && mappinginfo.Models.Length > 0)
|
||||
{
|
||||
if (!alerttypes.Contains(mappinginfo.AlertType))
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
continue;
|
||||
}
|
||||
|
||||
AlertMappingInfo ami = allmappings.FirstOrDefault(m => string.Compare(m.Source, mappinginfo.Source, true) == 0
|
||||
&& string.Compare(m.SPN, mappinginfo.SPN, true) == 0 && string.Compare(m.FMI, mappinginfo.FMI, true) == 0
|
||||
&& string.Compare(m.Description.Replace("\r", "").Replace("\n", ""), mappinginfo.Description.Replace("\r", "").Replace("\n", ""), true) == 0);
|
||||
if (ami == null)
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ami.Items == null || ami.Items.Count == 0)
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
string new_modelstr = string.Join(",", mappinginfo.Models.OrderBy(m => m));
|
||||
AlertMappingItem[] mitems = ami.Items.Where(m => m.Make == mappinginfo.Make).ToArray();
|
||||
AlertMappingItem newitem = null;
|
||||
foreach (AlertMappingItem item in mitems)
|
||||
{
|
||||
string old_modelstr = string.Join(",", item.Models.OrderBy(m => m));
|
||||
if (string.Compare(new_modelstr, old_modelstr, true) == 0)
|
||||
{
|
||||
newitem = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (newitem == null)
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
newitem.AlertType = mappinginfo.AlertType;
|
||||
newitem.Category = mappinginfo.Category;
|
||||
AddAlertMappingItem(client, all_source, newitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (mappinginfo != null)
|
||||
{
|
||||
result.Datas.Add(mappinginfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (!getData)
|
||||
{
|
||||
result.Count = count;
|
||||
}
|
||||
}
|
||||
|
||||
return JsonConvert.SerializeObject(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddAlertMappingItem(AlertProvider client, List<AlertMappingSourceInfo> all_source, AlertMappingItem item)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item.Category))
|
||||
{
|
||||
AlertMappingSourceInfo oldsource = all_source.FirstOrDefault(m => m.Type == 2 && string.Compare(m.Value, item.Category, true) == 0);
|
||||
if (oldsource == null)
|
||||
{
|
||||
AlertMappingSourceInfo newsource = new AlertMappingSourceInfo();
|
||||
newsource.Type = 2;
|
||||
newsource.Value = item.Category;
|
||||
newsource.Id = client.AddAlertMappingSource(SystemParams.CompanyID, newsource);
|
||||
all_source.Add(newsource);
|
||||
item.CategoryId = newsource.Id;
|
||||
}
|
||||
else
|
||||
item.CategoryId = oldsource.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.CategoryId = -1;
|
||||
}
|
||||
|
||||
item.Id = client.SaveAlertMappingItem(SystemParams.CompanyID, item);
|
||||
}
|
||||
|
||||
private AlertMappingClient ConvertToImportAlertMappingInfo(DataRow dr, StringKeyValue[] kvs, AssetMake[] makes, AssetModel[] models)
|
||||
{
|
||||
AlertMappingClient mapping = new AlertMappingClient();
|
||||
foreach (StringKeyValue kv in kvs)
|
||||
{
|
||||
if (string.IsNullOrEmpty(kv.Key) || string.IsNullOrEmpty(kv.Value))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (dr[kv.Value] == DBNull.Value || dr[kv.Value] == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (string.Compare(kv.Key, "Source", true) == 0)
|
||||
{
|
||||
string s = dr[kv.Value].ToString().Trim();
|
||||
mapping.Source = s;
|
||||
}
|
||||
if (string.Compare(kv.Key, "SPN", true) == 0)
|
||||
{
|
||||
string s = dr[kv.Value].ToString().Trim();
|
||||
mapping.SPN = s;
|
||||
}
|
||||
if (string.Compare(kv.Key, "FMI", true) == 0)
|
||||
{
|
||||
string s = dr[kv.Value].ToString().Trim();
|
||||
mapping.FMI = s;
|
||||
}
|
||||
else if (string.Compare(kv.Key, "Description", true) == 0)
|
||||
{
|
||||
mapping.Description = dr[kv.Value].ToString().Trim();
|
||||
}
|
||||
else if (string.Compare(kv.Key, "Make", true) == 0)
|
||||
{
|
||||
string s = dr[kv.Value].ToString().Trim();
|
||||
mapping.MakeName = s;
|
||||
if (!string.IsNullOrWhiteSpace(s))
|
||||
{
|
||||
if (string.Compare("(All)", s, true) == 0)
|
||||
mapping.Make = -1;
|
||||
else
|
||||
{
|
||||
AssetMake make = makes.FirstOrDefault(m => string.Compare(m.Name, s, true) == 0);
|
||||
if (make != null)
|
||||
mapping.Make = make.ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (string.Compare(kv.Key, "Models", true) == 0)
|
||||
{
|
||||
string s = dr[kv.Value].ToString().Trim();
|
||||
if (!string.IsNullOrWhiteSpace(s))
|
||||
{
|
||||
mapping.ModelNames = s;
|
||||
string[] modelsstr = s.Split(',');
|
||||
if (modelsstr != null && modelsstr.Length > 0)
|
||||
{
|
||||
List<int> lsmodel = new List<int>();
|
||||
foreach (string str in modelsstr)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(str))
|
||||
{
|
||||
if (string.Compare("(All)", str, true) == 0)
|
||||
lsmodel.Add(-1);
|
||||
else
|
||||
{
|
||||
AssetModel model = models.FirstOrDefault(m => mapping.Make == m.MakeId && string.Compare(m.Name, str, true) == 0);
|
||||
if (model != null)
|
||||
lsmodel.Add(model.ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
mapping.Models = lsmodel.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (string.Compare(kv.Key, "AlertType", true) == 0)
|
||||
{
|
||||
mapping.AlertType = dr[kv.Value].ToString().Trim();
|
||||
}
|
||||
else if (string.Compare(kv.Key, "Category", true) == 0)
|
||||
{
|
||||
mapping.Category = dr[kv.Value].ToString().Trim();
|
||||
}
|
||||
}
|
||||
return mapping;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
private object GetAlerts()
|
||||
{
|
||||
try
|
||||
@ -134,27 +739,33 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
|
||||
AssetAlertGridViewItem[] assetalerts = null;
|
||||
if (alertparam.AssetID > 0)
|
||||
assetalerts = CreateClient<WorkOrderProvider>().GetAssetAlertGridViewItemsByAsset(SystemParams.CompanyID, alertparam.AssetID, beginDate, endDate, alertparam.AlertTypes, alertparam.JobSites, assigned, completed, alertparam.SearchText, alertparam.IncludeunCompleted);
|
||||
assetalerts = CreateClient<WorkOrderProvider>().GetAssetAlertGridViewItemsByAsset(SystemParams.CompanyID, alertparam.AssetID, beginDate, endDate, alertparam.AlertTypes, alertparam.JobSites, assigned, completed, alertparam.SearchText, alertparam.IncludeunCompleted, alertparam.Category);
|
||||
else
|
||||
assetalerts = CreateClient<AlertProvider>().GetAssetAlertGridViewItems(SystemParams.CompanyID, beginDate, endDate, alertparam.AlertTypes, alertparam.AssetGroups, alertparam.JobSites, assigned, completed, alertparam.SearchText, session.User.UID, alertparam.IncludeunCompleted);
|
||||
assetalerts = CreateClient<AlertProvider>().GetAssetAlertGridViewItems(SystemParams.CompanyID, beginDate, endDate, alertparam.AlertTypes, alertparam.AssetGroups, alertparam.JobSites, assigned, completed, alertparam.SearchText, session.User.UID, alertparam.IncludeunCompleted, alertparam.Category);
|
||||
|
||||
if (assetalerts == null || assetalerts.Length == 0)
|
||||
return new AlertInfo[0];
|
||||
List<AlertInfo> list = new List<AlertInfo>();
|
||||
return string.Empty;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (AssetAlertGridViewItem item in assetalerts)
|
||||
{
|
||||
AlertInfo ai = ConvertAlertObj(item);
|
||||
list.Add(ai);
|
||||
|
||||
sb.Append(SPLIT_CHAR180 + ai.ToString());
|
||||
}
|
||||
return list.ToArray();
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
return sb.ToString().Substring(1);
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return new AlertInfo[0];
|
||||
return string.Empty;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("ERROR", "AlertsBasePage.GetAlerts", ex.Message, ex.ToString());
|
||||
return ex.Message;
|
||||
return new string[] { ex.Message };
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,12 +806,12 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
|
||||
AssetAlertGridViewItem[] assetalerts = null;
|
||||
if (alertparam.AssetID > 0)
|
||||
assetalerts = CreateClient<WorkOrderProvider>().GetAssetAlertGridViewItemsByAsset(SystemParams.CompanyID, alertparam.AssetID, beginDate, endDate, alertparam.AlertTypes, alertparam.JobSites, assigned, completed, alertparam.SearchText, alertparam.IncludeunCompleted);
|
||||
assetalerts = CreateClient<WorkOrderProvider>().GetAssetAlertGridViewItemsByAsset(SystemParams.CompanyID, alertparam.AssetID, beginDate, endDate, alertparam.AlertTypes, alertparam.JobSites, assigned, completed, alertparam.SearchText, alertparam.IncludeunCompleted, alertparam.Category);
|
||||
else
|
||||
assetalerts = CreateClient<AlertProvider>().GetAssetAlertGridViewItems(SystemParams.CompanyID, beginDate, endDate, alertparam.AlertTypes, alertparam.AssetGroups, alertparam.JobSites, assigned, completed, alertparam.SearchText, session.User.UID, alertparam.IncludeunCompleted);
|
||||
assetalerts = CreateClient<AlertProvider>().GetAssetAlertGridViewItems(SystemParams.CompanyID, beginDate, endDate, alertparam.AlertTypes, alertparam.AssetGroups, alertparam.JobSites, assigned, completed, alertparam.SearchText, session.User.UID, alertparam.IncludeunCompleted, alertparam.Category);
|
||||
|
||||
if (assetalerts == null || assetalerts.Length == 0)
|
||||
return new MachineInfoForAlert[0];
|
||||
return string.Empty;
|
||||
|
||||
List<MachineInfoForAlert> machinealerts = new List<MachineInfoForAlert>();
|
||||
foreach (AssetAlertGridViewItem item in assetalerts)
|
||||
@ -236,15 +847,24 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
mi.LatestAlertDateTime = ai.AlertLocalTime;
|
||||
}
|
||||
|
||||
return machinealerts.ToArray();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (MachineInfoForAlert mi in machinealerts)
|
||||
{
|
||||
sb.Append(SPLIT_CHAR183 + mi.ToString());
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
return sb.ToString().Substring(1);
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return new MachineInfoForAlert[0];
|
||||
return string.Empty;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("ERROR", "AlertsBasePage.GetAlerts", ex.Message, ex.ToString());
|
||||
return ex.Message;
|
||||
return new string[] { ex.Message };
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,6 +911,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
ai.Recurring = item.Recurring;
|
||||
ai.Priority = item.Priority;
|
||||
ai.ExpectedCost = item.ExpectedCost;
|
||||
ai.Comment = item.Comment;
|
||||
|
||||
return ai;
|
||||
}
|
||||
@ -300,6 +921,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
AlertInfo ai = new AlertInfo();
|
||||
ai.AlertID = item.ID;
|
||||
ai.WorkOrderID = item.WorkOrderId;
|
||||
ai.WorkOrderNumber = item.WorkOrderNumber;
|
||||
ai.WorkOrderStatus = item.WorkOrderStatus;
|
||||
ai.AlertType = item.AlertType;
|
||||
ai.AlertTime_UTC = item.LastAlertTime;
|
||||
@ -325,6 +947,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
//ai.Recurring = item.Recurring;
|
||||
//ai.Priority = item.Priority;
|
||||
//ai.ExpectedCost = item.ExpectedCost;
|
||||
ai.Comment = item.Comment;
|
||||
|
||||
return ai;
|
||||
}
|
||||
@ -351,6 +974,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
ai.AcknowledgedTime_UTC = item.AcknowledgedTime;
|
||||
ai.AcknowledgedTime_Local = item.AcknowledgedLocalTime;
|
||||
ai.AcknowledgedComment = item.AcknowledgedComment;
|
||||
ai.Comment = item.Comment;
|
||||
|
||||
return ai;
|
||||
}
|
||||
@ -377,27 +1001,34 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
alertparam.AlertStatus = new string[0];
|
||||
AcknowledgedAlertItem[] ackalerts = CreateClient<AlertProvider>().GetAcknowledgedAlerts(SystemParams.CompanyID, beginDate, endDate, alertparam.AlertTypes, alertparam.AssetGroups, alertparam.SearchText);
|
||||
if (ackalerts == null || ackalerts.Length == 0)
|
||||
return new AlertInfo[0];
|
||||
List<AlertInfo> list = new List<AlertInfo>();
|
||||
return string.Empty;
|
||||
|
||||
if (alertparam.AssetID > 0)
|
||||
ackalerts = ackalerts.Where(m => m.AssetID == alertparam.AssetID).ToArray();
|
||||
|
||||
if (ackalerts == null || ackalerts.Length == 0)
|
||||
return string.Empty;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (AcknowledgedAlertItem item in ackalerts)
|
||||
{
|
||||
AlertInfo ai = ConvertAlertObj2(item);
|
||||
list.Add(ai);
|
||||
sb.Append(SPLIT_CHAR180 + ai.ToString());
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
return sb.ToString().Substring(1);
|
||||
}
|
||||
if (list == null)
|
||||
return new AlertInfo[0];
|
||||
if (alertparam.AssetID > 0)
|
||||
list = list.Where(m => m.MachineID == alertparam.AssetID).ToList();
|
||||
|
||||
return list.ToArray();
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return new AlertInfo[0];
|
||||
return string.Empty;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("ERROR", "AlertsBasePage.GetAcknowledgedAlerts", ex.Message, ex.ToString());
|
||||
return ex.Message;
|
||||
return new string[] { ex.Message };
|
||||
}
|
||||
}
|
||||
|
||||
@ -439,10 +1070,10 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
long[] list = JsonConvert.DeserializeObject<long[]>(ids);
|
||||
AlertManager am = new AlertManager(SystemParams.DataDbConnectionString);
|
||||
am.AcknowledgeAlert(se.User.UID, list, acknowledgmentcomment);
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -471,10 +1102,10 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
wp.AddOrRemoveAlertsFromWorkOrder(SystemParams.CompanyID, workorderid, added, true);
|
||||
if (deleted.Length > 0)
|
||||
wp.AddOrRemoveAlertsFromWorkOrder(SystemParams.CompanyID, workorderid, deleted, false);
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -618,10 +1249,10 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
string[] alerttypes = JsonConvert.DeserializeObject<string[]>(clientdata);
|
||||
CreateClient<WorkOrderProvider>().SaveAutoAcknowledgeAlertTypes(SystemParams.CompanyID, alerttypes, session.User.UID);
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -735,7 +1366,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
var users = Users.UserManagement.GetActiveUsers(session.SessionID, SystemParams.CompanyID);
|
||||
var users = Users.UserManagement.GetActiveUsers(GetLanguageCookie(), session.SessionID, SystemParams.CompanyID);
|
||||
List<StringKeyValue> list = new List<StringKeyValue>();
|
||||
foreach (var u in users)
|
||||
{
|
||||
@ -788,6 +1419,34 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
private object GetAlertCategory()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
AlertMappingSourceInfo[] sources = CreateClient<AlertProvider>().GetAlertMappingSource(SystemParams.CompanyID, 2);
|
||||
List<StringKeyValue> list = new List<StringKeyValue>();
|
||||
foreach (AlertMappingSourceInfo si in sources)
|
||||
{
|
||||
StringKeyValue kv = new StringKeyValue();
|
||||
kv.Key = si.Id.ToString();
|
||||
kv.Value = si.Value;
|
||||
list.Add(kv);
|
||||
}
|
||||
|
||||
return list.OrderBy((m) => m.Value).ToArray();
|
||||
}
|
||||
else
|
||||
return new StringKeyValue[0];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("ERROR", "AlertsBasePage.GetAlertCategory", ex.Message, ex.ToString());
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private object GetAlertTypes()
|
||||
{
|
||||
@ -795,8 +1454,16 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
{
|
||||
if (GetCurrentLoginSession() != null)
|
||||
{
|
||||
AlertManager am = new AlertManager(SystemParams.DataDbConnectionString);
|
||||
return am.GetAlertTypes(); ;
|
||||
Foresight.Standard.StringKeyValue[] types = CreateClient<AlertProvider>().GetAlertTypes(SystemParams.CompanyID);
|
||||
List<StringKeyValue> list = new List<StringKeyValue>();
|
||||
foreach (var t in types)
|
||||
{
|
||||
StringKeyValue kv = new StringKeyValue();
|
||||
kv.Key = t.Key;
|
||||
kv.Value = t.Value;
|
||||
list.Add(kv);
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
else
|
||||
return new StringKeyValue[0];
|
||||
@ -854,7 +1521,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
return new string[] { generator.Id.ToString(), "" };
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -875,7 +1542,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
|
||||
return new string[0];
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -885,6 +1552,33 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
private object UpdateAlertComment()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (GetCurrentLoginSession() != null)
|
||||
{
|
||||
var clientdata = HttpUtility.UrlDecode(Request.Form["ClientData"]);
|
||||
string[] ps = JsonConvert.DeserializeObject<string[]>(clientdata);
|
||||
if (ps.Length < 2)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
var ids = ps[0].Split(',').Select(s => long.Parse(s)).ToArray();
|
||||
|
||||
var provider = CreateClient<AlertProvider>();
|
||||
provider.SetAlertComment(SystemParams.CompanyID, ids, ps[1]);
|
||||
return OkResult;
|
||||
}
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("ERROR", "AlertsBasePage.UpdateAlertComment", ex.Message, ex.ToString());
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class AlertsLisenceItem
|
||||
|
@ -180,7 +180,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
|
||||
return fuleid;
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -200,9 +200,9 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
|
||||
CreateClient<FuelManagementClient>().DeleteFuelRecord(SystemParams.CompanyID, fuleid, session.User.UID);
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -344,9 +344,9 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
string FileName = uploadFile == null ? "" : uploadFile.FileName;
|
||||
long attid = CreateClient<AttachmentProvider>().AddAttachment(SystemParams.CompanyID, "FuelRecord", fuleid, FileName, "", iconfilebyte);
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -364,9 +364,9 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
string attachid = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
|
||||
CreateClient<AttachmentProvider>().DeleteAttachment(SystemParams.CompanyID, long.Parse(attachid));
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
|
||||
private void GetUsersData()
|
||||
{
|
||||
UserInfo[] user = UserManagement.GetUsers();
|
||||
UserInfo[] user = UserManagement.GetUsers(string.Empty, string.Empty, GetLanguageCookie());
|
||||
user = user.OrderBy((u) => u.DisplayName).ToArray();
|
||||
string json = JsonConvert.SerializeObject(user);
|
||||
Response.Write(json);
|
||||
@ -416,9 +416,9 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
string FileName = uploadFile == null ? "" : uploadFile.FileName;
|
||||
long attid = CreateClient<AttachmentProvider>().AddAttachment(SystemParams.CompanyID, "MaintenanceLog", woid, FileName, "", iconfilebyte);
|
||||
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -436,9 +436,9 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
string attachid = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
|
||||
CreateClient<AttachmentProvider>().DeleteAttachment(SystemParams.CompanyID, long.Parse(attachid));
|
||||
return "OK";
|
||||
return OkResult;
|
||||
}
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -49,6 +49,11 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
{
|
||||
MaintenanceNavigateItem item = list.FirstOrDefault(m => m.ID == "nav_alertsmanagement");
|
||||
list.Remove(item);
|
||||
item = list.FirstOrDefault(m => m.ID == "nav_alertsmappings");
|
||||
list.Remove(item);
|
||||
|
||||
MaintenanceNavigateItem item1 = list.FirstOrDefault(m => m.ID == "nav_alertsmappings");
|
||||
list.Remove(item1);
|
||||
}
|
||||
var fuelitem = license.Items.FirstOrDefault(m => m.Key == "FuelRecords");
|
||||
if (fuelitem == null || !Helper.IsTrue(fuelitem.Value))
|
||||
@ -85,6 +90,12 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
}
|
||||
|
||||
var user = GetCurrentUser();
|
||||
if (user.UserType != Users.UserTypes.SupperAdmin)
|
||||
{
|
||||
MaintenanceNavigateItem item = list.FirstOrDefault(m => m.ID == "nav_alertsmappings");
|
||||
if (item != null)
|
||||
list.Remove(item);
|
||||
}
|
||||
if (user.UserType == Users.UserTypes.Common)
|
||||
{
|
||||
var client = CreateClient<PermissionProvider>();
|
||||
@ -108,6 +119,11 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
{
|
||||
MaintenanceNavigateItem item = list.FirstOrDefault(m => m.ID == "nav_alertsmanagement");
|
||||
list.Remove(item);
|
||||
item = list.FirstOrDefault(m => m.ID == "nav_alertsmappings");
|
||||
list.Remove(item);
|
||||
|
||||
MaintenanceNavigateItem item1 = list.FirstOrDefault(m => m.ID == "nav_alertsmappings");
|
||||
list.Remove(item1);
|
||||
}
|
||||
Tuple<Feature, Permissions> pmpm = pmss.FirstOrDefault(m => m.Item1.Id == Feature.PREVENTATIVE_MAINTENANCE);
|
||||
if (pmpm == null)
|
||||
@ -175,6 +191,13 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
item1.IconPath = "img/alert.png";
|
||||
list.Add(item1);
|
||||
|
||||
MaintenanceNavigateItem alertmappingsitem = new MaintenanceNavigateItem();
|
||||
alertmappingsitem.ID = "nav_alertsmappings";
|
||||
alertmappingsitem.Title = "Alert Mappings";
|
||||
alertmappingsitem.Url = "AlertMappingManagement.aspx";
|
||||
alertmappingsitem.IconPath = "img/alert.png";
|
||||
list.Add(alertmappingsitem);
|
||||
|
||||
MaintenanceNavigateItem item3 = new MaintenanceNavigateItem();
|
||||
item3.ID = "nav_maintenanceschedule";
|
||||
item3.Title = "Maintenance Schedules";
|
||||
|
@ -190,7 +190,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -235,14 +235,15 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
PmScheduleType = item.Type,
|
||||
PmScheduleUom = item.ScheduleUom,
|
||||
Notes = item.Notes,
|
||||
Intervals = item.Intervals
|
||||
Intervals = item.Intervals,
|
||||
Enabled = item.Enabled
|
||||
};
|
||||
MaintenanceManagement.UpdatePmSchedule(session.SessionID, si, session.User.UID);
|
||||
|
||||
return si.PmScheduleID;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -278,7 +279,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -310,7 +311,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -330,7 +331,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
return "Failed";
|
||||
return FailedResult;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -465,6 +466,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
}
|
||||
public double? StartHours { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
public int TypeID { get; set; }
|
||||
public string TypeName { get; set; }
|
||||
public int AlertsCount { get; set; }
|
||||
public int UnMaintainedAlert { get; set; }
|
||||
@ -512,6 +514,7 @@ namespace IronIntel.Contractor.Site.Maintenance
|
||||
public string Notes { get; set; }
|
||||
|
||||
public PmIntervalItem[] Intervals { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -121,6 +121,9 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
case "GetNowFormatDate":
|
||||
result = GetNowFormatDate();
|
||||
break;
|
||||
case "GetAssetLocationDataSources":
|
||||
result = GetAssetLocationDataSources();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -340,8 +343,13 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
string datasource = "";
|
||||
if (ps.Length > 5)
|
||||
datasource = ps[5];
|
||||
string subsource = "";
|
||||
if (ps.Length > 6)
|
||||
{
|
||||
subsource = ps[6];
|
||||
}
|
||||
|
||||
item = AssetMapViewManagement.GetMachineLocationHistory(LoginSession.SessionID, ps[0], dtFrom, dtTo, companyid, notShow00loc, datasource);
|
||||
item = AssetMapViewManagement.GetMachineLocationHistory(LoginSession.SessionID, ps[0], dtFrom, dtTo, companyid, notShow00loc, datasource, subsource);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -390,6 +398,25 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
}
|
||||
}
|
||||
|
||||
private DataSourceInfo[] GetAssetLocationDataSources()
|
||||
{
|
||||
if (LoginSession != null)
|
||||
{
|
||||
string p = Context.Request.Params["ClientData"];
|
||||
string[] ps = p.Split(';');
|
||||
string companyid = ps.Length > 1 ? ps[1].Trim() : null;//companyid
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
|
||||
var client = FleetServiceClientHelper.CreateClient<AssetLocationQueryClient>(companyid, LoginSession.SessionID);
|
||||
return client.GetAssetLocationDataSources(companyid, long.Parse(ps[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
return Array.Empty<DataSourceInfo>();
|
||||
}
|
||||
}
|
||||
|
||||
private Tuple<string, string> GetLocationPrimaryDataSource()
|
||||
{
|
||||
if (LoginSession != null)
|
||||
@ -515,7 +542,7 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
string data = Context.Request.Params["ClientData"];
|
||||
|
||||
MapViewSearchItem item = JsonConvert.DeserializeObject<MapViewSearchItem>(data);
|
||||
return UserParams.SaveMapViewSearch(LoginSession.SessionID, LoginSession.User.UID, item);
|
||||
return UserParams.SaveMapViewSearch(LoginSession.SessionID, LoginSession.User.UID, item, GetLanguageCookie());
|
||||
}
|
||||
|
||||
return new MapViewSearchItem[0];
|
||||
@ -528,7 +555,7 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
string p = Context.Request.Params["ClientData"];
|
||||
p = HttpUtility.HtmlDecode(p);
|
||||
|
||||
return UserParams.DeleteMapViewSearch(LoginSession.SessionID, LoginSession.User.UID, p);
|
||||
return UserParams.DeleteMapViewSearch(LoginSession.SessionID, LoginSession.User.UID, p, GetLanguageCookie());
|
||||
}
|
||||
return new MapViewSearchItem[0];
|
||||
}
|
||||
@ -596,7 +623,7 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
UserInfo[] users;
|
||||
if (LoginSession != null)
|
||||
{
|
||||
users = UserManagement.GetUsers().Where(u => u.Active).ToArray();
|
||||
users = UserManagement.GetUsers(string.Empty, string.Empty, GetLanguageCookie()).Where(u => u.Active).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -615,7 +642,8 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
string contractorid = p.Substring(0, index);
|
||||
string assetid = p.Substring(index + 1);
|
||||
|
||||
items = UserManagement.GetUsersByAssetID(LoginSession.SessionID, Convert.ToInt64(assetid), contractorid);
|
||||
var lang = GetLanguageCookie();
|
||||
items = UserManagement.GetUsersByAssetID(LoginSession.SessionID, Convert.ToInt64(assetid), contractorid, lang);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -634,7 +662,7 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
string contractorid = p.Substring(0, index);
|
||||
string jsid = p.Substring(index + 1);
|
||||
|
||||
items = UserManagement.GetUsersByJobsiteID(LoginSession.SessionID, Convert.ToInt64(jsid), contractorid);
|
||||
items = UserManagement.GetUsersByJobsiteID(LoginSession.SessionID, GetLanguageCookie(), Convert.ToInt64(jsid), contractorid);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -969,7 +997,9 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
|
||||
public static string GetUserLanguage(Foresight.Standard.StringKeyValue[] alllangs, string uid)
|
||||
{
|
||||
var lang = "en-us";
|
||||
var lang = SystemParams.CustomerDetail.LanguageId;
|
||||
if (string.IsNullOrEmpty(lang))
|
||||
lang = "en-us";
|
||||
if (alllangs != null)
|
||||
{
|
||||
var item = alllangs.FirstOrDefault(m => m.Key == uid);
|
||||
@ -1254,7 +1284,7 @@ namespace IronIntel.Contractor.Site.MapView
|
||||
public class AssetTripItem : AssetTripInfo
|
||||
{
|
||||
public TripColor Color { get; set; }
|
||||
public string TripTimeStr { get { return TripTime == null ? "" : TripTime.Value.ToString(); } }
|
||||
public string TripTimeStr { get { return TripTime == null ? "" : TripTime.Value.ToString("hh\\:mm\\:ss"); } }
|
||||
public string TripOnLocalAsofTimeStr { get { return TripOn == null ? "" : TripOn.LocalAsofTime.ToString("MM/dd/yyyy hh:mm:ss tt"); } }
|
||||
public string TripOffLocalAsofTimeStr { get { return TripOff == null ? "" : TripOff.LocalAsofTime.ToString("MM/dd/yyyy hh:mm:ss tt"); } }
|
||||
public string TripOnAddress
|
||||
|
@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("23.5.11")]
|
||||
[assembly: AssemblyFileVersion("24.3.19")]
|
||||
|
@ -168,7 +168,7 @@ namespace IronIntel.Contractor.Site.Security
|
||||
UserInfo[] items = null;
|
||||
if (GetCurrentLoginSession() != null)
|
||||
{
|
||||
items = UserManagement.GetUsers();
|
||||
items = UserManagement.GetUsers(string.Empty, string.Empty, GetLanguageCookie());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ namespace IronIntel.Contractor.Site.Security
|
||||
if (session != null)
|
||||
{
|
||||
//contact = ContactManagement.GetContacts();
|
||||
users = UserManagement.GetActiveUsers(session.SessionID);
|
||||
users = UserManagement.GetActiveUsers(GetLanguageCookie(),session.SessionID);
|
||||
users = users.OrderBy(u => u.DisplayName).ToArray();
|
||||
}
|
||||
else
|
||||
|
@ -48,7 +48,7 @@ namespace IronIntel.Contractor.Site.Security
|
||||
list.Remove(item);
|
||||
}
|
||||
|
||||
if (user.UserType != UserTypes.SupperAdmin)
|
||||
if (user.UserType != UserTypes.SupperAdmin || IronIntel.Contractor.SystemParams.IsDealer)
|
||||
{
|
||||
SecurityNavigateItem item = list.FirstOrDefault(m => m.ID == "nav_curfewmt");
|
||||
if (item != null)
|
||||
|
@ -92,7 +92,7 @@ namespace IronIntel.Contractor.Site.Security
|
||||
// 返回带 Users 数据的详细用户组对象
|
||||
group = UserManagement.GetGroup(guid.ToString());
|
||||
}
|
||||
var users = UserManagement.GetUsers().OrderBy(u => u.ID).ToArray();
|
||||
var users = UserManagement.GetUsers(string.Empty, string.Empty, GetLanguageCookie()).OrderBy(u => u.ID).ToArray();
|
||||
|
||||
return new GroupDetail
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ namespace IronIntel.Contractor.Site.Security
|
||||
private void GetUsers()
|
||||
{
|
||||
string json = "";
|
||||
var users = UserManagement.GetUnmanagementUsers().OrderBy(u => u.DisplayName).ToArray();
|
||||
var users = UserManagement.GetUnmanagementUsers(GetLanguageCookie()).OrderBy(u => u.DisplayName).ToArray();
|
||||
json = JsonConvert.SerializeObject(users);
|
||||
Response.Write(json);
|
||||
Response.End();
|
||||
|
@ -130,13 +130,14 @@ namespace IronIntel.Contractor.Site
|
||||
var clientdata = Request.Form["ClientData"].Split((char)170);
|
||||
var custid = HttpUtility.HtmlDecode(clientdata[0]);
|
||||
var assetidstr = HttpUtility.HtmlDecode(clientdata[1]);
|
||||
var viewalertstypes = HttpUtility.HtmlDecode(clientdata[2]);
|
||||
long assetid = -1;
|
||||
long.TryParse(assetidstr, out assetid);
|
||||
if (string.IsNullOrWhiteSpace(custid))
|
||||
custid = SystemParams.CompanyID;
|
||||
|
||||
MachineDeviceBasePage.AssetExtItem info = new MachineDeviceBasePage.AssetExtItem();
|
||||
AssetExtInfo ext = CreateClient<AssetQueryClient>(custid).GetAssetExtInfo(custid, assetid);
|
||||
AssetExtInfo ext = CreateClient<AssetQueryClient>(custid).GetAssetExtInfo(custid, assetid, viewalertstypes);
|
||||
Helper.CloneProperty(info, ext);
|
||||
|
||||
if (info.InspectReportItem != null)
|
||||
|
@ -18,6 +18,7 @@ using Foresight.Fleet.Services.Asset;
|
||||
using System.Web.UI.WebControls;
|
||||
using FI.FIC.Contracts.DataObjects.BaseObject;
|
||||
using System.Security.Cryptography;
|
||||
using Foresight.Fleet.Services.Customer;
|
||||
|
||||
namespace IronIntel.Contractor.Site.SystemSettings
|
||||
{
|
||||
@ -454,8 +455,12 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
if (!int.TryParse(rmd, out remembermedays))
|
||||
remembermedays = 30;
|
||||
|
||||
string locsourcestr = SystemParams.GetStringParam("BreadcrumbLocationSource");
|
||||
int locsource = 0;
|
||||
int.TryParse(locsourcestr, out locsource);
|
||||
|
||||
SystemOptionInfo soi = new SystemOptionInfo();
|
||||
soi.TimeZone = SystemParams.GetStringParam("CustomerTimeZone", false);
|
||||
soi.TimeZone = CreateClient<CustomerProvider>().GetCustomerTimeZone(SystemParams.CompanyID);
|
||||
soi.AccuracyFilter = accuracyfilter;
|
||||
soi.UnitOfOdometer = SystemParams.GetStringParam("UnitOfOdometer");
|
||||
soi.AcknowledgingAlerts = SystemParams.GetStringParam("AcknowledgingAlerts");
|
||||
@ -464,9 +469,11 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
soi.VolumeUnits = volumeunits;
|
||||
soi.WeightUnits = weightunits;
|
||||
soi.MFARememberMeDays = remembermedays;
|
||||
soi.BreadcrumbLocationSource = locsource;
|
||||
|
||||
string connectorxml = SystemParams.GetStringParam("Connector");
|
||||
soi.Connectors = ConnectorHelper.FromXML(connectorxml);
|
||||
|
||||
return soi;
|
||||
}
|
||||
else
|
||||
@ -489,8 +496,7 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
{
|
||||
string options = HttpUtility.HtmlDecode(Request.Params["ClientData"]);
|
||||
SystemOptionInfo upi = JsonConvert.DeserializeObject<SystemOptionInfo>(options);
|
||||
|
||||
SystemParams.SetStringParam("CustomerTimeZone", upi.TimeZone);
|
||||
CreateClient<CustomerProvider>().SaveCustomerTimeZone(SystemParams.CompanyID, upi.TimeZone);
|
||||
SystemParams.SetStringParam("CustomerTimeZoneOffset", upi.Offset.ToString());
|
||||
SystemParams.SetStringParam("AccuracyFilter", upi.AccuracyFilter.ToString());
|
||||
SystemParams.SetStringParam("UnitOfOdometer", upi.UnitOfOdometer);
|
||||
@ -500,6 +506,7 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
SystemParams.SetStringParam("WeightUnits", upi.WeightUnits.ToString());
|
||||
SystemParams.SetStringParam("LoginVerifyType", upi.LoginVerifyType);
|
||||
SystemParams.SetStringParam("MFARememberMeDays", upi.MFARememberMeDays.ToString());
|
||||
SystemParams.SetStringParam("BreadcrumbLocationSource", upi.BreadcrumbLocationSource.ToString());
|
||||
|
||||
XmlDocument doc = ConnectorHelper.ToXml(upi.Connectors);
|
||||
SystemParams.SetStringParam("Connector", doc.InnerXml);
|
||||
@ -873,6 +880,7 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
public string LoginVerifyType { get; set; }
|
||||
public StringKeyValue[] Connectors { get; set; }
|
||||
public int MFARememberMeDays { get; set; }
|
||||
public int BreadcrumbLocationSource { get; set; }
|
||||
}
|
||||
|
||||
private class UserOptionObject
|
||||
|
@ -252,6 +252,7 @@ namespace IronIntel.Contractor.Site
|
||||
string p = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
string[] ps = JsonConvert.DeserializeObject<string[]>(p);
|
||||
var attrs = JsonConvert.DeserializeObject<Foresight.Fleet.Services.User.UserAdditionalAttribute>(ps[1]);
|
||||
attrs.UserIID = ps[0];
|
||||
|
||||
var client = CreateClient<Foresight.Fleet.Services.User.UserQueryClient>(SystemParams.CompanyID);
|
||||
client.UpdateUserAdditionalAttribute(ps[0], attrs);
|
||||
@ -488,7 +489,7 @@ namespace IronIntel.Contractor.Site
|
||||
Users.UserObject userobject = new Users.UserObject();
|
||||
UserInfo user = new UserInfo();
|
||||
List<KeyValuePair<int, Foresight.Fleet.Services.User.Permissions[]>> features = new List<KeyValuePair<int, Foresight.Fleet.Services.User.Permissions[]>>();
|
||||
List<Foresight.Standard.StringKeyValue> messagetypes = new List<Foresight.Standard.StringKeyValue>();
|
||||
List<MessageRestrictInfo> messagetypes = new List<MessageRestrictInfo>();
|
||||
var userclient = CreateClient<Foresight.Fleet.Services.User.UserQueryClient>();
|
||||
|
||||
StringKeyValue kv1 = kvs.FirstOrDefault(m => string.Compare(m.Key, "ID", true) == 0);
|
||||
@ -554,6 +555,8 @@ namespace IronIntel.Contractor.Site
|
||||
features.Add(feature);
|
||||
feature = new KeyValuePair<int, Foresight.Fleet.Services.User.Permissions[]>(256, new Foresight.Fleet.Services.User.Permissions[] { Foresight.Fleet.Services.User.Permissions.FullControl });
|
||||
features.Add(feature);
|
||||
feature = new KeyValuePair<int, Foresight.Fleet.Services.User.Permissions[]>(257, new Foresight.Fleet.Services.User.Permissions[] { Foresight.Fleet.Services.User.Permissions.FullControl });
|
||||
features.Add(feature);
|
||||
}
|
||||
|
||||
foreach (StringKeyValue kv in kvs)
|
||||
@ -891,6 +894,10 @@ namespace IronIntel.Contractor.Site
|
||||
language = "fr-fr";
|
||||
else if (string.Compare("français (Canada)", langname, true) == 0)
|
||||
language = "fr-ca";
|
||||
else if (string.Compare("España", langname, true) == 0)
|
||||
language = "es";
|
||||
else if (string.Compare("português", langname, true) == 0)
|
||||
language = "pt";
|
||||
|
||||
user.PreferredLanguage = language;
|
||||
}
|
||||
@ -970,6 +977,10 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
SetUserPermissions(features, Convert.ToInt32(kv.Key), dr[kv.Value].ToString().Trim());
|
||||
}
|
||||
if (string.Compare(kv.Key, Foresight.Fleet.Services.User.Feature.OPENWORKORDERS.ToString(), true) == 0)
|
||||
{
|
||||
SetUserPermissions(features, Convert.ToInt32(kv.Key), dr[kv.Value].ToString().Trim());
|
||||
}
|
||||
if (string.Compare(kv.Key, Foresight.Fleet.Services.User.Feature.JOB_SITES.ToString(), true) == 0)
|
||||
{
|
||||
SetUserPermissions(features, Convert.ToInt32(kv.Key), dr[kv.Value].ToString().Trim());
|
||||
@ -1085,6 +1096,18 @@ namespace IronIntel.Contractor.Site
|
||||
{
|
||||
SetMessageTypeRestrict(messagetypes, Convert.ToInt32(kv.Key), dr[kv.Value].ToString().Trim());
|
||||
}
|
||||
else if (string.Compare(kv.Key, "90", true) == 0)
|
||||
{
|
||||
SetMessageTypeRestrict(messagetypes, Convert.ToInt32(kv.Key), dr[kv.Value].ToString().Trim());
|
||||
}
|
||||
else if (string.Compare(kv.Key, "100", true) == 0)
|
||||
{
|
||||
SetMessageTypeRestrict(messagetypes, Convert.ToInt32(kv.Key), dr[kv.Value].ToString().Trim());
|
||||
}
|
||||
else if (string.Compare(kv.Key, "110", true) == 0)
|
||||
{
|
||||
SetMessageTypeRestrict(messagetypes, Convert.ToInt32(kv.Key), dr[kv.Value].ToString().Trim());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@ -1152,22 +1175,22 @@ namespace IronIntel.Contractor.Site
|
||||
features.Add(new KeyValuePair<int, Foresight.Fleet.Services.User.Permissions[]>(id, permissions));
|
||||
}
|
||||
|
||||
private void SetMessageTypeRestrict(List<Foresight.Standard.StringKeyValue> msgtypes, int id, string s)
|
||||
private void SetMessageTypeRestrict(List<MessageRestrictInfo> msgtypes, int id, string s)
|
||||
{
|
||||
Foresight.Standard.StringKeyValue kv = new Foresight.Standard.StringKeyValue();
|
||||
kv.Key = id.ToString();
|
||||
MessageRestrictInfo kv = new MessageRestrictInfo();
|
||||
kv.MessageType = id;
|
||||
if (string.Compare(s, "0", true) == 0 || string.Compare(s, "None", true) == 0)
|
||||
kv.Value = ((int)Restricts.None).ToString();
|
||||
kv.MessageType = ((int)Restricts.None);
|
||||
else if (string.Compare(s, "1", true) == 0 || string.Compare(s, "MyWorkOrders", true) == 0 || string.Compare(s, "My Work Orders", true) == 0)
|
||||
kv.Value = ((int)Restricts.MyWorkOrders).ToString();
|
||||
kv.MessageType = ((int)Restricts.MyWorkOrders);
|
||||
else if (string.Compare(s, "10", true) == 0 || string.Compare(s, "MyLocationOrDepartment", true) == 0 || string.Compare(s, "My Location Or Department", true) == 0)
|
||||
kv.Value = ((int)Restricts.MyLocationOrDepartment).ToString();
|
||||
kv.MessageType = ((int)Restricts.MyLocationOrDepartment);
|
||||
else if (string.Compare(s, "99999", true) == 0 || string.Compare(s, "All", true) == 0 || string.Compare(s, "FullControl", true) == 0 || string.Compare(s, "Full Control", true) == 0)
|
||||
kv.Value = ((int)Restricts.All).ToString();
|
||||
kv.MessageType = ((int)Restricts.All);
|
||||
else
|
||||
kv.Value = ((int)Restricts.None).ToString();
|
||||
kv.MessageType = ((int)Restricts.None);
|
||||
|
||||
Foresight.Standard.StringKeyValue msgtype = msgtypes.FirstOrDefault(m => string.Compare(m.Key, id.ToString(), true) == 0);
|
||||
MessageRestrictInfo msgtype = msgtypes.FirstOrDefault(m => m.MessageType == id);
|
||||
msgtypes.Remove(msgtype);
|
||||
msgtypes.Add(kv);
|
||||
}
|
||||
@ -1266,20 +1289,33 @@ namespace IronIntel.Contractor.Site
|
||||
}
|
||||
private object GetUsers()
|
||||
{
|
||||
string p = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
string[] ps = JsonConvert.DeserializeObject<string[]>(p);
|
||||
int active = Convert.ToInt32(ps[0]);
|
||||
var searchtxt = ps[1];
|
||||
var items = UserManagement.GetUsers(null, searchtxt).OrderBy(u => u.ID).ToArray();
|
||||
if (active == 1)
|
||||
var session = GetCurrentLoginSession();
|
||||
if (session != null)
|
||||
{
|
||||
items = items.Where(m => m.Active).OrderBy(u => u.ID).ToArray();
|
||||
string p = HttpUtility.HtmlDecode(Request.Form["ClientData"]);
|
||||
string[] ps = JsonConvert.DeserializeObject<string[]>(p);
|
||||
int active = Convert.ToInt32(ps[0]);
|
||||
var searchtxt = ps[1];
|
||||
string lang = session.User.PreferredLanguage;
|
||||
if (string.IsNullOrWhiteSpace(lang))
|
||||
{
|
||||
if (session.User.UserType == Foresight.Fleet.Services.User.UserTypes.SupperAdmin)
|
||||
lang = "en";
|
||||
else
|
||||
lang = SystemParams.CustomerDetail.LanguageId;
|
||||
}
|
||||
var items = UserManagement.GetUsers(string.Empty, searchtxt, lang).OrderBy(u => u.ID).ToArray();
|
||||
if (active == 1)
|
||||
{
|
||||
items = items.Where(m => m.Active).OrderBy(u => u.ID).ToArray();
|
||||
}
|
||||
else if (active == 0)
|
||||
{
|
||||
items = items.Where(m => !m.Active).OrderBy(u => u.ID).ToArray();
|
||||
}
|
||||
return items;
|
||||
}
|
||||
else if (active == 0)
|
||||
{
|
||||
items = items.Where(m => !m.Active).OrderBy(u => u.ID).ToArray();
|
||||
}
|
||||
return items;
|
||||
return null;
|
||||
}
|
||||
|
||||
private object GetUserInfo()
|
||||
@ -2117,7 +2153,7 @@ namespace IronIntel.Contractor.Site
|
||||
return new MessageTypeItem[0];
|
||||
|
||||
List<MessageTypeItem> ls = new List<MessageTypeItem>();
|
||||
Foresight.Standard.StringKeyValue[] kvs = null;
|
||||
MessageRestrictInfo[] kvs = null;
|
||||
if (!string.IsNullOrEmpty(useriid))
|
||||
kvs = CreateClient<MessageProvider>().GetUserMessageRestricts(SystemParams.CompanyID, useriid);
|
||||
foreach (Foresight.Fleet.Services.MessageType type in messagetypes)
|
||||
@ -2128,12 +2164,17 @@ namespace IronIntel.Contractor.Site
|
||||
|
||||
if (kvs == null || kvs.Length == 0)
|
||||
{
|
||||
typeitem.RestrictType = (int)Restricts.All;
|
||||
typeitem.RestrictType = (int)Restricts.MyWorkOrders;
|
||||
}
|
||||
else
|
||||
{
|
||||
Foresight.Standard.StringKeyValue kv = kvs.FirstOrDefault(m => Convert.ToInt32(m.Key) == typeitem.Id);
|
||||
typeitem.RestrictType = kv == null ? 0 : Convert.ToInt32(kv.Value);
|
||||
MessageRestrictInfo kv = kvs.FirstOrDefault(m => m.MessageType == typeitem.Id);
|
||||
typeitem.RestrictType = kv == null ? 1 : kv.RestrictType;
|
||||
if (kv != null)
|
||||
{
|
||||
typeitem.AdditionalText = kv.AdditionalText;
|
||||
typeitem.AdditionalEmail = kv.AdditionalEmail;
|
||||
}
|
||||
}
|
||||
|
||||
ls.Add(typeitem);
|
||||
@ -2141,28 +2182,35 @@ namespace IronIntel.Contractor.Site
|
||||
|
||||
return ls.ToArray();
|
||||
}
|
||||
private List<Foresight.Standard.StringKeyValue> GetUserMessageTypes(string useriid)
|
||||
private List<MessageRestrictInfo> GetUserMessageTypes(string useriid)
|
||||
{
|
||||
Foresight.Fleet.Services.MessageType[] messagetypes = Foresight.Fleet.Services.MessageType.MessageTypes;
|
||||
if (messagetypes == null)
|
||||
return new List<Foresight.Standard.StringKeyValue>();
|
||||
return new List<MessageRestrictInfo>();
|
||||
|
||||
List<Foresight.Standard.StringKeyValue> ls = new List<Foresight.Standard.StringKeyValue>();
|
||||
Foresight.Standard.StringKeyValue[] kvs = null;
|
||||
List<MessageRestrictInfo> ls = new List<MessageRestrictInfo>();
|
||||
MessageRestrictInfo[] kvs = null;
|
||||
if (!string.IsNullOrEmpty(useriid))
|
||||
kvs = CreateClient<MessageProvider>().GetUserMessageRestricts(SystemParams.CompanyID, useriid);
|
||||
foreach (Foresight.Fleet.Services.MessageType type in messagetypes)
|
||||
{
|
||||
Foresight.Standard.StringKeyValue kv = new Foresight.Standard.StringKeyValue();
|
||||
kv.Key = type.Id.ToString();
|
||||
MessageRestrictInfo kv = new MessageRestrictInfo();
|
||||
kv.MessageType = type.Id;
|
||||
if (kvs == null || kvs.Length == 0)
|
||||
{
|
||||
kv.Value = ((int)Restricts.All).ToString();
|
||||
kv.RestrictType = (int)Restricts.MyWorkOrders;
|
||||
}
|
||||
else
|
||||
{
|
||||
Foresight.Standard.StringKeyValue kv1 = kvs.FirstOrDefault(m => Convert.ToInt32(m.Key) == type.Id);
|
||||
kv.Value = kv1 == null ? "0" : kv1.Value;
|
||||
MessageRestrictInfo kv1 = kvs.FirstOrDefault(m => m.MessageType == type.Id);
|
||||
if (kv != null)
|
||||
{
|
||||
kv = kv1;
|
||||
}
|
||||
else
|
||||
{
|
||||
kv.RestrictType = (int)Restricts.MyWorkOrders;
|
||||
}
|
||||
}
|
||||
|
||||
ls.Add(kv);
|
||||
@ -2373,6 +2421,8 @@ namespace IronIntel.Contractor.Site
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int RestrictType { get; set; }
|
||||
public bool AdditionalText { get; set; }
|
||||
public bool AdditionalEmail { get; set; }
|
||||
public Restricts[] AvailableRestricts { get; set; }
|
||||
}
|
||||
public class ImportUserPermissionItem
|
||||
|
@ -1,27 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Data.SqlClient" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.6.1.1" newVersion="4.6.1.1" />
|
||||
<assemblyIdentity name="System.Data.SqlClient" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.6.1.1" newVersion="4.6.1.1"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="DbConntionString" value="Data Source=192.168.25.215\IRONINTEL;Initial Catalog=FORESIGHT_FLV_IICON004;Integrated Security=false;User ID=fi;Password=database" />
|
||||
<add key="DbConntionString" value="Data Source=192.168.25.215\IRONINTEL;Initial Catalog=IRONINTEL_IRONDEV;Integrated Security=false;User ID=fi;Password=database" />
|
||||
<add key="AppVersion" value="2.17.1.19" />
|
||||
<add key="LastUpdateTime" value="10/17/2016 10:36:26.229" />
|
||||
<add key="FleetAssetServiceAddress" value="http://192.168.25.210:5081/fleet/2/fleetsvc" />
|
||||
<add key="FleetAssetServiceAddress" value="http://192.168.25.210:5081/fleet/1/fleetsvc;http://192.168.25.210:5081/fleet/2/fleetsvc" />
|
||||
<add key="StartFICAlertService" value="false" />
|
||||
<add key="StartFICChartSubscribeService" value="false" />
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
@ -34,6 +34,10 @@
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ServiceProcess.ServiceController" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.1" newVersion="7.0.0.1" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.web>
|
||||
@ -48,4 +52,4 @@
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
@ -27,7 +27,7 @@ namespace IronIntel.Contractor
|
||||
|
||||
SystemParams.CreateDbObjects();
|
||||
|
||||
FI.FIC.FICHostEnvironment.RunInServices = true;
|
||||
FI.FIC.FICHostEnvironment.RunInServices = true;
|
||||
if (IsTrue(ConfigurationManager.AppSettings["StartFICAlertService"]))
|
||||
{
|
||||
_Alert = new AlertManagerEx();
|
||||
@ -47,14 +47,7 @@ namespace IronIntel.Contractor
|
||||
{
|
||||
SvcMon = new ForesightMonitorServiceBase(monendpoints);
|
||||
SvcMon.Category = "Fleet-FICAlert";
|
||||
if (!string.IsNullOrWhiteSpace(SvcMon.ServiceInfo.Description))
|
||||
{
|
||||
SvcMon.ServiceInfo.Description = SvcMon.ServiceInfo.Description + "\r\n" + SystemParams.CompanyID;
|
||||
}
|
||||
else
|
||||
{
|
||||
SvcMon.ServiceInfo.Description = "Fleet FIC Alert Service - " + SystemParams.CompanyID;
|
||||
}
|
||||
SvcMon.Description = SystemParams.CompanyID;
|
||||
SvcMon.Notes = "Fleet FIC Alert Service";
|
||||
SvcMon.Start();
|
||||
}
|
||||
|
@ -8,11 +8,12 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>IronIntel.Contractor</RootNamespace>
|
||||
<AssemblyName>IronIntelSiteServiceHost</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@ -28,6 +29,7 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -51,7 +53,7 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>LHBIS.snk</AssemblyOriginatorKeyFile>
|
||||
@ -71,9 +73,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="FICBLC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b006d6021b5c4397, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@ -97,20 +97,23 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Reflib\FIC\FICModels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ForesightServiceMonitorClient">
|
||||
<HintPath>..\Reflib\ForesightServiceMonitorClient.dll</HintPath>
|
||||
<Reference Include="FICore.std">
|
||||
<HintPath>..\Reflib\FICore.std.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Foresight.Service.Client">
|
||||
<HintPath>..\Reflib\Foresight.Service.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.CodeDom, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.CodeDom.6.0.0\lib\net461\System.CodeDom.dll</HintPath>
|
||||
<Reference Include="System.CodeDom, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.CodeDom.7.0.0\lib\net462\System.CodeDom.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.EventLog, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.EventLog.6.0.0\lib\net461\System.Diagnostics.EventLog.dll</HintPath>
|
||||
<Reference Include="System.Diagnostics.EventLog, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.EventLog.7.0.0\lib\net462\System.Diagnostics.EventLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Security.AccessControl, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
@ -119,8 +122,8 @@
|
||||
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceProcess.ServiceController, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ServiceProcess.ServiceController.6.0.0\lib\net461\System.ServiceProcess.ServiceController.dll</HintPath>
|
||||
<Reference Include="System.ServiceProcess.ServiceController, Version=7.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ServiceProcess.ServiceController.7.0.1\lib\net462\System.ServiceProcess.ServiceController.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@ -141,7 +144,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="IronIntelSiteServiceHost_TemporaryKey.pfx" />
|
||||
<None Include="LHBIS.snk" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
@ -156,12 +158,6 @@
|
||||
<Name>IronIntelContractorSiteLib</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\Site\fic\Languages\en-us\textres.xml">
|
||||
<Link>Languages\en-us\textres.xml</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
@ -174,15 +170,5 @@
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\Site\fic\Languages\fr-fr\textres.xml">
|
||||
<Link>Languages\fr-fr\textres.xml</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="..\Site\fic\Languages\zh-chs\textres.xml">
|
||||
<Link>Languages\zh-chs\textres.xml</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -15,11 +15,7 @@ namespace IronIntel.Contractor
|
||||
static void Main()
|
||||
{
|
||||
IronIntel.Contractor.IronIntelHost.Init();
|
||||
ServiceBase[] ServicesToRun;
|
||||
ServicesToRun = new ServiceBase[]
|
||||
{
|
||||
new IronIntelService()
|
||||
};
|
||||
ServiceBase[] ServicesToRun = new ServiceBase[] { new IronIntelService() };
|
||||
ServiceBase.Run(ServicesToRun);
|
||||
}
|
||||
}
|
||||
|
@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("22.11.21")]
|
||||
[assembly: AssemblyFileVersion("24.1.19")]
|
||||
|
10
IronIntelSiteServiceHost/packages.config
Normal file
10
IronIntelSiteServiceHost/packages.config
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Win32.Registry" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.CodeDom" version="7.0.0" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.EventLog" version="7.0.0" targetFramework="net48" />
|
||||
<package id="System.Management" version="7.0.2" targetFramework="net48" />
|
||||
<package id="System.Security.AccessControl" version="6.0.0" targetFramework="net472" />
|
||||
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.ServiceProcess.ServiceController" version="7.0.1" targetFramework="net48" />
|
||||
</packages>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
124
LanguageExtractTool/F_AddNewLanguage.Designer.cs
generated
Normal file
124
LanguageExtractTool/F_AddNewLanguage.Designer.cs
generated
Normal file
@ -0,0 +1,124 @@
|
||||
namespace LanguageExtractTool
|
||||
{
|
||||
partial class F_AddNewLanguage
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.txt_src = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btn_addnewlang = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txt_langcode = new System.Windows.Forms.TextBox();
|
||||
this.ofd = new System.Windows.Forms.OpenFileDialog();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(459, 81);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(116, 23);
|
||||
this.button1.TabIndex = 3;
|
||||
this.button1.Text = "选择源文件";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// txt_src
|
||||
//
|
||||
this.txt_src.Location = new System.Drawing.Point(78, 83);
|
||||
this.txt_src.Name = "txt_src";
|
||||
this.txt_src.Size = new System.Drawing.Size(362, 20);
|
||||
this.txt_src.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(27, 86);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(43, 13);
|
||||
this.label1.TabIndex = 44;
|
||||
this.label1.Text = "源文件";
|
||||
//
|
||||
// btn_addnewlang
|
||||
//
|
||||
this.btn_addnewlang.Location = new System.Drawing.Point(314, 124);
|
||||
this.btn_addnewlang.Name = "btn_addnewlang";
|
||||
this.btn_addnewlang.Size = new System.Drawing.Size(126, 23);
|
||||
this.btn_addnewlang.TabIndex = 4;
|
||||
this.btn_addnewlang.Text = "添加新语种";
|
||||
this.btn_addnewlang.UseVisualStyleBackColor = true;
|
||||
this.btn_addnewlang.Click += new System.EventHandler(this.btn_addnewlang_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(15, 36);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(55, 13);
|
||||
this.label2.TabIndex = 49;
|
||||
this.label2.Text = "语言代号";
|
||||
//
|
||||
// txt_langcode
|
||||
//
|
||||
this.txt_langcode.Location = new System.Drawing.Point(78, 33);
|
||||
this.txt_langcode.Name = "txt_langcode";
|
||||
this.txt_langcode.Size = new System.Drawing.Size(362, 20);
|
||||
this.txt_langcode.TabIndex = 1;
|
||||
//
|
||||
// ofd
|
||||
//
|
||||
this.ofd.Filter = "xml files|*.xml|All files|*.*";
|
||||
//
|
||||
// F_AddNewLanguage
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(587, 172);
|
||||
this.Controls.Add(this.txt_langcode);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.btn_addnewlang);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.txt_src);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "F_AddNewLanguage";
|
||||
this.Text = "根据en添加新语种";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.TextBox txt_src;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btn_addnewlang;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txt_langcode;
|
||||
private System.Windows.Forms.OpenFileDialog ofd;
|
||||
}
|
||||
}
|
77
LanguageExtractTool/F_AddNewLanguage.cs
Normal file
77
LanguageExtractTool/F_AddNewLanguage.cs
Normal file
@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
|
||||
namespace LanguageExtractTool
|
||||
{
|
||||
public partial class F_AddNewLanguage : Form
|
||||
{
|
||||
public F_AddNewLanguage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
txt_src.Text = ofd.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_addnewlang_Click(object sender, EventArgs e)
|
||||
{
|
||||
string newlang = txt_langcode.Text;
|
||||
if (string.IsNullOrWhiteSpace(newlang))
|
||||
{
|
||||
MessageBox.Show("请选择语言代号");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(txt_src.Text))
|
||||
{
|
||||
MessageBox.Show("请选择源文件");
|
||||
return;
|
||||
}
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(txt_src.Text);
|
||||
foreach (XmlNode node in doc.DocumentElement.ChildNodes)
|
||||
{
|
||||
if (string.Equals(node.Name, "Category", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
foreach (XmlNode pcode in node.ChildNodes)
|
||||
{
|
||||
MergeLanuageItem li = new MergeLanuageItem();
|
||||
li.PageID = new NodeValueItem() { Name = pcode.Name, Text = pcode.InnerText };
|
||||
foreach (XmlNode lancode in pcode.ChildNodes)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(lancode.InnerText))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string lgid = lancode.Name;
|
||||
string lgvalue = lancode.InnerText;
|
||||
|
||||
if (string.Compare(lgid, "en", true) == 0)
|
||||
{
|
||||
XmlElement pt_el = doc.CreateElement(newlang);
|
||||
pt_el.InnerText = lgvalue;
|
||||
pcode.AppendChild(pt_el);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
doc.Save(txt_src.Text);
|
||||
MessageBox.Show("添加完成。");
|
||||
}
|
||||
}
|
||||
}
|
123
LanguageExtractTool/F_AddNewLanguage.resx
Normal file
123
LanguageExtractTool/F_AddNewLanguage.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ofd.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
139
LanguageExtractTool/F_LanguageExcel.Designer.cs
generated
Normal file
139
LanguageExtractTool/F_LanguageExcel.Designer.cs
generated
Normal file
@ -0,0 +1,139 @@
|
||||
namespace LanguageExtractTool
|
||||
{
|
||||
partial class F_LanguageExcel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btn_import = new System.Windows.Forms.Button();
|
||||
this.cbx_languages = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.btn_export = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.txt_src = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.ofd = new System.Windows.Forms.OpenFileDialog();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btn_import
|
||||
//
|
||||
this.btn_import.Location = new System.Drawing.Point(356, 128);
|
||||
this.btn_import.Name = "btn_import";
|
||||
this.btn_import.Size = new System.Drawing.Size(84, 28);
|
||||
this.btn_import.TabIndex = 53;
|
||||
this.btn_import.Text = "导入Excel";
|
||||
this.btn_import.UseVisualStyleBackColor = true;
|
||||
this.btn_import.Click += new System.EventHandler(this.btn_import_Click);
|
||||
//
|
||||
// cbx_languages
|
||||
//
|
||||
this.cbx_languages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbx_languages.FormattingEnabled = true;
|
||||
this.cbx_languages.Location = new System.Drawing.Point(82, 27);
|
||||
this.cbx_languages.Name = "cbx_languages";
|
||||
this.cbx_languages.Size = new System.Drawing.Size(362, 21);
|
||||
this.cbx_languages.TabIndex = 52;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(43, 30);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(31, 13);
|
||||
this.label2.TabIndex = 51;
|
||||
this.label2.Text = "语言";
|
||||
//
|
||||
// btn_export
|
||||
//
|
||||
this.btn_export.Location = new System.Drawing.Point(251, 128);
|
||||
this.btn_export.Name = "btn_export";
|
||||
this.btn_export.Size = new System.Drawing.Size(99, 28);
|
||||
this.btn_export.TabIndex = 50;
|
||||
this.btn_export.Text = "导出Excel";
|
||||
this.btn_export.UseVisualStyleBackColor = true;
|
||||
this.btn_export.Click += new System.EventHandler(this.btn_export_Click);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(463, 70);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(116, 23);
|
||||
this.button1.TabIndex = 49;
|
||||
this.button1.Text = "选择源文件";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// txt_src
|
||||
//
|
||||
this.txt_src.Location = new System.Drawing.Point(82, 72);
|
||||
this.txt_src.Name = "txt_src";
|
||||
this.txt_src.Size = new System.Drawing.Size(362, 20);
|
||||
this.txt_src.TabIndex = 48;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(31, 75);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(43, 13);
|
||||
this.label1.TabIndex = 47;
|
||||
this.label1.Text = "源文件";
|
||||
//
|
||||
// ofd
|
||||
//
|
||||
this.ofd.Filter = "xml files|*.xml|All files|*.*";
|
||||
//
|
||||
// F_LanguageExcel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(615, 192);
|
||||
this.Controls.Add(this.btn_import);
|
||||
this.Controls.Add(this.cbx_languages);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.btn_export);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.txt_src);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "F_LanguageExcel";
|
||||
this.Text = "多语言Excel导入导出";
|
||||
this.Load += new System.EventHandler(this.F_LanguageExcel_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Button btn_import;
|
||||
private System.Windows.Forms.ComboBox cbx_languages;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button btn_export;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.TextBox txt_src;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.OpenFileDialog ofd;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user