Rhomios 2 년 전
부모
커밋
09961803a8

BIN
.vs/Reconstruction/DesignTimeBuild/.dtbcache.v2


BIN
.vs/Reconstruction/v17/.futdcache.v1


BIN
.vs/Reconstruction/v17/.suo


+ 7 - 0
.vs/VSWorkspaceState.json

@@ -0,0 +1,7 @@
+{
+  "ExpandedNodes": [
+    ""
+  ],
+  "SelectedNode": "\\Reconstruction.sln",
+  "PreviewInSolutionExplorer": false
+}

+ 22 - 0
Reconstruction/Functions/Authorization.cs

@@ -2,5 +2,27 @@
 {
     public static class Authorization
     {
+        static string Login;
+        static string Password;
+        public static void LogIn()
+        {
+            Console.Write("Enter your login name: ");
+            Login = Convert.ToString(Console.ReadLine());
+            Console.Write("Enter your password: ");
+            Password = Convert.ToString(Console.ReadLine());
+
+            Service.LoggedUser = Service.db.Users.FirstOrDefault(u => u.Login == Login && u.Password == Password);
+
+            if(Service.LoggedUser != null)
+            {
+                Service.IsLoggedIn = true;
+            }
+            else
+            {
+                Console.Write("A wrong login or password was entered or error happened... ");
+            }
+
+
+        }
     }
 }

+ 6 - 6
Reconstruction/Models/ReconstructionContext.cs

@@ -27,7 +27,7 @@ namespace Reconstruction
             if (!optionsBuilder.IsConfigured)
             {
 #warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
-                optionsBuilder.UseSqlServer("Data source=(localdb)\\MSSQLLocalDB;Database=Reconstruction;Integrated Security=True;");
+                optionsBuilder.UseSqlServer("Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=Reconstruction1;Integrated Security=True;");
             }
         }
 
@@ -37,8 +37,6 @@ namespace Reconstruction
             {
                 entity.ToTable("Status");
 
-                entity.Property(e => e.Id).ValueGeneratedNever();
-
                 entity.Property(e => e.Title).HasMaxLength(50);
             });
 
@@ -46,7 +44,11 @@ namespace Reconstruction
             {
                 entity.ToTable("Task");
 
-                entity.Property(e => e.Id).ValueGeneratedNever();
+                entity.HasIndex(e => e.AccUserId, "IX_Task_AccUserID");
+
+                entity.HasIndex(e => e.CreatorUserId, "IX_Task_CreatorUserID");
+
+                entity.HasIndex(e => e.StatusId, "IX_Task_StatusID");
 
                 entity.Property(e => e.AccUserId).HasColumnName("AccUserID");
 
@@ -80,8 +82,6 @@ namespace Reconstruction
             {
                 entity.ToTable("User");
 
-                entity.Property(e => e.Id).ValueGeneratedNever();
-
                 entity.Property(e => e.Firstname).HasMaxLength(50);
 
                 entity.Property(e => e.Lastname).HasMaxLength(50);

+ 22 - 11
Reconstruction/Program.cs

@@ -1,24 +1,35 @@
-using Reconstruction.Functions;
+using Reconstruction;
+using Reconstruction.Functions;
 
 Functions.WelcomePrint();
 
-
-Console.WriteLine("Please, log in or sign in !\n1 - Log in\n2 - Sing in\n0 - Exit");
-
-switch (Functions.Choose())
+while(true)
 {
-    case 1:
+    Console.WriteLine("Please, log in or sign in !\n1 - Log in\n2 - Sing in\n0 - Exit");
+
+    switch (Functions.Choose())
     {
-            //Authorization.;
-            break;
+        case 1:
+            {
+                Authorization.LogIn();
+                break;
+            }
+        case 2:
+            {
+                Registration.Register();
+                break;
+            }
     }
-    case 2:
+    if(Service.IsLoggedIn == true)
     {
-            Registration.Register();
-            break;
+        break;
     }
 }
 
+while(Service.IsLoggedIn == true)
+{
+
+}
 
 
 

+ 7 - 0
Reconstruction/Settings/Service.cs

@@ -1,8 +1,15 @@
 
+using System.Collections.ObjectModel;
+
 namespace Reconstruction;
 
 public static class Service
 {
     public static ReconstructionContext db = new ReconstructionContext();
+    public static ObservableCollection<User> UserCollection { get; set; } = new ObservableCollection<User>(db.Users.ToList());
+
+
+    public static bool IsLoggedIn;
+    public static User LoggedUser;
 
 }

BIN
Reconstruction/bin/Debug/net6.0/Reconstruction.dll


BIN
Reconstruction/bin/Debug/net6.0/Reconstruction.exe


BIN
Reconstruction/bin/Debug/net6.0/Reconstruction.pdb


+ 1 - 1
Reconstruction/obj/Debug/net6.0/Reconstruction.GeneratedMSBuildEditorConfig.editorconfig

@@ -7,4 +7,4 @@ build_property.InvariantGlobalization =
 build_property.PlatformNeutralAssembly = 
 build_property._SupportedPlatformList = Linux,macOS,Windows
 build_property.RootNamespace = Reconstruction
-build_property.ProjectDir = C:\Users\Rhomaios\Source\Repos\Reconstruction\Reconstruction\
+build_property.ProjectDir = C:\Users\Rhomaios\source\repos\Reconstruction\Reconstruction\

BIN
Reconstruction/obj/Debug/net6.0/Reconstruction.assets.cache


BIN
Reconstruction/obj/Debug/net6.0/Reconstruction.csproj.AssemblyReference.cache


+ 1 - 1
Reconstruction/obj/Debug/net6.0/Reconstruction.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-4016cffa54e62ea8cfce0df46f4f3e24ca5ca61c
+2bee7648f9f2529efd39c468a44a281928fd6d79

BIN
Reconstruction/obj/Debug/net6.0/Reconstruction.dll


BIN
Reconstruction/obj/Debug/net6.0/Reconstruction.pdb


BIN
Reconstruction/obj/Debug/net6.0/apphost.exe


BIN
Reconstruction/obj/Debug/net6.0/ref/Reconstruction.dll


BIN
Reconstruction/obj/Debug/net6.0/refint/Reconstruction.dll


+ 6 - 6
Reconstruction/obj/Reconstruction.csproj.nuget.dgspec.json

@@ -1,17 +1,17 @@
 {
   "format": 1,
   "restore": {
-    "C:\\Users\\Rhomaios\\Source\\Repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj": {}
+    "C:\\Users\\Rhomaios\\source\\repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj": {}
   },
   "projects": {
-    "C:\\Users\\Rhomaios\\Source\\Repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj": {
+    "C:\\Users\\Rhomaios\\source\\repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj": {
       "version": "1.0.0",
       "restore": {
-        "projectUniqueName": "C:\\Users\\Rhomaios\\Source\\Repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj",
+        "projectUniqueName": "C:\\Users\\Rhomaios\\source\\repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj",
         "projectName": "Reconstruction",
-        "projectPath": "C:\\Users\\Rhomaios\\Source\\Repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj",
+        "projectPath": "C:\\Users\\Rhomaios\\source\\repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj",
         "packagesPath": "C:\\Users\\Rhomaios\\.nuget\\packages\\",
-        "outputPath": "C:\\Users\\Rhomaios\\Source\\Repos\\Reconstruction\\Reconstruction\\obj\\",
+        "outputPath": "C:\\Users\\Rhomaios\\source\\repos\\Reconstruction\\Reconstruction\\obj\\",
         "projectStyle": "PackageReference",
         "fallbackFolders": [
           "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
@@ -80,7 +80,7 @@
               "privateAssets": "all"
             }
           },
-          "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
+          "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.201\\RuntimeIdentifierGraph.json"
         }
       }
     }

+ 1 - 1
Reconstruction/obj/Reconstruction.csproj.nuget.g.props

@@ -7,7 +7,7 @@
     <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
     <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Rhomaios\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
     <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
-    <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
+    <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.1.0</NuGetToolVersion>
   </PropertyGroup>
   <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
     <SourceRoot Include="C:\Users\Rhomaios\.nuget\packages\" />

+ 1 - 1
Reconstruction/obj/project.assets.json

@@ -1940,7 +1940,7 @@
             "privateAssets": "all"
           }
         },
-        "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
+        "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.201\\RuntimeIdentifierGraph.json"
       }
     }
   }

+ 2 - 2
Reconstruction/obj/project.nuget.cache

@@ -1,8 +1,8 @@
 {
   "version": 2,
-  "dgSpecHash": "SFHzpWWCNg4StmycKkupr993QjweGzJzjIch1K/6fs7O9i/fwDO/4GrE3r98N9cu0KjceHEwhWG8UpkEbxNj8A==",
+  "dgSpecHash": "9i8FauI1B4EXXeqU/yQQzkp9t/8Zrk3Z0fP5dYuJ0cdhiTplFEQfnINA2biJSQe1LyHO2APiuVR7ugXpHIvRkA==",
   "success": true,
-  "projectFilePath": "C:\\Users\\Rhomaios\\Source\\Repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj",
+  "projectFilePath": "C:\\Users\\Rhomaios\\source\\repos\\Reconstruction\\Reconstruction\\Reconstruction.csproj",
   "expectedPackageFiles": [
     "C:\\Users\\Rhomaios\\.nuget\\packages\\humanizer.core\\2.8.26\\humanizer.core.2.8.26.nupkg.sha512",
     "C:\\Users\\Rhomaios\\.nuget\\packages\\microsoft.csharp\\4.5.0\\microsoft.csharp.4.5.0.nupkg.sha512",