Display fundamentals
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Business.Business.UserManagment;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
@@ -28,7 +29,23 @@ namespace Display.InitialSetup
|
|||||||
}
|
}
|
||||||
public void InitialRegistration()
|
public void InitialRegistration()
|
||||||
{
|
{
|
||||||
InitialUserInput();
|
var uc = new UserController();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (uc.CheckIfUserEverCreated())
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uc.RegisterItem(InitialUserInput()[0], InitialUserInput()[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
55
LuminousSales/Display/InputHandler.cs
Normal file
55
LuminousSales/Display/InputHandler.cs
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Display
|
||||||
|
{
|
||||||
|
class InputHandler
|
||||||
|
{
|
||||||
|
public void CommandLineInterface()
|
||||||
|
{
|
||||||
|
ShowAvaliableCommands();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Select action");
|
||||||
|
Console.WriteLine("Sales, UserManagment");
|
||||||
|
string input = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.Write("> ");
|
||||||
|
input = Console.ReadLine();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
}
|
||||||
|
switch (input)
|
||||||
|
{
|
||||||
|
case "sales": break;
|
||||||
|
case "usermanagment": break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void ShowAvaliableCommands()
|
||||||
|
{
|
||||||
|
Console.WriteLine("asad");
|
||||||
|
Console.WriteLine("asad");
|
||||||
|
Console.WriteLine("asad");
|
||||||
|
Console.WriteLine("asad");
|
||||||
|
Console.WriteLine("asad");
|
||||||
|
}
|
||||||
|
public void Sales()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.Write("> ");
|
||||||
|
string input = Console.ReadLine();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -12,6 +12,8 @@ namespace Display
|
|||||||
{
|
{
|
||||||
var a = new InitialSetup.InitialSetup();
|
var a = new InitialSetup.InitialSetup();
|
||||||
a.InitialRegistration();
|
a.InitialRegistration();
|
||||||
|
var ih = new InputHandler();
|
||||||
|
ih.CommandLineInterface();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
LuminousSales/Display/Sales/Deal.cs
Normal file
10
LuminousSales/Display/Sales/Deal.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Display.Sales
|
||||||
|
{
|
||||||
|
class Deal
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
11
LuminousSales/Display/Sales/Stock.cs
Normal file
11
LuminousSales/Display/Sales/Stock.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Display.Sales
|
||||||
|
{
|
||||||
|
class Stock
|
||||||
|
{
|
||||||
|
public void
|
||||||
|
}
|
||||||
|
}
|
10
LuminousSales/Display/Views/AdminView.cs
Normal file
10
LuminousSales/Display/Views/AdminView.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Display
|
||||||
|
{
|
||||||
|
class AdminView
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
33
LuminousSales/Display/Views/BaseView.cs
Normal file
33
LuminousSales/Display/Views/BaseView.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using Models.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Display.Views
|
||||||
|
{
|
||||||
|
class BaseView
|
||||||
|
{
|
||||||
|
public virtual void ShowAvaliableCommands()
|
||||||
|
{
|
||||||
|
Console.WriteLine("1. Sales");
|
||||||
|
}
|
||||||
|
public void SaleHandle()
|
||||||
|
{
|
||||||
|
Deal deal = new Deal();
|
||||||
|
Product product = new Product();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
SearchItem();
|
||||||
|
SaleItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void SearchItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
private void SaleItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
LuminousSales/Display/Views/CashierView.cs
Normal file
10
LuminousSales/Display/Views/CashierView.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Display.Views
|
||||||
|
{
|
||||||
|
class CashierView
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
10
LuminousSales/Display/Views/ManagerView.cs
Normal file
10
LuminousSales/Display/Views/ManagerView.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Display.Views
|
||||||
|
{
|
||||||
|
class ManagerView
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user