Переглянути джерело

Добавлен отчёт

Mubarakshin Bulat 6 місяців тому
батько
коміт
c5914e7741

+ 0 - 14
src/DontHarm.sln

@@ -9,10 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DontHarmImport", "DontHarmI
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DontHarmWebApi", "DontHarmWebApi\DontHarmWebApi.csproj", "{EB31F186-5271-414E-982B-2BA76F824339}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DontHarmMobile.Android", "DontHarmMobile\DontHarmMobile.Android\DontHarmMobile.Android.csproj", "{740EF9CC-1A58-4654-B641-13EA7327C400}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DontHarmMobile", "DontHarmMobile\DontHarmMobile\DontHarmMobile.csproj", "{15CE6346-BAC1-469C-B04C-DBEA23C8D32A}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -31,16 +27,6 @@ Global
 		{EB31F186-5271-414E-982B-2BA76F824339}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{EB31F186-5271-414E-982B-2BA76F824339}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EB31F186-5271-414E-982B-2BA76F824339}.Release|Any CPU.Build.0 = Release|Any CPU
-		{740EF9CC-1A58-4654-B641-13EA7327C400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{740EF9CC-1A58-4654-B641-13EA7327C400}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{740EF9CC-1A58-4654-B641-13EA7327C400}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-		{740EF9CC-1A58-4654-B641-13EA7327C400}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{740EF9CC-1A58-4654-B641-13EA7327C400}.Release|Any CPU.Build.0 = Release|Any CPU
-		{740EF9CC-1A58-4654-B641-13EA7327C400}.Release|Any CPU.Deploy.0 = Release|Any CPU
-		{15CE6346-BAC1-469C-B04C-DBEA23C8D32A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{15CE6346-BAC1-469C-B04C-DBEA23C8D32A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{15CE6346-BAC1-469C-B04C-DBEA23C8D32A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{15CE6346-BAC1-469C-B04C-DBEA23C8D32A}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 1 - 1
src/DontHarmDesktop/Dictionaries/Headings.xaml

@@ -12,6 +12,6 @@
         <Setter Property="FontSize" Value="26"/>
     </Style>
     <Style x:Key="H3" TargetType="TextBlock">
-        <Setter Property="FontSize" Value="20"/>
+        <Setter Property="FontSize" Value="18"/>
     </Style>
 </ResourceDictionary>

+ 13 - 0
src/DontHarmDesktop/DontHarmDesktop.csproj

@@ -59,6 +59,7 @@
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
     <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
     </Reference>
@@ -67,6 +68,8 @@
     <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
     </Reference>
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Windows.Forms.DataVisualization" />
     <Reference Include="System.Xml" />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Core" />
@@ -76,9 +79,11 @@
     <Reference Include="System.Xaml">
       <RequiredTargetFramework>4.0</RequiredTargetFramework>
     </Reference>
+    <Reference Include="UIAutomationProvider" />
     <Reference Include="WindowsBase" />
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationFramework" />
+    <Reference Include="WindowsFormsIntegration" />
   </ItemGroup>
   <ItemGroup>
     <ApplicationDefinition Include="App.xaml">
@@ -91,6 +96,9 @@
     <Compile Include="Pages\Clients.xaml.cs">
       <DependentUpon>Clients.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Pages\Reports\EmployeeCost.xaml.cs">
+      <DependentUpon>EmployeeCost.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Pages\ServiceAdd.xaml.cs">
       <DependentUpon>ServiceAdd.xaml</DependentUpon>
     </Compile>
@@ -104,6 +112,7 @@
     <Compile Include="ViewModels\AuthViewModel.cs" />
     <Compile Include="ViewModels\ClientsViewModel.cs" />
     <Compile Include="ViewModels\MainViewModel.cs" />
+    <Compile Include="ViewModels\Reports\EmployeeCostVM.cs" />
     <Compile Include="ViewModels\ServiceAddViewModel.cs" />
     <Compile Include="ViewModels\ServiceEditViewModel.cs" />
     <Compile Include="ViewModels\ServicesViewModel.cs" />
@@ -152,6 +161,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Pages\Reports\EmployeeCost.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Pages\ServiceAdd.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 59 - 0
src/DontHarmDesktop/Pages/Reports/EmployeeCost.xaml

@@ -0,0 +1,59 @@
+<Page x:Class="DontHarmDesktop.Pages.Reports.EmployeeCost"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:DontHarmDesktop.Pages.Reports"
+      xmlns:root="clr-namespace:DontHarmDesktop"
+      mc:Ignorable="d" 
+      xmlns:charts="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization"
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="EmployeeCost">
+
+    <StackPanel Style="{StaticResource FormContainer}">
+        <TextBlock Text="Ценность сотрудников" Style="{StaticResource H2}"/>
+        <Grid Style="{StaticResource FormBody}">
+            <Grid.RowDefinitions>
+                <RowDefinition/>
+                <RowDefinition/>
+                <RowDefinition/>
+            </Grid.RowDefinitions>
+
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="128"/>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+
+            <Button 
+                Grid.Row="0"
+                Style="{StaticResource BackButton}"
+                Command="{Binding Source={x:Static root:Navigation.GoBack}}"/>
+
+            <Button 
+                Grid.Row="1"
+                Margin="0,4,0,0"
+                Content="Сформировать"
+                Command="{Binding StartCmd}"/>
+
+            <WindowsFormsHost Grid.Row="2" Grid.ColumnSpan="2">
+                <charts:Chart>
+                    <charts:Chart.Legends>
+                        <charts:Legend>
+
+                        </charts:Legend>
+                    </charts:Chart.Legends>
+
+                    <charts:Chart.ChartAreas>
+                        <charts:ChartArea/>
+                    </charts:Chart.ChartAreas>
+
+                    <charts:Chart.Series>
+                        <charts:Series 
+                        IsValueShownAsLabel="True"/>
+                    </charts:Chart.Series>
+
+                </charts:Chart>
+            </WindowsFormsHost>
+        </Grid>
+    </StackPanel>
+</Page>

+ 29 - 0
src/DontHarmDesktop/Pages/Reports/EmployeeCost.xaml.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace DontHarmDesktop.Pages.Reports
+{
+    /// <summary>
+    /// Логика взаимодействия для EmployeeCost.xaml
+    /// </summary>
+    public partial class EmployeeCost : Page
+    {
+        public EmployeeCost()
+        {
+            InitializeComponent();
+            DataContext = new ViewModels.Reports.EmployeeCostVM();
+        }
+    }
+}

+ 9 - 2
src/DontHarmDesktop/Pages/WelcomePage.xaml

@@ -21,12 +21,19 @@
                 <RowDefinition/>
                 <RowDefinition/>
             </Grid.RowDefinitions>
-            <Label Grid.Row="0">
+
+            <TextBlock Grid.Row="0" Style="{StaticResource H3}">Просмотр</TextBlock>
+            <Label Grid.Row="1">
                 <Hyperlink NavigateUri="Services.xaml" >Просмотр услуг</Hyperlink>
             </Label>
-            <Label Grid.Row="1">
+            <Label Grid.Row="2">
                 <Hyperlink NavigateUri="Clients.xaml" >Просмотр клиентов</Hyperlink>
             </Label>
+
+            <TextBlock Grid.Row="3" Style="{StaticResource H3}">Отчеты</TextBlock>
+            <Label Grid.Row="4">
+                <Hyperlink NavigateUri="Reports/EmployeeCost.xaml">Ценность сотрудников</Hyperlink>
+            </Label>
         </Grid>
     </StackPanel>
 </Page>

+ 25 - 0
src/DontHarmDesktop/ViewModels/Reports/EmployeeCostVM.cs

@@ -0,0 +1,25 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DontHarmDesktop.ViewModels.Reports
+{
+    public class EmployeeCostVM : BindableBase
+    {
+        public DelegateCommand StartCmd { get; set; }
+
+        public EmployeeCostVM() 
+        {
+            StartCmd = new DelegateCommand(StartExecuted);
+        }
+
+        public void StartExecuted()
+        {
+
+        }
+    }
+}

+ 0 - 6
src/DontHarmMobile/DontHarmMobile.Android/DontHarmMobile.Android.csproj

@@ -91,11 +91,5 @@
   <ItemGroup>
     <Folder Include="Resources\drawable\" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\DontHarmMobile\DontHarmMobile.csproj">
-      <Project>{C541A726-642E-41FB-9A95-EAE4F0079290}</Project>
-      <Name>DontHarmMobile</Name>
-    </ProjectReference>
-  </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
 </Project>

+ 3 - 3
src/DontHarmMobile/DontHarmMobile.Android/DontHarmMobile.Android.csproj.user

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <SelectedDevice>pixel_5_-_api_33</SelectedDevice>
-    <SelectedPlatformGroup>PhysicalDevice</SelectedPlatformGroup>
-    <ActiveDebugProfile>pixel_5_-_api_33 %28Android 13.0 — API 33%29</ActiveDebugProfile>
+    <SelectedDevice>Android Emulator</SelectedDevice>
+    <SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
+    <ActiveDebugProfile>Android Emulator</ActiveDebugProfile>
   </PropertyGroup>
 </Project>