Merge branch 'main' of https://github.com/CapitalRhino/luminous-sales
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
@@ -17,4 +17,9 @@
|
||||
<ProjectReference Include="..\Models\Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Sales\" />
|
||||
<Folder Include="UserManagment\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
34
LuminousSales/Display/InitialSetup/InitialSetup.cs
Normal file
34
LuminousSales/Display/InitialSetup/InitialSetup.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Display.InitialSetup
|
||||
{
|
||||
public class InitialSetup
|
||||
{
|
||||
public InitialSetup()
|
||||
{
|
||||
|
||||
}
|
||||
public string[] InitialUserInput()
|
||||
{
|
||||
string userName = "", password = "";
|
||||
try
|
||||
{
|
||||
Console.Write("Enter username: ");
|
||||
userName = Console.ReadLine();
|
||||
Console.Write("Enter password: ");
|
||||
password = Console.ReadLine();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
return new string[] { userName, password };
|
||||
}
|
||||
public void InitialRegistration()
|
||||
{
|
||||
InitialUserInput();
|
||||
}
|
||||
}
|
||||
}
|
@@ -10,19 +10,8 @@ namespace Display
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
var a = new UserController();
|
||||
a.UpdateRole(1, "Cashier");
|
||||
foreach (var item in a.GetAll())
|
||||
{
|
||||
Console.WriteLine($"{item.Name} {item.Role.Name}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
var a = new InitialSetup.InitialSetup();
|
||||
a.InitialRegistration();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user